NP_PHPList.php

Plugin Frontend for PHPList v 2.10.4

General Plugin info
Author: blvrs2
Current Version: 0.9.5
Download: NP_PHPList.zip size, 16kb
Code: code
Demo: -
Forum Thread: NP_PHPList thread

New

  • use of the MDB2 implemention to access mysql database

prerequests

  • an installed and functional version of Nucleus CMS v 3.23 or 3.24 (tested with these versions)
  • an installed and functional version of PHPlist v 2.10.4 (download it from here)
  • phplist installed on same folder level as nucleus. if nucleus is installed in the root folder of your website then so should PHPList.
    • PHPList and Nucleus CMS using the same Database.

Installing

Note:

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin…
  3. Configure the plugin through the administration site of nucleus. Make sure the locations are correct.
  4. Add a blog to the nucleus cms (p.e. called lists)
  5. Edit the skin part 'Main Index' used for the blog you just made and add the skinvariable <%PHPList()%> in the place where the public pages of PHPList should appear.
  6. Rename the index.php file in the PHPList folder to index.php .phplist for later use. And make a new index.php that looks like this …..
<?php
 
$CONF['Self'] = 'index.php';
 
include('../config.php');
	selectBlog('lists');
selector();
 
?>

Yup, that is the same, nucleus is proposing you when you add a blog called lists.

How to use the plugin

The plugin is a replacement of the index.php / public frontend of PHPList. It uses all the data PHPList normaly is using. So to configure your frontend, just configure in PHPList a subscribtionpage, and more. In the 'edit options' of the plugin in the Nuclues admin site you can change the text that is displayed by the plugin. See the Options section for explenation.

Available SkinVars and/or TemplateVars

  • Use the Skinvar <%PHPList()%> in the skinpart 'Main index' of the skin that is used to display the created blog in the installation steps above.

Options

Below is a table with an explenation of each option on the 'edit options' page of the plugin.

Option What it is used for
Update the plugin options on next call of this plugin. The plugin uses this update trick to save known option values.
Note: Check at least the next 2 options
Location path after base url http://www.yourdomain.tld/To build the URL's that the plugin is displaying. p.e. the `startpage` and the `unsubscribe` link
Full path to PHPlist locationThe full path to the PHPList installation, something like /home/users/yourdomain.tld/www/lists
Default text to display
Under construction / out of order message:Some plugin versions don't support all the user pages of phplist. This message will be displayed when this is the case.
Welcome message on main page. Only used when there are 2 or more active subscribepages
Text to display after checkbox for HTML-formatWhen on the subscribepage detail page a checkbox is defined to display. This will be the text shown next to it.
Text to display after checkbox for text-format(same as above)
Welcome text for the unsubscribepage
Text to display for unsubscribe e-mailThe label or text to display before the e-mail input field on the unsubscribe page
Text for the unsubscribe buttonText to display on the button from the unsubscribe page
Text for unsubscribe link on every pageEach NP_PHPList page has 2 links on the bottem, this is the text to display for the unsubscribe link
Text for startpage link on every pagesame as above, but then for the startpage link
Warning message to display when a blacklisted user is subscribing.
Goodbye message after unsubscribe, use [EMAIL] to place e-mail addressAfter a user unsubscribes from PHPLists, this is the message that will be displayed. USE the placeholder [EMAIL] anywhere in the message to display the users e-mail adres.
Thank you message on reaction of user confirmationPHPList normaly uses the same thankyou message when a user subscribes and when a user confirms. NP_PHPList has a seperate thank you message if someone is confirming. (to edit the thankyou message after subscription, see the edit options of the subscription page in PHPList)
Announcement of the lists to choose fromSentence on the subscribeform before a listing is given lists a user can subscribe to
Message to ask user to warn webmasterThe plugin logs errors to the Actionlog of nucleus. When that is the case, this message will be shown to the user
Message to warn when uid is invalidWhen an invalid uid in given in the url, then this will be the message to be displayed
HTML message to display when confirmation failed. Use [EMAIL] to place e-mail address.
Warning to display when required fields are not filled in.Tnis message will be shown through a javascript that checks the subscribe/preference forms, when required fields are not filled in
Warning message when e-mail fields do not contain same address.
HTML message to display when user changed it's e-mail address
HTML message to show after preferences are changed.
Text to display on subscribe button
Text to display on button of the preference page.
E-mail address of administrator to notify.
Always notify admin. This overrules all notify admin options set below.
Notify admin of PHPList subscribtion.
Notify admin of user subscribe confirmation to PHPList.
Notify admin of user profile changes in PHPList.
Notify admin of user unsubscribtion of PHPList
Add new list members to pre-specified list ?Use this option to subscribe new members to a stealth list
Name of pre-specified list.

Inside the plugin

the plugin uses the PEAR::DB layer to connect to the PHPList database. PHPList and Nucleus can share the same database as long as the prefix of the tablenames are different (this is the situation with a standard installation). During development I noticed that Nucleus lost the connection to the database when PHPList is connecting to it's database. This happens when they both use their own database. The plugin detects if this is the case and will reconnect to nucleus when it ends the script and when it logs to nucleus actionlog. So anything that is called by nucleus after this plugin will work normaly.

Tips and Tricks

  • The plugin logs configuration errors to the actionlog of nucleus. The visitor of the webpage sees a warningmessage that he or she should contact the webmaster.
  • If you want to have the same skin for the created blog 'lists' and your normal blog, then use a code like this in your skin part 'main index'
  <%if(blogsetting,bshortname,lists)%>
  		<%PHPList()%>
  <%endif%>
  
  • For having a sepperate blog to archive your newsletters and to use it as a frontend for PHPList. Use the following code to display the frontend in the general category of. And see this forum thread.
   <%if(blogsettings,bshortname,lists)%>
   		<%if(category,catname,general)%>
   			<%PHPList()%>
   		<%endif%>
   		<%if(category,catname,newsarchive)%>
   			<%otherblog(lists,[templatename],10,newsarchive)%>
   		<%endif%>
   <%endif%>
   

Wishlist

  • Implementation of placeholders [CONFIRMATION] and [USERDATA] when a user makes changes in it's profile.
  • assigning <div> id's and or classes and document it.
  • announcement on forum
  • showing off with demo
  • notify administrator when user subscribes, confirmes, changes, unsubscribes
  • resend preference url to user with an e-mail request form

Bugs

  • (yet) unknown

History

  • Version 0.9.5, released 11 apr 2008
    • changed the use of DB.php to MDB2.php
  • Version 0.9.2.1, released 28 sep 2007
    • removed a call to a debug code
  • Version 0.9.2, released 15 sep 2007
    • implementation of plugin option update trick.
    • notify PHPList administrator of subscribe,unsubscribe, changes etc… of PHPList users
    • added standard (stealth) list subscribtion for new members
  • Version 0.9.1, released 22 jun 2007
    • added administrator notification e-mails
    • implemented plugin option update trick. For more info see this page
  • Version 0.9.0.3, released 1 jun 2007
  • CHANGED: first public release
np_phplist.txt · Last modified: 2008/04/11 13:27 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki