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!