We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21800
    • 174 Posts
    here is some more remark (with respect) in addition to Reply #6:
    - the signin for the nl should not produce empty entrys if nothing is entered in the fields
    - it would be great to have an addon for the eforms that adds a check box "want to receive a nl?"
    - see also Reply #5
      • 33372
      • 1,611 Posts
      Using fopen is a pretty creative workaround, but i think a lot of servers might have trouble getting it to work properly. It seems as if there ought to be a way to get the parsed document output dirrectly from the parser without having to load it as a URL. I don’t have time to play with this right now, but I would look at the main index.php file to see if there’s an easy way to replicate that code within a snippet (or perhaps the index-ajax.php file might be of some use here?).
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 14050
        • 788 Posts
        That might be the place to look Zap, but based on Susan’s comments, I figured there wasn’t an easy way. The code for using fopen would be something like this:

        /////Read the file and establish all the output variables (For Weather.com)
        $url = "http://www.myurl.com";
        $handle = fopen($url, 'r');
        $contents = fread($handle, filesize($url));
        fclose($handle);
        


        Now, the reason you are probably getting an error is because you must have allow_url_fopen enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.

        If you do not have the ability to enable fopen, you may try curl, which can be accomplished by something like this:

        // create a new cURL resource
        $ch = curl_init();
        
        // set URL and other appropriate options
        curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
        curl_setopt($ch, CURLOPT_HEADER, 0);
        
        // grab URL and pass it to the browser
        $newsletter = curl_exec($ch);
        
        // close cURL resource, and free up system resources
        curl_close($ch);
        
        return $newsletter;
        ?>
        
          Jesse R.
          Consider trying something new and extraordinary.
          Illinois Wine

          Have you considered donating to MODx lately?
          Donate now. Every contribution helps.
        • Well, it would be so much easier if the parser just did "return $this->documentObject", then the index.php file would echo the returned value. I suppose this is one more step in getting the document out, but it would allow for all kinds of interesting things to do with that documentObject.
            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
            • 21800
            • 174 Posts
            @jesster444 @Susan @transeffect @all
            have tested a and b version of your suggestion:
            a - the same as post #9, though fopen is marked as on in phpinfo, the url is ok and shows the content (a ditto call) with blank template when called by alias.html
            b- Fatal error: Call to undefined function curl_init() in /manager/includes/document.parser.class.inc.php(766) : eval()’d code on line 3
            I’ve nested the code in the TEtemplate or in the nl (via snipped)
            :-(
            I mean, from a mangeruser point of view I agree with Susan and then put the thing into the ModX buildin mailing system (maybe add a page as kind of attachement). ... ? ...
              • 30552
              • 75 Posts
              Hey all,

              Just wanted to drop in and let everyone know that things have been super busy with our company, but Brandon (who actually wrote the script) should be dropping in at some point soon to answer inquiries. We created this for one of our sites, and it works really well for what we needed, but I thought maybe someone would end up taking what we started and add any additional required features.

              However, Brandon will be happy to look over peoples’ questions, and get back to everyone, possibly even providing some additional features himself at some point.

              Thanks for the positive responses! It makes submitting these kinds of things very rewarding.

              -Kevin
                • 34162
                • 1 Posts
                I installed the TE Mailer module and it really looks nice smiley

                Still, I’m having some trouble using it. As I found out on the Dutch forums, I’m not the only one.

                Outsite the Manager, when I use the TEMailerSubscribe snippet, in IE6 I get an error on the page after pressing the Sign In button, saying ’Ajax’ not defined.

                How can I correct that?

                And second: when I try to send a newsletter to a test email address, I get the message that the mail is sent successfully, but I never receive the newsletter.

                Anyone any suggestions?

                I use MODx 0.9.6

                Thanx,
                Wim.
                  • 12151
                  • 115 Posts
                  Quote from: WeBe at Nov 01, 2007, 04:58 PM

                  Outsite the Manager, when I use the TEMailerSubscribe snippet, in IE6 I get an error on the page after pressing the Sign In button, saying ’Ajax’ not defined.

                  for some reason the subscribe.php script includes reference to ’assets/modules/temailer/js/scriptaculous.js’ and ’’assets/modules/temailer/js/prototype.js’ however these files are not included. the module is instead packaged with mootools and a custom script called temailer.js.

                  change the javascript references to these scripts and the subscribe works just fine:

                  <script src="./assets/modules/temailer/js/mootools.js" type="text/javascript"></script>
                  <script src="./assets/modules/temailer/js/temailer.js" type="text/javascript"></script>
                    • 12151
                    • 115 Posts
                    i’m really liking the functionality and potential of this module!

                    one thought though - it would be really cool to plug in to the webusers table and use exisiting user data for subscribers. how much of a headache would this be?
                      • 34162
                      • 1 Posts
                      Thank you for your response. I will definitely try your solution.

                      Quote from: highlander at Nov 08, 2007, 03:13 PM

                      i’m really liking the functionality and potential of this module!

                      one thought though - it would be really cool to plug in to the webusers table and use exisiting user data for subscribers. how much of a headache would this be?
                      I agree. This would be a functionality that I too could really use smiley