We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is an auto-generated topic for DitsNews 0.1-alpha2 by ditsmedia.

    Brief Description:

    ==========================================
    Features
    ==========================================
    * newsletters/groups/subscribers management
    * import/export subscribers (CSV)
    * message queue (50 messages per batch)
    * subscribe through form
    * confirm subscription (link in email message)
    * unsubscribe via link in newsletter
    * public/private groups (you can only subscribe to public groups)

    ==========================================
    Upcoming versions (TODO)
    ==========================================
    * move settings to MODx System Settings
    * make message queue batch size editable (fixed at 50 for now)
    * statistics (views, bounces, etc.)
    * handle bounces
    * remove unconfirmed subscriptions
    * more translations (english and dutch only for now)
      • 20044
      • 33 Posts
      I can’t get the template to work.

      The newsletter is being sent OK, but it has no content. I have configured a newsletter template, and made a resource based on that template. I had it selected when i made a new newsletter. The contents of the template is like in the instructions, and i also tried some static text, but to no avail. :’(

      I had the newsletter sent using a browser visit to http://domain.tl/core/components/ditsnews/core/core.php and not through a cron job, but I can’t imagine that to make any difference, or does it?

      using:
      DitsNews 0.1-alpha2
      modX revo 2.07pl traditional

      =========== UPDATE ========================
      I narrowed it down to the file_get_contents function in model/ditsnews/ditsnews.class.php line 76. This line gets the published version of the newsletter pagecontent.
      The function returns nothing if a local url is used. Any other url works fine.

      Any ideas?

      =========== UPDATE ========================
      Oh well, .htaccess has IP access restriction. embarrassed After adding the server IP, it all works fine.
        • 11419
        • 5 Posts
        i have one question: why in table "ditsnews_groups_subscribers" you named one of columns "group"??
        it’s one of reserved words in mysql(http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html).
        i just trying to join your module with another one and it’s......"tricky".
          • 40045
          • 534 Posts
          Hi,

          I just installed the Newsletterscript via PackageManagement and I also have the Manager-nav-item "Components" with DitsNews in it, but when I click it, nothing appears, just the document tree but no manager page or something similar. What should appear if everything works fine? Can somebody attach a screenshot please =)?

          The Site uses ModX Revo 2.0.4pl2, could this be a problem?

          thanks for any help!

          EDIT: OK, the version seems to be a problem...in another 2.0.8pl installation it works without problems...
            • 22244
            • 144 Posts
            First of all, thanks for the nice module. Very nice and very easy to work with.
            I have a problem with the placeholders in the send newsletters. The- unsubscribe link never renders.

            What to do to solve this placeholder issue?

            Is there a way to hide the settings menu item/ option from some users?
              • 16313
              • 71 Posts
              Quote from: onepack at Mar 14, 2011, 09:25 AM

              I have a problem with the placeholders in the send newsletters. The- unsubscribe link never renders.

              What to do to solve this placeholder issue?
              All works fine
              Please use newsletter template code from this link:
              http://rtfm.modx.com/display/ADDON/DitsNews
                • 22244
                • 144 Posts
                Ummm... the template code seems to have changed on the ADDON pages. smiley
                Was missing the + in [[!+unsubscribe

                I got it working now!

                Thanks for the time and reply.
                  • 2889
                  • 1 Posts
                  I’ve translated lexicon into "ru". tnx for package, 2.0.8pl, works great. but I’ve got one issue request. just devide template where you’re taking news and template u use to send mail (it seems to be usefull if i want to duplicate my news on site).
                    • 40045
                    • 534 Posts
                    I have the same issue as the first commenter modxxx, newsletter is sent but with no content, when I preview the ressource in the browser it looks as it should, so the content and the template seem to work. The module-settings are also correct and I can select the ressource with the newsletter content/template in the "New Newsletter" Popup-Box.

                    In the ModX error-log I get this after every try to send out a newsletter (which also arrives but as I said: empty):

                    [2011-04-03 22:12:16] (ERROR @ /home/path/core/components/ditsnews/model/ditsnews/ditsnews.class.php : 100) PHP warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: URL file-access is disabled in the server configuration
                    
                    [2011-04-03 22:12:16] (ERROR @ /home/path/core/components/ditsnews/model/ditsnews/ditsnews.class.php : 100) PHP warning: file_get_contents(http://url.tld/testnewsletter.html?smartytags=1) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found
                    
                    [2011-04-03 22:12:16] (ERROR @ /home/path/core/components/ditsnews/model/emogrifier/emogrifier.php : 66) PHP warning: DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Document is empty in Entity, line: 1
                    


                    as I understand it, the php function get_file_contents() seems not to be working (serverconfig?) and because I don’t want to enable this function due security reasons I googled a bit and found quickly an alternative with cURL, I had some difficulties with implementing it in the ditsnews.class script...so I did it very unprofessional (I think =D) and just inserted the following function inside of the "public function queueMessages($newsletterId, $documentId, $groups)"-function on line 63 in the ditsnews.class.php file.

                    		function file_get_contents_curl($url) {
                    			$ch = curl_init();
                    			
                    			curl_setopt($ch, CURLOPT_HEADER, 0);
                    			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
                    			curl_setopt($ch, CURLOPT_URL, $url);
                    			
                    			$data = curl_exec($ch);
                    			curl_close($ch);
                    			
                    			return $data;
                    		}
                    


                    and as a last modification I edited the line:

                    $message = file_get_contents($docUrl);
                    
                    to 
                    
                    $message = file_get_contents_curl($docUrl);
                    



                    now it works flawless, event the unsubscribing works perfectly!

                    Great script but maybe a check if file_get_contents() is available should be performed with the cURL functions as an alternative?

                    keep up the good work


                    PS: another improvement would be the registration date/time of the subscribers (also when it’s created manually)
                      • 6808
                      • 7 Posts
                      I am having an issue and I am unable to resolve. When I test the cron.php through my hosts cron interface it works. But when set on a schedule I receive the following error:

                      Tue Apr 5 13:31:44 EDT 2011
                      Command:
                      mydomain/core/components/ditsnews/cron/cron.php
                      Output:
                      HTTP/1.1 200 OK Date: Tue, 05 Apr 2011 17:31:44 GMT Server: Apache
                      Connection: close Content-Type: text/plain
                      0:[[
                      <b>Parse error</b>: syntax error, unexpected T_STRING,
                      expecting ’)’ in
                      <b>/mnt/r0336/d36/s25/b0254524/www/mydomainstructure/core/components/ditsnews/model/ditsnews/ditsnews.class.php</b>
                      on line <b>12</b>

                      ]] << [email protected] >>
                      Duration:
                      0s

                      Using ModX 2.0.8-pl traditional
                      Linux Server
                      PHP 5.2.9
                      MySQL


                      Any thoughts?


                      SOLVED - Error in my cron script, my host has a strange interface for cron took a bit to figure out how to call through PHP5