Skip to content

Puffbox

Simon Dickson's gov-tech blog, active 2005-14. Because permalinks.

2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005

Code For The People company e-government news politics technology Uncategorised

api award barackobama barcampukgovweb bbc bis blogging blogs bonanza borisjohnson branding broaderbenefits buddypress budget cabinetoffice careandsupport chrischant civilservice coi commentariat commons conservatives consultation coveritlive crimemapping dailymail datasharing datastandards davidcameron defra democracy dfid directgov dius downingstreet drupal engagement facebook flickr foi foreignoffice francismaude freedata gds google gordonbrown governanceofbritain govuk guardian guidofawkes health hosting innovation internetexplorer labourparty libdems liveblog lynnefeatherstone maps marthalanefox mashup microsoft MPs mysociety nhs onepolitics opensource ordnancesurvey ournhs parliament petitions politics powerofinformation pressoffice puffbox rationalisation reshuffle rss simonwheatley skunkworks skynews statistics stephenhale stephgray telegraph toldyouso tomloosemore tomwatson transparency transport treasury twitter typepad video walesoffice wordcamp wordcampuk wordpress wordupwhitehall youtube

Privacy Policy

  • X
  • Link
  • LinkedIn
  • 14 Sep 2010
    e-government
    dfid, guardian, rss

    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.

Proudly Powered by WordPress