Donate buttons now live.

|

My idea of putting a donate button on web pages that users arrive at after coming from Google or other search engines is now online. The process wasn't simple as there doesn't seem to be a plugin for Movabletype to include this sort of information. The steps I took are in the extended entry.

Paypal donate buttons are available and by using the custom code I got the "email link" option that gives me the url to donate for my website.
I then found a php script that checks to see if the referrer was a search engine. Many thanks to Tellinya for the code to do this. I included all of the code up to and including the $se=seReferer line in a seperate php file stored on the server.
Then in the MovableType templates I decide where I was going to put the button - underneath the Posted By tag seemed a good place. I worked out what text I wanted to put in this location.
As it is possible to obtain the page title from MovableType I was able to pass this along as one of the parameters to Paypal. As MovableType code is not available to PHP I had to start the text and the first part of the link to Paypal in PHP, break back to the MovableType <$MTEntryTitle$> tag and then finish off the link.
I ended up with the following code in the linked file (it is easier to link to the file than to get it to fit in this webpage)
I then rebuilt the template and everything works - now to see if anyone actually bothers to donate!

Categories

Pages

Powered by Movable Type 4.1

About this Entry

This page contains a single entry by published on January 1, 2008 6:51 PM.

Popular posts from 2007 was the previous entry in this blog.

Flickr RSS feeds is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.