Jesse J Heap & Son, Inc.
 

Home » Wordpress Plugin: PHPList Form Integration

Wordpress Plugin: PHPList Form Integration

PHPList is a excellent open source newsletter manager. However, one missing piece from the application is the ability to cleanly and easily allow users to subscribe to your newsletter from your wordpress blog.

PHPList Subscriber form Embedded in Wordpress
Example PHPList Form embedded in Wordpress
Code Required to Display
Form

 

This lightweight plugin for Wordpress 2.0 to 2.5 gives you the ability to easily allow users to subscribe to your newsletter or RSS blog feed from any page on your blog. Simply install the plug-in, configure your settings, and embed the comment <!--phplist form--> on any page on your blog. It’s easy and fast and does not require any further template modifications in PHPList or Wordpress.

 

Table of Contents

  1. Pre-requisites
  2. Download
  3. Quick Start Installation Instructions
  4. Detailed Installation Instructions
  5. Screencast - configuration
    of plugin
  6. Demo
  7. Contact
  8. Change Log
  9. Credits
  10. Future Enhancements
  11. Donations (Link to us)

Pre-requisites

  • Wordpress 2.0.x to 2.5
  • Phplist 2.10.2 or greater.
  • PHP 4.x or 5.x with cURL support

Download

Current version of Wordpress PHPList Integration plug-in is 1.5

Quick Start Instructions

  1. Download plugin installation and upload phplist.php and phplist.cssto your plug-ins folder, usually /wp-content/plugins
  2. Login to wordpress administration panel and activate the plug-in (Under plug-ins). Plugin name is phplist.
  3. Navigate to Options -> PHPList and fill in the General Settings configuration as instructed. (Optionally, you can configure the form settings as well - see detailed instructions for information)
  4. The last step is to setup the form. If you are adding the subscriber form directly to any post or wordpress page then just add the following comment while inside the wordpress editor:

    <!--phplist form-->


    For more advanced users, who are comfortable editing template files, the form can also be added to any template file. For example most users like to display the subscriber form in their sidebar.php. To do this open up the template page (i.e. sidebar.php) and add the following code:

    <?php
                $content = apply_filters('the_content', '<!--phplist form-->');
                echo $content;?> 

