Pushing the eBook site
I wanted to push the eBooks site a little more than I have been. As the readers of this blog are a perfect for the subject matter of the eBooks, I decided to make a couple of changes to this website. Have you noticed them?
Change 1 was to take all of MY posts and replace the usual footer with a new one! It was quite easy and consists of a piece of code to determine the post author and a piece of PHP code to display an eBook Cover on a random basis.
The usual footer looks like this;

On my posts, the footer looks like this;

As you can see, quite a difference! It is also possible that the graphic that shows might be one of the other eBooks that I have available. This was actioned using a small piece of PHP code to grab filenames that have a certain "name", then print out a random filename that matches. 2 lines of PHP code. Easy as 123.
The actual code that determines the author is also rather simple;
-
if ((is_single()) && ((get_the_author() == "burt"))) {
This code was added to the template (footer.php) file. Obviously, you would want to change the username to suit your own name!
Change 2, I just this moment actioned so have not tested to see if it works. I hope it does. I simply amended the Wordpress RSS feed to add in an extra "item", as follows;
-
<item>
-
<title>GET YOUR FREE EBOOK TODAY! LEARN SOMETHING NEW...</title>
-
<description>Get a quality eBook for FREE each and every month. Sign up at www.ideasfestival.org - it's free and simple!</description>
-
<link>http://www.ideasfestival.org/?rss</link>
-
</item>
I added this right above the following code in wp-rss.php
-
</channel>
-
</rss>
It looks as though it works, as I now see this in Firefox Live Bookmarks;

However, I am unsure if other feedreaders will see the same effect! If anyone is using other feedreaders, please let me know whether or not you see 5 blog links + 1 "free ebook" link in your feedreader... Thanks!

Comment by Chance — September 10, 2007 @ 7:32 pm
It reloaded your last 6 feeds with the ad at the bottom in Google Reader- Also, you are doing partial feeds now- I don't know if that was intended or not, but I liked the full feeds better :p
Good idea though- I like the idea of automatically inserting it, and its not that obtrusive provided it does not do the whole "last six feeds and an ad" every time you make a new post in my reader.
Comment by Gary — September 10, 2007 @ 9:20 pm
JC, partial feeds wasn't intended. I'm not quite sure how that happened. Will look at it tomorrow…
Thanks for letting me know.