I had a tell-a-friend script on my old blog. But Wordpress doesn’t have anything like that, not even in plugin form. So I wrote a quick one. This script is extremely simple. It works but there are no checks, validations or contingencies built into it. So don’t kill me, I’m still on page 28 of PHP for Dummies (”Concantenating is not a Mexican dance”). Caveat emptor, you have been warned.
The script is meant for use with single post pages. It does not have to be in the Loop, so it can be placed in the sidebar of single.php. If you put it on index.php (or any other page), it will simply send the url and page title of the first post you ever made (not good). If I was informing Madame X of this post, the message the script sends out is formated like this (but you can change it where appropriate to suit your taste):
Subject: Have a look at this blog page, Madame X
Message: Hi, Madame X, I found this interesting post on Tim Yang’s Geek Blog called “Howto: Tell-a-friend script for Wordpress” that I thought you would also find interesting. It’s at timyang.com/2005/07/howto-tell-a-friend-script-for-wordpress.
Signed, Tim Yang
Here are the instructions.
(Click here to read the rest on the article page…)