RSS Feed
     
Home blog

How to integrate a Phplist Subscribe Page into Joomla

February 17th, 2008 | Email Marketing |

These instructions were carried out using phplist and joomla version 1.0X.  However, it should still work with new versions of joomla 1.5X

You don’t need nasty wrappers, phplist-bridge or Joomclub to integrate nice looking newsletter sign-up forms into your Joomla pages. However, I should preface if you’re looking for your Joomla subscribers to be automatically subscribed to phplist then you’ll want to consider one of the aforementioned integrations.

What you need:

  • Phplist
  • Joomla
  • ChronoForms – Joomla Component
  • Customize Phplist forms to match your Joomla site


    Steps

    1) Install the ChronoForms component. I’m assuming you’re familiar with Joomla and know how to install a component. While you’re at it install the ChronoForms mambot which will allow you to place forms inside content pages.

    2) Create a new form for your subscribe page. In my example its listed as Phplist. Leave Email The Results field set to no.[Image 1] [Image 2]

    3) Click the Form Code tab. Now view the page source of the subscribe page you created in Phplist.

  • Paste your HTML code into the Form HTML box of ChronoForms. DO NOT include the form tags. It should look something like:
  • <table style="text-align: left; width: 100%;" border="0">
    cellpadding="2" cellspacing="2"&amp;amp;amp;amp;amp;amp;gt;
    <tbody>
    <tr>
    <td>
    <div class="required">Email*</div></td>
    <td class="attributeinput"><input name="email" size="40" type="text" /> <script type="text/javascript"><!--
    addFieldToCheck("email","Email");
    // --></script></td>
    </tr>
    <tr>
    <td>
    <div class="required">Confirm your email address*</div></td>
    <td class="attributeinput"><input name="emailconfirm" size="40" type="text" /> <script type="text/javascript"><!--
    addFieldToCheck("emailconfirm","");
    // --></script></td>
    </tr>
    <input name="htmlemail" type="hidden" value="1" />
    <tr>
    <td>
    <div class="required">First Name*</div></td>
    <td class="attributeinput"><input class="attributeinput" name="attribute1" size="40" type="text" /><script type="text/javascript"><!--
    addFieldToCheck("attribute1","First Name");
    // --></script></td>
    </tr>
    <tr>
    <td>
    <div class="required">Last Name*</div></td>
    <td class="attributeinput"><input class="attributeinput" name="attribute2" size="40" type="text" /><script type="text/javascript"><!--
    addFieldToCheck("attribute2","Last Name");
    // --></script></td>
    </tr>
    <tr>
    <td>
    <div class="attributename">Company</div></td>
    <td class="attributeinput"><input class="attributeinput" name="attribute5" size="40" type="text" /></td>
    </tr>
    <tr>
    <td>
    <div class="attributename">Title</div></td>
    <td class="attributeinput"><input class="attributeinput" name="attribute3" size="40" type="text" /></td>
    </tr>
    <strong>
    </strong>
    <tr>
    <td colspan="2">
    <div class="attributename">Does your company market to B2B, B2C or both?</div>
    B2B
    <input class="attributeinput" name="attribute6" type="radio" value="1" /> B2C
    <input class="attributeinput" name="attribute6" type="radio" value="2" /> Both
    <input class="attributeinput" name="attribute6" type="radio" value="3" /></td>
    </tr>
    </tbody></table>
    <strong><input name="list[7]" type="hidden" value="signup" /> <input name="listname[7]" type="hidden" value="Turn On The Light Newsletter" /> </strong>
    <div style="display:none"><strong><input name="VerificationCodeX" size="20" type="text" /></strong></div>
    <strong><input onclick="return checkform();" name="subscribe" type="submit" value="Subscribe" /> </strong>

    <strong>

    </strong>

    <strong><a href=”http://www.jessekanclerz.com/newsletter-unsubscribe.html”>Unsubscribe</a></strong>

    <strong>

  • Located above the HTML code should be the Javascript. Paste your Javascript into the Form Javascript box without the script tags. Note: Chronoforms changes the form name to 'ChronoContact_form_name' (where 'form_name' is the name you give the form in the Chrono Forms General Tab). My Javascript code looks like:
  • function checkform() {
    for (i=0;i
    if (eval("document.ChronoContact_Phplist['"+fieldstocheck[i]+"'].type") == "checkbox") {
    if (document.ChronoContact_Phplist[fieldstocheck[i]].checked) {
    } else {
    alert("Please enter your "+fieldnames[i]);
    eval("document.ChronoContact_Phplist['"+fieldstocheck[i]+"'].focus()");
    return false;
    }
    }
    else {
    if (eval("document.ChronoContact_Phplist['"+fieldstocheck[i]+"'].value") == "") {
    alert("Please enter your "+fieldnames[i]);
    eval("document.ChronoContact_Phplist['"+fieldstocheck[i]+"'].focus()");
    return false;
    }
    }
    }
    for (i=0;i
    if (!checkGroup(groupstocheck[i],groupnames[i])) {
    return false;
    }
    }</strong></strong></strong></strong>
    
    <strong><strong><strong><strong> if(! compareEmail())
    {
    alert("Email Addresses you entered do not match");
    return false;
    }
    return true;
    }</strong></strong></strong></strong>
    
    <strong><strong><strong><strong>var fieldstocheck = new Array();
    var fieldnames = new Array();
    function addFieldToCheck(value,name) {
    fieldstocheck[fieldstocheck.length] = value;
    fieldnames[fieldnames.length] = name;
    }
    var groupstocheck = new Array();
    var groupnames = new Array();
    function addGroupToCheck(value,name) {
    groupstocheck[groupstocheck.length] = value;
    groupnames[groupnames.length] = name;
    }</strong></strong></strong></strong>
    
    <strong><strong><strong><strong>function compareEmail()
    {
    return (document.ChronoContact_Phplist["email"].value == document.ChronoContact_Phplist["emailconfirm"].value);
    }
    function checkGroup(name,value) {
    option = -1;
    for (i=0;i
    if (document.ChronoContact_Phplist[name][i].checked) {
    option = i;
    }
    }
    if (option == -1) {
    alert ("Please enter your "+value);
    return false;
    }
    return true;
    }
    

    4) Click the Form URL's tab. In the Submit URL field enter your action URL, in my case it is http://www.jessekanclerz.com/lists/?p=subscribe. This is important otherwise the data entered into your sign-up form will not post back to the Phplist database tables.

    You'll also notice in this section a Redirect URL. Note that leaving this blank or putting a redirect to a page on your website will have no effect – Phplist will redirect to a public confirmation page upon submittal of the form. However, you'll find an excellent post over at Spamcollect which details how to hack the phplist code to redirect back to pages on your CMS.

    5) Go back to the Forms Manager of ChronoForms and click on the Link for your phplist subscribe page. If it shows up - awesome! Now just create newsletter-subscribe page in one of your Joomla content items and embed the Chrono mambot within that page for a pretty, search engine friendly URL.

    Take my functioning subscribe page for a spin. Since switching to Joomla 1.5X I haven't had time to update the subscribe form for Joomla+Phplist. However, these instructions should still work.

    To customize your unsubscribe and preferences pages requires following the steps outlined in this post.

    Much thanks to Bob Janes for helping me figure this out.

    Tags:

    Share and Enjoy:
    • Sphinn
    • del.icio.us
    • Facebook
    • LinkedIn
    • Technorati
    • TwitThis


    Warning: Invalid argument supplied for foreach() in /home/k1j284/public_html/images/wordpress/plugins/yet-another-related-posts-plugin/keywords.php on line 16

    Warning: Invalid argument supplied for foreach() in /home/k1j284/public_html/images/wordpress/plugins/yet-another-related-posts-plugin/keywords.php on line 16

    Related posts:

    1. Red Pepper: A Free Joomla Template
    2. Hallelujah! Google Doc’s Introduces Forms
    3. Use direct marketing techniques to land yourself a job interview

    6 Responses to “How to integrate a Phplist Subscribe Page into Joomla”

    1. Debrevan says:

      Seems different from your previous posts. Did YOU write this post, or someone else did? Anyway, I think your readers really enjoyed reading it.

    2. Hi Debrevan,

      Admittedly, it’s a technical odd ball compared to my other posts, but I did write it. For a while I toyed with the idea of setting up a newsletter but dropped the idea. This post is a tribute to it’s shattered remains.

      Now that you mentioned it, I should probably contribute this to the PHPLIST forums.

      Jesse

    3. Dez Futak says:

      Brilliant!

      This is up & running on one of my clients websites:

      http://fiveononemagazine.com

      I cheated a bit & copied the generated html code into the theme template, so the form always appears in the top right hand corner of the website, but it doesn’t seem to have done any harm doing this hack & my client will be ver pleased with the result.

      Being able to integrate phplist with Joomla in this way is obviously a very powerful combination, so many thanks for taking the trouble to publish this info.

      I did try the plugin for phplist/joomla, but that ony works for Joomla 1.0, whereas I’m tending to use v. 1.5x on my websites, so your efforts are very appreciated.

      Best regards,

      Dez.

    4. Jesse Kanclerz says:

      Hi Dez,

      I’m glad you’re putting this hack to good use!

      Plus, I think it’s great that you have the sign up form on every page
      of the Five On One site. All the better to get those subscriptions rolling in.

      Have a spooktacular Halloween. Halloween is celebrated across the pond, right?

    5. Thong Tran says:

      Hi,

      You guys should be easier to do this, even much more with JLord phpList integration, take a look:
      http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,6465/Itemid,35/

      Best Regards,
      T

    6. Jesse Kanclerz says:

      Hi Thong Tran,

      Your bridge of PhpList and Joomla 1.5 is sorely needed. The integration with community builder is even sweeter. No doubt this will make alot of people happy. Keep up the good work :)

      If anyone is still looking for a FREE PhpList + Joomla option, and don’t have Joomla subscribers that need to be synched with PhpList then go ahead and give my hack a try.

    Leave a Reply


    Blog Updates Via Email

    Blog Email Subscribers



    Privacy Policy | Sample Email


    Archives

    Connect With Me

    Follow me in these Social Networks

    Latest Tweet

    Yikes! 39% of companies are clueless about the return provided from their email marketing efforts. http://ow.ly/1hz4J
    FeedbackForm
    Feedback Analytics