DFID's blogs feed new Guardian site


With the kind assistance of the Bill & Melinda Gates Foundation (I think he used to be big in computing or something), the Guardian has launched a new (sub)site dedicated to global development. And quite remarkably, it features regular contributions by UK civil servants.
In fact, it’s feeding (literally) off the DFID Bloggers site, built by Puffbox nearly two years ago (!). It pulls in the latest handful of stories from the DFID site’s RSS feed, and displays them in a cute little animated box. Pretty much what the DFID homepage itself does…
… except that the DFID homepage does something a little bit cleverer. As you’ll see, it carries not only the title and description – typical of any RSS feed; but it also shows the author’s face and job title, neither of which are standard RSS elements. It also turns the blogger’s name into a link to their personal blogging archive. Cool, eh? – dead easy, actually.
We do this with the aid of a little WordPress magic. The author photo is uploaded into WP using a plugin called User Photo; but Simon Wheatley and I worked on a ‘meta plugin’ to ensure these photos would be square, and hence more predictable to work with. And before you ask, yes, the meta plugin was indeed made available at wordpress.org… and has been downloaded over 3,700 times as I write this.
(The job title is an additional field added to the user profile; at the time, we did that with a custom plugin, but now I’d probably use this code by WP guru Peter Westwood.)
We then call this extra info – where available – into the RSS feed with a custom function, using the rss_item hook. (It’s all formatted using the standard MediaRSS extension, originally by Yahoo.) And so, each time a new post is added to the DFID Bloggers site, the DFID homepage can extract all the data it needs from the RSS feed, and slot them into the appropriate box.
… which is a very roundabout way of demonstrating that, contrary to what you may have read lately, there’s plenty of life in RSS yet.