We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    Nicola (Banzai) Reply #1, 20 years ago
    You know I’m not a coder... grin

    I’ve seen a lot of request for a PhpList Module/Snippet...

    I’ve made this little peace of code 2-3 years ago, trying to create a PHpList > Nuke7.4 Integration.

    This code (added in Nuke Your Account form registration) works and at the same time records the user on PhpList and Nuke cms.

    i hope can help anyone to create a PhpList module/snippet/plugin for MODx. rolleyes

        /* PHPList integration */
            $uid = md5(uniqid(mt_rand()));
            $listquery = sprintf('insert into lists_user_user
                (email, entered, uniqid, confirmed, htmlemail, subscribepage, rssfrequency)
                values ("%s", now(), "%s", 1, 1, 1, "")', addslashes($row[user_email]), $uid);
            $db->sql_query($listquery);
            $res = $db->sql_query("select id from lists_user_user where email = '" . $row[user_email] . "'");
            if ($db->sql_numrows($res))
            {
               $entry = $db->sql_fetchrow($res);
               $listquery = sprintf('insert into lists_listuser (userid, listid) values (%d, 2)', $entry[id]);
               $db->sql_query($listquery);
            }
    /* END PHPList integration */
      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design