Stopping PHPlist from sending a unsubscribe confirmation

Update 14 April 2015:

The position of this bit of code in recent versions of phpList has shifted a bit since this post was written and looks slightly different. In our instances of phpList, we found commenting out line 837 did the trick. The code snippet should look something like:

//   #sendMail($email, getUserConfig(“unsubscribesubject:$id”), stripslashes($unsubscribemessage), system_messageheaders($email),”,true);

Original post below.


 

We love the open source mail list management software PHPlist- although it’s interface is horribly confusing.

One thing we don’t love is it’s insistence on sending an “Unsubscribe confirmation” when you click the link to remove from the list. We get it- you don’t want e-mail from us anymore, no need to send one more.

To do this- comment out lines 658 and 659 of index.php in PHPList in version 2.10.7

the code should look something like this:

//#  sendMail($email, getConfig(“unsubscribesubject”), stripslashes($unsubscribemessage), system_messageheaders($email));
//#  $reason = $_POST[“unsubscribereason”] ? “Reason given:\n”.stripslashes($_POST[“unsubscribereason”]):”No Reason given”;

That should solve your problem.

Continue reading →

Posting Usable Code in WordPress With No Plugins

Due to the fact that Worpress decided to get rid of the “Press It” function until 2.6, I have recently had the need to post the code that will allow you to use the “Press It” feature on your own.

As it turns out, it is supposedly very hard to post code in WordPress. If you just copy and paste your code in, WordPress will turn your quote marks into “Smart Quotes”. They look pretty, but do not work with code. So I set about finding a plugin or some other method to correct this.

Everywhere I looked people were recommending different methods. From using plugins and custom fields, to manually editing, and to online converters. I tried them all, but they either didn’t display the code correctly, or messed up my formatting site wide.

So here is my solution, it may have been suggested before, but I sure couldn’t find it with hours of searching and testing. Simply insert this code into your style sheet:

pre {
width: 95%;
overflow: auto;
padding: 10px;
margin: 1em auto;
font-family: "Courier New", Courier, mono;
background-color: #ddd;
color: #555;
border: 1px dotted #999;
}

Now, when you paste your code into the WordPress editor, highlight it, and select the preformatted option from the “Format” drop down menu.

location of the format menu in the wordpress post editor

The pre tag will preserve your quote marks, spacing, indenting, and other elements.

And thats all you have to do. Your code will work when copied and pasted from the browser. If you have a long line of code, instead of running over everything, this will make a horizontal scroll bar to contain it.

Note: WordPress may apply separate <pre> tags to each line when you select it from the drop-down menu. (I have no idea why, it defeats the whole purpose of <pre> tags) To get around this, either manually add <pre> and </pre> before and after the text under the HTML tab in the edit screen, or apply the formatting with the code all as one line, and add the line breaks in afterward.

Continue reading →

Tips on doing a Fantastico upgrade on WordPress 2.3.1

Today we got the notification that netenberg had released the Fantastico updates for WordPress 2.3.1 after having 2.2.2 for the longest time. We’ve recently started using Fantastico to set up our initial installs of WordPress, but had done upgrades manually. Today, we tried the auto update feature for the first time- and have this warning: MAKE SURE TO DEACTIVATE ALL PLUGINS BEFORE RUNNING UPDATE. We’re not totally sure this guarantees an un-borked update, but, we’re pretty sure it helped after we reinstalled.

Fantastico is a script that runs from Cpanel on our server to help you automagically install a whole bunch of different Open Source software. It’s really handy, but, be prepared to be at least 30 days behind on most update packages (37 in this case).

Our main reason to switch to 2.3.1 was to familiarize ourselves with the new version of WordPress before the next seminar, but, I’ll give you the immediate highlights:

  • ST Visualize Advanced Features plugin  is no longer required- giving everyone access to different levels of CSS tags, the paste from Word function, clean up mess code function, type color, etc.  It’s been a plugin we couldn’t live without- esp. for the glyph finder- so it’s easy to find the ©®™½€ etc.
  • The plugin list now tells you if there is a newer version! Long overdue.
  • The tag feature helps you organize your posts and categories with yet another tool.

I’m sure we’ll discover other great features as we explore- but, as a warning to all- always disable plugins before updating.

Continue reading →