Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Using Phplist for a newsletter in Textpattern

I have managed to include the Phplist newsletter in my site. Here were the steps involved.

1. download phplist from the site and install it in your server. You can install it in your txp database or on another location and/or database as I did. You will find the installation instructions in the phplist site.

2. configure the php list following the instructions from their site.

And here is how to incorparate it with txp (i use rc1)

1. Go to the Presantation/Pages tab and insert the js in the body

Note that I have the newsletter in a folder called lists in my site root so do edit the routes below as per your folder name… whatever

<script language="javascript" type="text/javascript">
<!--
function setToUnsubscribe()
{
    document.subscribeform.action = "/lists/index.php?p=unsubscribe";
    return true;
}
function setToSubscribe()
{
   document.subscribeform.action = "/lists/index.php?p=subscribe";
   return true;
}
//-->
</script>

2. Find the place you wish to have the email field the subscribe and unsubscribe buttons.
The is what you need for the required field to function in txp.

*note that I only use one list so list[ 1] is that list.
Also the line below ‘listname[ 1]” value=”Interdisciplinary Arts News” should be edited according to your list too*

Also note that you should delete the space before the 1 in listname and list. I included them here so as to have it readable

<form method="post" name="subscribeform" action="/lists/index.php?p=subscribe">
<input type="hidden" name="htmlemail" value="0"/>
<input type="text" name="email"/>
<input type="submit" value="Unsubscribe" onclick="javascript: setToUnsubscribe();" name="unsubscribe"/>
<input type="submit" onclick="javascript: setToSubscribe();" value="Subscribe" name="subscribe"/>
<input type="hidden" name="list[ 1]" value="signup"/>
<input type="hidden" name="listname[ 1]" value="Interdisciplinary Arts News"/>
</form>

3. Apply styles as per your preferences to the fields above.

let me know if i missed anything

Article Request Count:
Initially released:
2005-03-31
Posted here:
31 Mar 2005

You know you want to visit the Archives.
Published with Textpattern