We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 867
    • 241 Posts
    Quote from: fabilo at Apr 30, 2008, 11:38 PM

    I too was having trouble with the unsubscribe link not working. It wasn’t executing the replacement. I went and had a look in txnewsletters.inc.php and on line #1541 i changed the reg pattern so the line of code is:
    $send_html = preg_replace('/\{link_unsubscribe\}/', $link, $html);
    and now it seems to work. smiley

    I tried this but still got the same pb : when i click on the generated link i go to a page with this url : pei.com/%7Blink_unsubscribe%7D
    wich is an error 404.

    Any idea ?

    Thanks in advance
      • 867
      • 241 Posts
      No one has the same pb ??

      Thanks in advance.
        • 18995
        • 13 Posts
        I’m was having the same problem as cbaone with regards to using the csv upload.

        File ready for process !
        Bad data structure !

        The imported file must be a csv file conform to xml structure definition.


        To understand the structure of the CSV:

        1) subscribe to the system,
        2) then export using the module manager.

        This will give you the structure. I used notepad to make my edits (had problems using excel and editpad).
        Had to do some search and replace on my exsisting email database to get it the same format.

        Also note, you can upload blank values. For instance, i don’t have name values with this email db.

        And also, no need to specify the unsubscribe link, as it will add this in automatically.

        3) Upload after amending your file with the new values.

        Big thanks to FranckT for creating this. Very useful addition to the modx system.
          www.mediagang.co.uk: Developing your business online
          • 18503
          • 45 Posts
          Quote from: ccheney at Apr 18, 2008, 12:20 PM

          Anyone getting this error?:
          Fatal error: Call to undefined function: date_default_timezone_set() in /assets/modules/txnewsletters/txnewsletters.inc.php on line 4


          I received that error as well, and it seems to be a php version issue as others have said. Since I have used 1and1 hosting for a while (since before php5, so it was defaulting to php4 for my account) this article helped me out:

          http://www.thecodecave.com/article206

          basically, you can add this
          AddType x-mapp-php5 .php
          AddHandler x-mapp-php5 .php 
          

          to your .htaccess file to tell 1and1 to use its php5 for your given site/folder
            -dan
            http://wylio.com
            Wylio - Pictures for Bloggers
            • 18262
            • 2 Posts
            Does anyone know how to create multiple newsletters to allow subscribers a choice?
              • 14397
              • 14 Posts
              Quote from: marcray at Jul 23, 2008, 04:37 PM

              Does anyone know how to create multiple newsletters to allow subscribers a choice?
              Same question here. Does anyone have a clue?
              Thanks
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Just create more documents, one for each newsletter.

                6/  now you should create modx documents / template for newsletters and subscription pages, something like following :

                      + newsletters (directory)
                      | + newsletter 1 (page)  // with a newsletter template
                      | + newsletter 2 (page)  // with a newsletter template
                      + newsletter subscription (page) // with subscribe template

                The document ID you use as your base directory is specified in the module configuration:
                &newslettersBaseId=Newsletters directory (id);text;1
                Change the 1 to the ID of the container/folder document you’re using to hold your newsletters.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 13166
                  • 24 Posts
                  Hallo, is it possible to send the images of a newsletter as attachments?
                    • 6726
                    • 7,075 Posts
                    I have installed TXNewsletter and so far the testing is working good, I have none of the issue mentionned so far (see config in sig).

                    The only thing which bugs me is the email validation, as some people have email like [email protected] and there is no . _ - in their address = they can’t subscribe.

                    Around line 250 :

                    // TESTE VALIDITE EMAIL                   
                    unset($email_invalid[$i]);
                    $valid = false;
                    if ((preg_match(’`^[[:alnum:]]([-_.]?[[:alnum:]])*@[[:alnum:]]([-_.]?[[:alnum:]])*\.([a-z]{2,4})$`’,$data))){
                    //Uncomment to activate DNS check for email domains
                    //$domaine = substr(strstr($data, ’@’),1);
                    //if (checkdnsrr($domaine)){$valid= true;}
                    $valid = true;
                    }

                    Since I am no good in regexp how can I change this ?

                    I mean probably I’d have to remove [tt]([-_.]?[/tt] in the expression above but not sure... ideas ?

                    How about using the same validation eForm uses :

                    case "email":
                    //stricter email validation
                    if (strlen($value)>0 &&!preg_match(
                    ’/^(?:[a-z0-9_-]+?\.)*?[a-z0-9_-]+?@(?:[a-z0-9_-]+?\.)*?[a-z0-9_-]+?\.[a-z0-9]{2,5}$/i’, $value) ){
                    $vMsg[count($vMsg)]=$desc . $_lang["ef_invalid_email"];
                    $rClass[$name]=$invalidClass;
                    }
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      There should be a * in that clause somewhere... I’m a little shaky on regexp syntax, but a * means "zero or more".
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org