Detailed Installation Instructions

  1. Download the ZIP installation file, and upload phplist.php and phplist.css to your plug-ins folder ( /wp-content/plugins)
  2. Login to wordpress administration panel and activate the plug-in (Under plug-ins). Plugin name is phplist.
  3. Click on Options -> PHPlist to configure PHPList

  4. Settings are divided up into General Settings and Form Settings. Starting with General settings, set the following:
    1. PHPList URL: Set this to the url of base installation of the domain where you are hosting PHPList. If the installation folder is password protected then the format of the url should be:

      http://username:password@yoursite.com/lists/

    2. PHPList Admin Login: Enter the user name of the PHPList Admin.
      The user/pass of the admin is needed in order to optionally bypass the need to confirm the user.
    3. PHPList Admin Password: Enter the password of the PHPList Admin.
    4. PHPList List Information: In this table enter the number (i.e. PHPList ID) and name of the mailing list you want to subscribe the user too. The name of the list can be whatever you want - it will be displayed on the form in the case when you have more then one list added.

      Phplist

      NOTE: To figure out the correct number (i.e. PHPList ID) for your mailing list, login to PHPList admin and click on Lists for a current list of lists. (http://www.yoursite.com/lists/admin/?page=list)
      Each list is assigned a number which should be entered in this List ID field. See example below

      Note: If you want to give the user the option of subscribing to multiple lists click on the "Add Another List" button to add another row:

      If you have multiple lists configured the form would look similar to this:

    5. Skip Confirmation Email: Check this option to
      automatically confirm the user without the need for a confirmation
      email.
  5. The Form Settings shows the two fields available for the subscribe form. The optional first row is modifiable and allows you to enter any type of text field required. Ideally it should correspond with a field you are already capturing through the PHPList Subscriber Page.
    1. Show on Form: Check this option to show the Optional Field on the subscriber form.
    2. Text Label Name: Enter the label of the field that you want to appear on the subscriber form.
    3. Text Field ID: In order to successfully write the field value to the correct value in the PHPList database you have to get the ID of the field from PHPList. Each attribute in PHP takes the form ‘attribute[X]‘ where X is a integer. To determine the corresponding integer go to the Active Subscriber Page within PHPList - http://www.yoursitename.com/lists/admin/?page=spage. Locate the active subscriber page and click edit. Once the subscriber page loads, locate the attribute you are using and find its number:

    4. Text Field Size: Enter the size of the text field box
    5. Text Field Max Size: Enter the maximum size of the text entered by the user
    6. Required Field: Check this box if the field should be required.
  6. Now that the form has been customized, open up any post or page using the wordpress editor and add the following comment to enable the subscriber form:

    <!--phplist form-->

    For more advanced users, who are comfortable editing wordpress template files, the form can also be added to any wordpress template file. For example most users like to display the subscriber form in their sidebar.php. To do this open up the template page (i.e. sidebar.php) and add the following code:

    <?php
                $content = apply_filters('the_content', '<!--phplist form-->');
                echo $content;?> 

    This code should be positioned in the location where you want the form to appear. Typically, you should make sure to include it within the main <DIV> tags for the form.

  7. Edit the css in phplist.css to customize the look and feel of the form

    Note: For advanced users wishing to add additional fields to their form (beyond the two that are provided) see my post on adding additional fields.

Demo

See demo at Pink Cake Box Pastries Blog

Contact

For questions/issues/enhancement suggestions please contact me - suppoert at pinkcakebox.com

Change Log

Version 1.0 - Initial Version

Version 1.01 - Added check to ensure user has entered trailing slash for the PHPList URL. If no trailing slash is found, the slash is appended to the end of the URL.

Version 1.02 (10/8/2006) - Minor tweak to support displaying subscriber form in any template page.

Version 1.2 (1/13/2007) - Changed way script stores options to prevent clashes with other plugins. Moved CSS to seperate file - phplist.css. CSS can now be toggled on or off

Version 1.3 (1/28/2007) - Fixed form display problem in WP 2.1. Full compatibly with WP 2.1

Version 1.4 (10/22/2007) - Fixed X S S vulnerability. Thanks to Gordon for the find.

Verion 1.5 (3/16/2008) - Now with multiple list support!

Credits

Credits to Ryan Duff, creator of Wordpress Contact form plug-in, for some of the base code I used for detecting spam and the flexible design idea for dropping the subscriber form on any wordpress page.

Future Enhancements

  • Currently, this version only supports a simple subscriber form which supports an email and one optional text field. In the future, I’ll look to add support for multiple fields. Ideally, the plugin could interface directly with PHPList and grab the form structure.
  • Take a class based approach to facilitate future enhancements
  • Explore using wordpress widgets for displaying subscriber form

Donations (Link to us)

If you use this script and find it worthwhile please link back to our main site. While we enjoy releasing scripts to the general community, we also look to benefit by drawing more traffic to our site. Feel free to link back however you want - here is a guideline:

J J. Heap & Son - Manufacturers and distributors of a wide variety of labor saving devices and factory automation technologies including dye sublimation equipment, Heat transfer machines, Fusing Machines, So-Fast Cutting Equipment, Material Handling Equipment and an inventory of rebuilt machines.

47 Responses to “Wordpress Plugin: PHPList Form Integration”

  1. Nick Says:

    Jesse,

    I installed your plugin last night. Looks great, except when I try to subscribe to my own newsletter (using a fresh email address), it doesn’t add the new address to my phpList “users” group. Nor does it send me a confirmation email. Can you help?

    Nick -

    It appears your list id is 2. Ensure the list id is setup correctly in the phplist admin options. See http://projects.jesseheap.com/all-projects/wordpress-plugin-phplist-form-integration/#ListID for more information

    Jesse

  2. Urus Says:

    Note: This script requires PHPLIST which by default is stored in /lists under your web root.
    Hi,
    Nice plugin. But, I don’t know where goes the list. Should I create manually the folder /lists/ ?
    Thanks

    Urus

  3. Ed Says:

    Note: This user had 3 required fields in his phplist form. Out of the box the script only supports 2 required fields. See this post on how to add additional fields.

    Hi Jesse, great plugin, but I’m having the same problem as Nick, above. The plugin goes in perfectly, the user fills out the form and is returned a success message, but the user is not entered into the PHPList user list and receives no confirmation email. I have definitely configured the list ID correctly. I guess I’ll try checking the “Skip Confirmation Email” box in the plugin config - but I’d rather have users confirm subscriptions via email to be honest. Thanks for your help Jesse. Ed

  4. Supercharged Says:

    A word of caution for those running Contactform on the same site: better remove the css portion from this plugin, as this uses the same css-classes. This also removes the css-call in the header on every wp-page.

    Supercharged - The CSS has been changed in version 1.2, it no longer uses the same classes as Contactform. It can be optionally removed all together through the OPTIONS page.

  5. ernesto Says:

    get the followin error when i submit a emailadress:

    Warning: curl_setopt(): Unable to access in /srv/www/vhosts/uniscout.info/httpdocs/uniscout/wp-content/plugins/phplist.php on line 63

    Ernesto - this line sets the cookie to authenticate you when logging into PHPLIST. Your cURL installation for PHP may not be setup correctly or there is some permission issue. Email me at support@pinkcakebox.com and I can send you a simple script to test your cURL installation or alternatively search the web for a test cURL script in PHP to test yourself.

  6. Prolet Says:

    Great plugin. I installed it and works great! Is it possible to offer options for multiple lists or is it possible to have 2 separate plug-ins running on the same blog. I have 2 mailing lists and would like to have 2 separate forms that subscribe the user to different mailing lists. Any idea?

    Thanks :)

    Thanks Prolet. Out of box it doesn’t support multiple lists. And unfortunately making a copy of the file and activating it won’t work either. I’ll look to allowing parameters to be passed via posts to support multiple lists. Thanks for the suggestion

  7. Jesse Siglow Says:

    It looks like I an having the same issue… the plugin goes in perfectly, the user fills out the form and is returned a success message on my site, but the user is not entered into the PHPList user list and receives no confirmation email. I have definitely configured the list ID correctly: #4 om my site.

    AM I missing something? Without confirmation or list additions, I can’t see that anything is actually being done. Ant ideas? I look forward to using this!

    Jesse’s problem was similar to others I’ve come across. He had only enabled email on his subscriber form, but within PHPLIST he had the name field marked as required. So when the plugin tries to submit only email, phplist rejects its. And the plugin does not yet have logic to determine it has been rejected, so it appears to the user they have successfully subscribed.

  8. Ldom.net » Outils Wordpress et stockage iCal Says:

    [...] Wordpress Plugin: PHPList Form IntegrationPlugin wordpress pour intégrer la gestion de newsletter PHPlist[wordpress]  [...]

  9. radiomestiza Says:

    great!! works perfect!
    thanks!!

  10. radiomestiza Says:

    your plugins are great for subscribing users to phplist,
    i am looking for a plugin to make a weekly digest of WORDPRESS (could be trough rss feed), and send it trough phplist.
    if there´s not a plugin do you know of any way i can do this_?

    In theory you should be able to do this with our plugin. Phplist supports subscribing to RSS feeds.

  11. alan blount Says:

    Thought you might be interested in a similar (simpler) plugin I developed… Suggestions welcome. (half of my purpose was to allow auto-login to PHPlist admin interface from WP)

    http://zeroasterisk.com/w/WP_plugin_PHPlist_helper

  12. Brian Ward Says:

    Just thought you should know that the plugin, when used on the sidebar, can conflict with Fotobook plugin because both scripts define and call the same filter name “the_content”. So it looks pretty messy…

    To fix, alter the end of your phplist.php script and on the sidebar.php by renaming “the_content” to “the_content1″ and the conflict is averted.

    Thanks Brian, I should of appended that filter with a unique identifier. I’ll fix that in the next release

  13. chrisareas Says:

    Got everything to work! This newsletter plug-in is awesome. Thanks for your contribution to the community.

  14. Rob Says:

    Jesse -

    This is an AWESOME plugin. Well done! Do you know what I would need to edit in order to allow for another installation? I have several lists, and would like to have a separate form for each of them.

    Way to go man, I greatly appreciate it!

    Thanks Rob. It’s not currently supported and I haven’t reviewed the code to figure out what needs to be changed to support it. See comment above

  15. ysjack Says:

    How do you do? The version of my wordpress is 2.1.2.
    Plug-in of the newsletter is looked for. It installed instantly. When ADMIN MENU to PHP LIST is opened, the following error messages come out. Please give me advice.

    —————————————————-
    CURL library not detected on system. Need to compile php with cURL in order to use this plug-in
    —————————————————-

    Jack talk to your system admin and have them compile php with cURL

  16. Arend Says:

    I’ve installed PHPlist Form Integration, and subscription work OK, but when I post a new blog item, the subscribers don’t get a notification. Am I missing something? Or is that not the purpose of the plugin?

    Arend - phplist has to be configured for RSS feeds in order for that feature to work. See this link for more information http://docs.phplist.com/PHPlistRssConceptualSetup

  17. Rob Says:

    Thank Jesse, I’m no programmer, but Dagon Designs has their Secure Form Mailer, which supports multiple instances. (you can actually specify how many you want) Maybe their code can help you figure out a way to get multiple lists off of yours. Thanks again man!

  18. Integrando PHPList ao WordPress | Lucrando na Rede Says:

    [...] quem tem site baseado em WordPress existe um plugin chamado PHPList Form Integration, que permite que um webmaster facilmente integre a uma página fixa ou no template do site o [...]

  19. Kai Says:

    I just want to add my voice to the two main themes just far:

    1. WONDERFUL website, a huge contribution to those who use Wordpress and recognize the power of PHPlist

    2. Boy, would it be nice to have multiple lists - I’d be willing to contribute to a fundraising campaign to support your time in making this happen!

    Thanks so much!

    Kai - multiple lists are now supported. But I should qualify how they are supported. If you want to give the user the option of choosing which mailling list to subscribe too, you can now enable that through the PHPList options panel in wordpress. In the future I’d like to enhance this even further to give the option of associating multiple forms with different mailing lists

  20. REEP Says:

    Hey

    Great Plugin

    But I am using the POSTTEASER plugin and it is treating the small form for PHPLIST as a post and asking for comments.

    Any suggestions.

    Sorry Reep, I’m not familiar with POSTTEASER. Try contacting the POSTTEASER plugin author.

  21. Richard Says:

    Any chance you can get this working in wordpress 2.3?

    This is currently compatible with 2.3. Let me know if you have any problems

  22. Tom Says:

    Hey, thanks for the plugin. If it does what I am hoping it does, I will be sure and be back to make a donation. I appreciate your contributions to wordpress newbies like me.

    Thanks Tom - let me know if you have any problems

  23. Daniel Says:

    Hi Jesse,

    I’m getting this when a subscriber hits send-Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home:/usr:/tmp) in /home/fisheye/public_html/hipbonestudio/wordpress/wp-content/plugins/phplist-form-integration/phplist.php on line 69

    Any ideas?

    Thanks,

    Daniel

    Daniel,

    So it appears you need to change line 69 as follows:

    curl_setopt($ch, CURLOPT_COOKIEFILE, “/home/usr/tmp”)

    Apparently your hosting provider restricts where files can be written. Let me know if that works.

    Jesse

  24. Santosh Says:

    Hi:

    After some difficulty I was able to install the script on my site. There is 1 bug that has been noticed while testing. Is there any way to remove the ‘unsubscribe’ option ONLY in the first email that is sent out (while the recipient hasn’t yet confirmed his joining the list)?

    e.g: The first test email sent out from my site includes the following message:
    quote:
    If you do not want to receive any more newsletters,
    http://www.gurumai.com/members/?p=unsubscribe&uid=51f61944adfc1c55eec3bd9a96e98947
    :unquote

    The ‘unsubscribe’ option above should not appear in a email while the recipient has not yet confirmed his/her joining.

    This same ‘unsubscribe’ option should only be available in the subsequent emails after his/her confirmation.

    Any way out? (Hope, I have made my point clear).

    Thanks

    Try posting this question in the phplist forum - I’m sure someone can help you there

  25. ksin303 Says:

    Hi again!

    I have found a video on your site about setting up phplist. I see the demo page, and ok, i set up everything in the options menu. Then the video goes on to the phplist admin. I checked the address line, and i saw http://www.blabla.com/lists/admin. i have no such file or dir on my server. So i couldn’t get any closer to the solution. Maybe that domain redirecting thing is the key. I tried both domains, but they don’t work as an admin surface, i always get 404.
    So i still need help:)

    THank you!

    ksin303

    This is a common problem. Note you must download PHPLIST from PHPLIST.COM in order for this plugin to work. This plugin integrates with that newsletter manager.

  26. Tina Winslow Says:

    I have the same problem as the first bloke. Installed beautifully and when I try to add myself to test, it says thanks but won’t put it in the database. I read the advice for the other two guys and made sure that’s still not the issue. I’m stumped.

    Any advice for me?

    Yes it appears phplist is not setup correctly per the following when I browse to your list:

    If you have just installed PHPlist and get this message, make sure that your Apache configuration has somewhere

    DirectoryIndex index.php index.html

    or that at least index.php is mentioned before index.html

  27. Cat Carter Says:

    I am trying to use PHPList for the first time and set up a test site. I have everything working properly except…

    When someone adds their name the list it is not sending any notification via e-mail to admin or the person signing up. It does show immediately that they are added to the list under my PHPList admin page and gives the correct “Thanks for signing up” after they add themselves to the list on my blog. Any ideas?

    Cat - make sure you have the “Skip Confirmation Email” option unchecked

  28. Steve James Says:

    For anyone who has everything set up, but the plugin does not actually submit to the database, make sure of one thing. Remember, whatever REQUIRED fields you have in a PHPList “subscribe page” needs to be mimicked in the plugin.

    I made the mistake of requiring a name, city and state in my “subscribe page” in PHPList but only required the name in the plugin. The result was that the plugin appeared to submit the data but it never made it to the database because of the “required fields” not matching between PHPList and the plugin.

    BTW: Thanks for the killer plugin!!!

  29. Barry Says:

    Barry - looks somewhat similar to the permission issue that Daniel had. Try adding a folder similar to what I suggested for Daniel that you have write access too
    Thanks for what looks like to be a brilliant program!

    I am getting the following error message when a user enters their email address:

    Warning: curl_setopt() [function.curl-setopt]: Unable to access in /home/users/MYUSERNAME/html/MYDOMAIN.com/wp-content/plugins/phplist.php on line 69

    I’ve obviously changed the capitalised details for privacy reasons. Any help would be great!

  30. Josh Says:

    I really like this plugin. However, with integrating it in WordPress and having it subscribe a user to RSS feeds…I have checked the option in PHPList to ask the user how often to get the update of the RSS feed, but when someone subscribes to the feed via my wordPress pages, it doesn’t set this option. I also don’t see how I can tell PHPList whether or not to use HTML or plain text. I do see the option to add attributes in the Plugins options, but haven’t figured out how it integrates with the RSS-specific option of “daily, weekly, monthly” RSS email updates. Or how to let them pick HTML or plain text.

    Josh - the optional attribute field only current support text box fields. Radio buttons aren’t supported, but if you are familiar with PHP you could hack the plugin to include these fields. See this post for a starting point.

  31. Jake Cola Says:

    Note to users: This plugin requires PHPLIST from phplist.com. It is not a fully functional email list manager. It’s merely a bridge between phplist and wordpress

    I installed the plugin without difficulty. The difficulty is making it work. First of all, thank you for the wonderful plugin. I’m sure there are a few things I must be doing incorrectly but this forum provides wonderful support.

    Okay, when I go to the PHPlist page, under options, I do not find an admin button for PHPlist. I can set a password, embed code on any page, enter a new subscriber, have it accept, but nowhere does the subscription show up.
    Neither does the subscriber receive a confirmation email. There is no http://www.xyz.com/lists directory either - not anywhere in the server tree.

    I’ve searched the site’s database and nothing is there either. Only because the plugin’s installation instructions indicate simplicity that I write about my difficulty.

    Somehow, I missed a step along the way?

  32. Barry Says:

    Barry - looks somewhat similar to the permission issue that Daniel had. Try adding a folder similar to what I suggested for Daniel that you have write access too
    Thanks for what looks like to be a brilliant program!

    I am getting the following error message when a user enters their email address:

    Warning: curl_setopt() [function.curl-setopt]: Unable to access in /home/users/MYUSERNAME/html/MYDOMAIN.com/wp-content/plugins/phplist.php on line 69

    I’ve obviously changed the capitalised details for privacy reasons. Any help would be great!

    Thanks for the advice. I created a directory that I have write access to and changed line 69 to the following: curl_setopt($ch, CURLOPT_COOKIEFILE, “/home/users/MYUSERNAME/html/MYDOMAIN.com/tmp”);

    Now I don’t get any error messages and it seems like the user is subscribed the newsletter but when I log into phpList I see that they have not been added.

    Am I doing something obviously wrong? I have double checked all the fields and settings seem correct…

  33. Patsoffice.com » Blog Archive » Amy’s New Site Says:

    [...] I’ve been looking at ways to integrate both Wordpress and Zen Cart with phplist. There are plugins out there for making it happen with Wordpress that look promising, but I have a few issues with [...]

  34. Eric Says:

    I just realized that the version of this script you have the instructions for shows a feature that i don’t see through my wordpress console, which is the allowance for adding multiple lists and the names of those lists. I just downloaded this like two days ago…is there a setting i missed to allow for this?

    Eric I just updated the script today 3/16/2008. Download it again and you should see that option

  35. eliot Says:

    hello, thanks for the great plugin!

    I was wondering if anyone might know how users registering for the blog could be automatically be subscribed to a PHPList newsletter? (i.e. when the user uses wp-login.php to register, the email address would also be send to PHPList).

    Thanks!

    Eliot - no I do not. It shouldn’t be too hard though. Take a look at my Phplist comment Plugin as a starting point.

  36. Penny Says:

    Thanks, Jesse for the plugin. I uploaded it and then realized I need PHPLISt for it to work. I downloaded it to my computer, but I do not know where to upload it inorder for it to work. Can you help me with this? I uploaded it to wp/content/plugins , but that produces nothing, so obviously I do not know what I am doing!! Where should I upload it to inorder for it to work. On the PHPLISt download page it also says download TGZ. Do I need that as well.
    Thanks for you help with my problem and thanks for the plugin.

    Sincerely, Penny

    The phplist newsletter manager does not belong in the plugin folder. Honestly I don’t remember the steps for installing phplist. Go to the forums and post your question - they should be able to help you out.

  37. ian Says:

    Hi, got the plug in and phplist installed - all is working great - thanks.

    However, it doesn’t look too good - I don’t know too much about css and don’t really know where to begin - Jesse or anyone reading this have some pointers on what to change. I need to make the input box smaller, remove the indent and have the submit button all on the same line.

  38. Patsoffice.com » Blog Archive » “Integrating” Wordpress and Zen Cart (and PHPList and Sphider) Says:

    [...] I don’t need) but it’s themeable and is simple for customers to use. There is a great plugin for integrating with Wordpress. The author, Jesse Heap, was really helpful with a problem that I [...]

  39. Christina Says:

    Hi Jesse,

    thank you for your great plugin! Everything works fine, except for one last thing I couldn’t figure out myself: Where can I change the text of the confirmation email?

    When I subscribe via the plugin I get an English confirmation email though I run PHPList in German. I’ve already translated the messages in the config area and in the subscribe page menu. When I subscribe via PHPList, the German confirmation email is used properly. Where do I find the email-text the plugin uses?

    Thanks a lot,
    Christina

    That should be set somewhere within PHPList configuration - that’s seperate from this plugin…

  40. Jonas Bendsen Says:

    Howdy. Thanks for the great plug in. Something I’m concerned about though…

    We have our PHPList set up for multiple lists. When a user signs up for a list, the plugin submits to the database and then the form is replaced with a thank you message. If the user then decides they would like to add their name to an additional list, they can’t access the submit form anymore (as it has been replaced by the “thankyou” message.

    Any suggestions?

    ps Many thanks to Steve James for realizing posting that the PHPList “required” fields must match the plug-ins “required” field. That was killing us.


    Jonas - On line 113 where the thank-you message is displayed you could add a link back to the form:

      echo ('<h3>Thank you for subscribing to our email list</h3>');
      echo ('<a href="$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] rel="nofollow">Subscribe to another list</a>');
    

    See if that works.

    Jesse

  41. Adam Goldsztajn Says:

    Hello…thanks for the plugin, wonderful. Just wondering if you have a suggestion, as I’m having a problem with install. I can get this working in a page no problem, but I cannot get it to appear in the sidebar. As a widget text box it won’t work. I added the code suggested to the sidebar.php file but it does not work. This code goes in the theme’s sidebar.php file? (I’m using the K2 theme v 0.9.6 with wordpress 2.5).

    Hi Adam,
    The plugin does not support widgets at this point. I really should add that support though.
    As far as the sidebar.php code just add the following code:

    < ?php
                $content = apply_filters('the_content', '');
                echo $content;?>

    It works fine in my version of wordpress (2.5.1) - so if it doesn’t work in yours it may be a conflict with another plugin. As a test try disabling all plugins except PHPLIST and see if it works.
    Thanks,
    Jesse

  42. Ben Hayes Says:

    Hi,

    Nice plugin.

    I found that using your method to output the form in the sidebar results in markup where the FORM is contained within a P tag. This makes no sense to me, and also causes the page not to validate (plus messing up my styles)… I took a look at your PHP and it looks like it’s maybe not something you did on purpose, but is the result of some interaction with the ‘apply_filters’ function?

  43. Ben Hayes Says:

    To sort out the problem I identified in my previous comment, I’ve just changed the code to insert in the template as follows:

    $content = apply_filters('the_content', '');
    $content = substr($content,3,-5);
    echo $content;
    

    The substr() call will remove the unnecessary paragraph tags. Finally there is a small mistake in your phplist.php plugin file - the hidden input element is missing a slash before the closing tag. If you fix this too then the markup will validate as XHTML.

    Hi Ben,
    I’ve had this problem with some of my other plugins. Apparently apply_filters calls a function called wp_autop which will add these paragraph tags.

    I’ve overcome this by commenting out the following line in default-filters.php:

    add_filter(‘the_content’, ‘wpautop’);

    Alternatively there are plugins you can use to disable this feature.

    Your method will also work as well. Thanks for sharing. And thanks for identifying the HTML coding mistake!

  44. Email Marketing - Webtrepreneur - Make Money Online Says:

    [...] PHPList Form WordPress Integration plugin - meets many of the requirements, but requires installation and management of separate application. [...]

  45. Nael Says:

    Perfect, follow the steps as details. Works like a charm.

  46. Matt Fox Says:

    First, just installed this and am looking forward to using it.
    Is there a way to register people as subscribers for the site when they submit your form to PHPList? This doesn’t appear to do that and would be a wonderful benefit.

    Thanks.

    That’s a good idea Matt, but I haven’t implemented it yet. Technically it’s certainly feasible, and I’ll put it in my enhancements list

  47. James Says:

    Good solution, Ben. Works like a charm.

    And thanks for the fantastic plugin, Jesse.

    -James

    Glad you were able to get it to work James!

Leave a Reply