We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Ok, I am writing the last bits of this today.

    I decided based on this thread to do the following:

    1. A webuser for each subscriber (optionally blocked as default).
    2. A webuser group for each newsletter so that the items mentioned in this post (http://modxcms.com/forums/index.php/topic,1356.msg8999.html#msg8999) are possible.
    3. A table containing info for each newsletter including name, description, tpl (template html body code), active, webgroup (id of the webuser group that the newsletter is tied to), createdon, editedon, lastsent
      • 7455
      • 2,204 Posts
      Sound promising,

      I look forward to this
        follow me on twitter: @dimmy01
        • 18397
        • 3,250 Posts
        Ok folks. SQL backbone is now DONE!

        All I have left is a bunch of management forms and a few tweaks.

        Hopefully this will be finished in the next few days....
          • 18397
          • 3,250 Posts
          Coming along nicely, I *hope* to have this done by the end of the week.
            • 18397
            • 3,250 Posts
            Time for an update.

            Scratch that end of the week update. Too much code and too little time to write it in.

            I have just about everything either coded or planned with the exception of one thing.

            If I generate x number of checkbox’s based on values in a db table (say one for each newsletter) how do I get their responses back so that the send function can send out the correct newsletters?
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: Mark at Nov 18, 2005, 01:01 AM

              If I generate x number of checkbox’s based on values in a db table (say one for each newsletter) how do I get their responses back so that the send function can send out the correct newsletters?

              I normally handle this by having the checkboxes named as the ID value for the db record. In other words, if I check 5 items, I’ll have 5 POST elements that are easily isolated since they are all numeric and unique ID’s. Then you can simply take those keys and do what you need to with it in the POST processing. Hope that makes sense. Contact me directly if you need code examples of what I’m talking about.
                • 32963
                • 1,732 Posts
                Quote from: Mark at Nov 18, 2005, 01:01 AM

                If I generate x number of checkbox’s based on values in a db table (say one for each newsletter) how do I get their responses back so that the send function can send out the correct newsletters?

                This is what I would do:

                <input name="chkitems[]" value="unique_id1" /> Item #1
                <input name="chkitems[]" value="unique_id2" /> Item #2
                <input name="chkitems[]" value="unique_id3" /> Item #3

                The in PHP I would use:

                $chks = $_POST['chkitems'];
                echo $chk[0]; // displays selected unique id



                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 32241
                  • 1,495 Posts
                  Is there any progress on this yet? I have one project coming up with newsletter and calendar. I’m working on calendar module right now, and spending too much time on it, because trying to make a really flexible and modular calendar system for future use. If the code that Mark did is almost done, it will be better if I just help him do the tweaking to finish the up the last bit of code. laugh

                  I’m looking forward for your reply.

                  Thank you VERY MUCH guys!
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media
                    • 18397
                    • 3,250 Posts
                    Wendy, I’m about 90% done with the backend stuff but only 50% done with the UI. I planned out how everything will work and got dev team approval (you should be able to see the thread now). I would greatly appreciate your help. Feel free to PM me with more details.