Integrating phpList with WordPress

"WordPress is an open source blog tool and publishing platform powered by PHP and MySQL. It's often customized into a Content Management System (CMS). It has many features including a plug-in architecture and a template system. WordPress is used by over 13% of the 1,000,000 biggest websites". Source: http://en.wikipedia.org/wiki/WordPress

Prerequisites

For this section, we'll make the following assumptions:

  • We already have a working instance of WordPress (version 3.x)
  • Our phpList site is accessible through HTTP / HTTPS from our WordPress site

Installing and configuring the phpList Integration plugin

Download the latest version of Jesse Heap's phpList Integration plugin from http://wordpress.org/extend/plugins/phplist-form-integration/, unpack it, and upload the contents to your wp-content/plugins/ directory in WordPress.

Activate the plugin from within your WordPress dashboard:

Installing and configuring the phpList Integration plugin

Under the Settings menu, click on the new PHPlist link to configure the plugin:

Installing and configuring the phpList Integration plugin

General Settings

Under the General Settings heading, enter the URL to your phpList installation, as well as an admin username/password combination. Enter the ID and name of at least one list that you want to allow your WordPress users to subscribe to:

General Settings

Tip

Why does the plugin require my admin login and password?

The admin login and password are used to bypass the confirmation e-mail that would normally be sent to a subscriber. Effectively, the plugin "logs into" phpList as the administrator and then subscribes the user, bypassing confirmation.

If you don't want to bypass confirmation e-mails, then you don't need to enter your username and password.

Form Settings

The plugin will work with this section unmodified. However, let's imagine that we also want to capture the subscriber's name. We already have an attribute in phpList called first name, so change the first field label to First Name and the Text Field ID to first name (the same as our phpList attribute name):

Form Settings

Adding a phpList Integration page

The plugin will replace the HTML comment<!--phplist form--> with the generated phpList form.

Let's say we wanted our phpList form to show up at http://ourblog.com/signup.

Create a new WordPress page called Signup, add the content you want to be displayed, and then click on the HTML tab to edit the HTML source:

Adding a phpList Integration page

You will see the HTML source of your page displayed. Insert the text "<!--phplist form-->" where you want the form to be displayed and save the page:

Adding a phpList Integration page

Tip

HTML comments

The "<!--some text-->" syntax designates an HTML comment, which is not displayed when the HTML is processed by the browser / viewer. This means that you won't see your comment when you view your page in Visual mode.

Once the page has been updated, click on the View page link to display the page in WordPress:

Adding a phpList Integration page

The subscribe form will be inserted in the page at the location where you added the comment:

Adding a phpList Integration page

Adding a phpList Integration widget

Instead of a dedicated page to sign up new subscribers, you may want to use a sidebar widget instead, so that the subscription options can show up on multiple pages on your WordPress site.

To add the phpList integration widget, go to your WordPress site's Appearance option and go to the Widgets page:

Adding a phpList Integration widgetinstallation, phpList Integration pluginpage, adding

Drag the PHPList Integration widget to your preferred widget location. (These vary depending on your theme):

Adding a phpList Integration widgetinstallation, phpList Integration pluginpage, adding

You can change the Title of the widget before you click on Close to finish:

Adding a phpList Integration widgetinstallation, phpList Integration pluginpage, adding

Now that you've added the PHPList Integration widget to the widget area, your sign up form will be displayed on all WordPress pages, which include that widget area:

Adding a phpList Integration widgetinstallation, phpList Integration pluginpage, adding
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.66.185