Adding your Google Reader 'shared items' to your site (old, probably outdated)

Warning: This page is pretty old and was imported from another website. Take any content here with a grain of salt.

In order to display the Google Reader ‘shared items’ on your site - using straight (X)HTML and not just the javascript widget supplied by Google - you need a tool that can read RSS feeds and display them (the shared items are an Atom feed, but that is similar enough). Using straight links instead of javascript you will be able to pass “link-value” to the items that you are linking to - your links will be seen as recommendations (as in my opinion they should be, if you tagged those items to be shared). I opted to use the Magpie RSS PHP parser (archive.org). However, you will have to do a slight modification of one of the files in order to process and display the feed properly.

With the original files, Magpie will combine the original URL of the post with the URL of the site itself (and similarly the title of the post with the title of the site). One solution would be to use Feedburner’s “feedconvert” feature to convert the feed with the shared items from Atom into a normal RSS feed - however, by doing that you will lose the title and URL of the site (only keeping the title and URL of the post).

The Magpie files are also included in the Wordpress installation (in /wp-includes/rss.php), instead of modifying them (and asking for trouble the next time you update Wordpress) I decided to create a copy of Magpie and modify that. The changes aren’t very complicated.

The steps required to set this up are:

  1. Download a copy of Magpie from SourceForge (archive.org) as well as my modifications and test page
  2. Create a folder on your website for Magpie, place Magpie there.
  3. Create a folder for the cache (otherwise it will try to get the feeds every time the page is accesses), adjust the folder permissions to allow your code to write to it.
  4. Modify the test page (use your feed instead of mine, set the cache folder properly) and try it out.
  5. Copy + paste part of the code into your site’s template, add the CSS to your site’s stylesheet.
  6. Done! Start sharing items :-)

The current version of these modifications is v1.0 from July 28, 2007.

Warning: This page is pretty old and was imported from another website. Take any content here with a grain of salt.

Comments / questions

There's currently no commenting functionality here. If you'd like to comment, please use Twitter and @me there. Thanks!

Tweet about this - and/or - search for latest comments / top comments

Related pages