Simon Dickson has been blogging about online government, politics and WordPress since 2005. Some important people read it.

 
 

Archive for 'wordpress'


Friday 18 May 2012

Code For The People presents: HMG’s Olympic & Paralympic media centre

The run-up to the Olympic Games starts in earnest today, with the arrival of the flame on British shores - and Whitehall is opening up its dedicated Government Olympic Communication operation, providing 'a single point of contact for London 2012-related media enquiries ... until the end of the Paralympic Games on 9 September.' There's a dedicated press team, drawn from across Government - and a dedicated website, which I'm genuinely proud to say we built.

DCMS asked us for a site which could draw together the many streams of information - text, photo and audio - already being produced in government, and make them easy for journalists to explore. Many departments were issuing press briefings, or posting fantastic material on Flickr or YouTube, but there was no easy way to browse through it, or conduct targeted searches.

Cue some WordPress-powered magic. :)

A trained eye will spot our heavy use of custom post types. Some, like 'backgrounder' were fairly straightforward, identical to posts or pages, but separated out for convenience. Others, like 'theme' and 'region' were more complex - and were also sync'ed up to custom taxonomies, allowing us to 'tag' other post types as being relevant to a given theme/region. We then interfere with WordPress's default selection of display templates, to show collated results pages: editorial on one side, search results on the other.

Here's an example: a 'theme' page, showing relevant results from the other post types.

There are specific custom post types for photos - specifically Flickr; and videos - specifically YouTube. (Why these two? Because pretty much every department is already using them.) And in both cases, we've written custom code to interface directly with the host sites' APIs, making the process of adding new material a breeze.

Let's take YouTube, for example. Editors simply click 'Add New', then paste the URL of a YouTube clip's page into a clearly labelled box. We extract the clip's unique ID, then query the YouTube API to get its thumbnail, which we save as the WP post's featured image; and the YouTube-recommended embed code. Couldn't be easier.

Then, when you view the clip's page on the site, the video gets embedded automatically - and we display the YouTube embed code, for journalists or bloggers to take away to their own sites.

We let the journalists and bloggers customise the embed's dimensions via an ajax call back to YouTube; so if you need a clip to be a certain size, we'll recalculate the width and height accordingly. We store your preference using a cookie - meaning that now, every time you look at a video page, the embed code is pre-customised for you. :)

Then there's the multi-dimensional search function. Each post type has a number of taxonomies associated with it: theme, region, originating department, and so on. So when you're browsing, say, the photo archives, you can specify that you want photos on a given theme... or from a given region... or by a given department... or in a given month. Individually, or in combination.

It's the first time we've tackled this kind of 'advanced searching' functionality, and it probably doesn't sound all that complicated: but I can assure you, it is. :)

It's also the first time we've delivered a responsive design on a client site. We originally planned three versions: phone, tablet and desktop. But a late change of code base, and (to be honest) questions over its real value, led us to drop the tablet view. For the most part, it's just been a case of un-floating the various blocks in the layout grid - but a few elements, like the primary navigation and homepage carousel, needed a bit more work. Give it a try if you've got a smartphone handy; or resize your (non-IE) browser to a really narrow size. It should kick in at 480px width.

Behind the scenes, working with our very good friends at CatN Hosting, we've added a Varnish cache - just in case there's a sudden huge leap in traffic. Hopefully it won't ever be required. But for the same reason they're putting missiles on top of east London tower blocks, we're planning for a worst-case scenario.

My thanks to Nick at DCMS/GOC for commissioning us, and protecting us from the internal wrangling. To Joe at CatN, for leaping into action when called upon, and for very kindly volunteering to help with Varnish. And to the G-Cloud process, directly and indirectly, for its help in buying Joe's services. To the other clients who, knowingly or not, contributed ideas and code to the site's development. But most of all, to designer Laura Kalbag, who developed the visuals and did the bulk of the front-end functionality. You're all wonderful.

Let the Games begin.

This has been a Code For The People production.

Add a comment

Thursday 17 May 2012

BuddyPress powers new Civil Service community site

There's a new website in the civilservice.gov.uk domain - but because it's at a subdomain, of course, it doesn't count as a 'new' site. (That's an observation, not a criticism; I'm as guilty of doing this as anyone.)

Created by DWP 'in their role as leaders of Govt agile adoption on the ICT Strategy CIO Delivery Board', it's a community site which sets out to provide a space for 'people in the public and private sectors to discuss, share and get advice and answers on adopting agile in UK Government projects'. As such, it ticks a box from the ICT Strategy Implementation Plan.

Naturally I'm delighted to see they've built it using BuddyPress. It looks like a fairly 'vanilla' installation for the moment, running using the free BuddyPress Corporate theme, with minimal customisation. I've also spotted the Q&A premium plugin in there too. The IP address reveals it's the handiwork of Harry Metcalfe's DXW crew.

They're doing the right thing by just charging headlong into it; it seems like all the Facebook-esque functionality - personal profiles, groups, forums (?), friending, etc - has been enabled. Some of it will work, some won't. But since it's all in there already, you may as well give it a try.

I'd also endorse the decision to work with a ready-made theme: I recently looked into developing a BuddyPress theme from scratch, and soon gave up on the idea. It's terrifying. If you really want to customise the look & feel, do it as a Child Theme.

The fate of any BuddyPress is dictated by the momentum it builds (or fails to build). The site, or more accurately its membership, needs to provide good enough reason for people to come back regularly, and contribute while they're there. I wish them well.

We've got a BuddyPress-based government project of our own in the works; the development work is close to completion, but we're facing a few bureaucratic hurdles. I'm hoping for progress in the next couple of weeks; naturally, I'll blog about it in due course.

Add a comment

Wednesday 8 February 2012

Going in 60 seconds

In a single sentence, Stephen Hale's latest blog post encapsulates the sheer joy of moving from a classic old-style CMS to WordPress.

By switching out Stellent for WordPress as our primary content management tool, we changed the processes by which web content was created and published. Editors no longer needed the same in-depth knowledge of the CMS to publish content, it was possible to publish more quickly, and it was much easier for us to devolve the act of publishing. The day-long CMS training course for new editors was replaced with a 1 minute (I timed it) session showing staff how to click on “add new” and type in a box.

From what I hear, the GDS training course for those publishing on the new unified platform is going to take a _little_ longer than that.

Tuesday 7 February 2012

New plugin embeds gov.uk forms within WordPress

Saul Cozens has done a wonderful thing. He's written a WordPress plugin which allows you to integrate content from the new gov.uk site within WordPress pages. You add a WordPress shortcode, of the form:

[govuk url="https://www.gov.uk/vat-rates"]

It pulls in the corresponding JSON data - which is really just a case of adding .json on the end of the URL - and plonks it into your WordPress page. So far, so not tremendously complicated.

Here's the good bit. No, sorry, the fantastic bit. Not only does it plonk the text in, it can also plonk forms into place. And keeps them active as forms. Yes - actual, working forms.

My screenshot above is taken from my test server: no offence Saul, but I'm not putting a v0.1 alpha plugin on my company site! - but it shows me successfully embedding the Student Finance Calculator 'quick answer' form within my current blog theme, and sending data back and forth. Sure, the CSS needs a little bit of work... but Saul's concept is proven.

Game on.

Sunday 27 November 2011

WordPress comes ‘home’: France holds its first WordCamp

It seemed like fun. A quick jaunt over to Paris, to attend their first WordCamp proper. A chance to put my French to its toughest test in 17 years. A chance to attend a WordCamp as an ordinary punter, rather than as an organiser. And a good opportunity to check up on the neighbours.

The venue: the cinema-esque Studio Raspail

Paris has a well-established barcamp-style event each year, and will continue to do so, but was (according to host Amaury Balmer) the only country in the world not to have a formal WordCamp. And as if to underline the increasing professionalisation of WordPress, they decided to hold it on a Friday, starting at 9:00am. Or effectively, if your brain has only just got off the Eurostar, 08:00am. Thankfully, black coffee was provided.

First speaker of the day, appropriately enough, was Michel Valdrighi - you've probably never heard of him, but he's the Frenchman who ultimately gave WordPress to the world.

Michel Valdrighi, the absent father of WordPress

Michel was an early convert to the joys of blogging, but couldn't find a platform which ticked all his boxes. A month after he wrote his first lines of PHP code, to create a dictionary of the Corsican language, he started on his own blogging platform - Blogger 2, or b2. A version 1.0 release was written, but never released; then came unemployment and a bout of depression, and he walked away from it all. Which led to a conversation between this guy and this guy, which led to... well, you can probably pick the story up from here yourself.

And then - ironically - having set the day's wheels in motion, Michel more or less disappeared. A shame, as I was dying to hear more. (I believe he returned for the social side later, but I'd gone by then.)

'I stammered, forgot half what I wanted to say, improvised the rest. Stress.'

Francis Chouquet was up next: a web designer who also has a premium themes business (Peaxl), and has written a book on WordPress development. He talked about the market for premium themes, where apparently 2/3 of purchases are by resellers; and why he had ultimately opted to build a team to create premium themes, and a custom platform from which to sell them.

Francis Chouquet

His key point was that a theme shop needed distinct skills: creative, technical, marketing and support. You had to have a fighting spirit to make it work, he explained; but it was important not to lose the pleasure which made you do it in the first place.

Julio Potier

He was followed by Julio Potier, who gave a very assured talk on theme and plugin vulnerabilities, and how not to get caught by them. He listed the various well-known plugins he'd found issues in, even certain security plugins! - and described the various levels of interest shown by the original developers. Some were grateful for the tipoff, some were hostile, some simply weren't bothered. Cautionary tales a-plenty.

With each slot lasting a full hour - not something I'm planning to recommend for future UK events, we were already nearing lunchtime. Next up was the youthful Aurélien Denis, who runs French-language tutorial site wpchannel.com, talking about recent WordPress enhancements which made it more of a CMS. People were wrong to say WordPress was a system conceived for managing blogs, he concluded; in fact, it was much more than that.

Aurélien Denis

I very nearly spoke up at that point; personally, I think the fact that it was conceived for blogs is precisely what makes WordPress what it is, and we should be embracing that fact, rather than trying to argue it away. A normal CMS is designed to be managed by a trained sysadmin, and built by experienced developers. (cf Drupal) WordPress assumes you're on your own, and you just want to get on with writing something. Which is almost always the case, even in large organisations like government departments.

We broke a little early for lunch, and given the (frankly unforgivable) lack of wifi at the venue, I went in search of free connectivity and good food. I couldn't find anywhere visibly offering both in the immediate vicinity; probably just as well, as I really fancied a moules-frites, and it wouldn't have gone well with my iPad.

Benjamin Lupu

First after the restart was Benjamin Lupu, who runs the WordPress-based digital operations of a publishing company targeting the public sector. In his excellent talk, he reviewed their work to integrate WordPress with their various other systems: subscriptions, email marketing and so on. There was initial reluctance at the thought of using a blogging platform, but the work came in under budget, handled the huge traffic levels, did everything they wanted, and provided a much more journalist-friendly experience than what had gone before. His only complaint was the lack of a built-in search engine in WordPress core; but it's not as if there aren't better, more focused open source solutions which could be easily bolted on.

And so to our gold sponsor for the day: Microsoft. Yes, yet another WordCamp sponsored by Microsoft. Things didn't start well, with Pierre Couzy failing to get his PowerPoint slides to project properly, unlike earlier Mac and Google Docs-based presentations. (Sorry, a cheap shot, I know.) And although he had a lot to say about Microsoft's efforts to engage with the product and the community, you just knew he would get a hard time when it came to questions.

Pierre Couzy

I've heard the 'we love open source really' speech from numerous Microsoft people over the past couple of years. (Usually followed by 'And we hate IE6 as much as you.') I'm not as hostile to it as I once was. They now have numerous free downloads and services to help make WordPress work on Windows; and whilst you mightn't choose to use Microsoft's products in your WordPress project, sometimes it's forced upon you. At least they're helping... although you sense it's with at least half an eye of monetisation in future, probably based on cloud hosting services.

Benjamin and Nicolas from beAPI

Final presentation of the day was a double header: Nicolas and Benjamin from WordPress specialists beAPI (Amaury's consultancy), talking about ways to improve WordPress performance. I thought I'd have heard it all before, but they came it at from unexpected angles, and I still picked up a few new tips.

The day finished with a 'round table' Q&A, featuring all the day's speakers (apart from Michel). The questions seemed rather negative, fearful, suspicious. Was the growth of Tumblr a cause for concern? Did the panel think 'they' would ever make WordPress paid-for? Why do 'they' bundle a paid-for plugin like Akismet with the free core product? It rather confirmed a feeling I'd had throughout the day, that the community in France felt distant from the core WordPress effort, in a way which we in the UK just don't. Perhaps it's the common language; perhaps we're just that little bit longer-established, and more confident as a result.

It proved to be a fascinating day, not least for the cultural differences. With so much of the jargon being in English, the presentations sometimes felt like they were being delivered simultaneously bilingually: and it took me a little while to tune into the Frenchified pronunciation of English terms. (It took me ages to work out what 'Apash' was.) And then there are the English terms which don't match the terms we use: le back-office, for one.

Félicitations to Amaury and Xavier for such a well-run event; and merci for the steady supply of coffee and cakes. Here's hoping the event inspires an even stronger, more confident WordPress community on the other side of la Manche.

Thursday 24 November 2011

Small site, big name

It feels like ages since I built a site completely from scratch; so much recently has been about invisible enhancement, or extra-large scale work taking months to reach its conclusion. So it's been great fun to do a small and relatively quick build for the Commission on Devolution in Wales, established to review the present financial and constitutional arrangements in Wales.

In fact, it's been a complete identity package: working with Matt Budd, we generated a handful of logo suggestions, trying our best - but ultimately failing - to get away from the use of a red dragon. The Commission team picked a favourite which we then worked up into a website, Word and PowerPoint templates, business cards, etc etc. (Note the deliberate selection of a (free) Google Web Font, by the way: how's that for 'digital by default'?)

The website is a child site of the Wales Office's existing WordPress multisite setup, which we activated just over a year ago, with precisely this kind of scenario in mind. A couple of clicks, a mapped domain, and bingo - a new and independent website in a matter of moments.

Ah yes, independent. We're using the independent.gov.uk domain, set up to accommodate 'arms-length bodies, independent inquiries and other suitable temporary sites'. I still feel slightly uncomfortable with caveat-ed gov.uk addresses like this: is it gov.uk, or isn't it? But it's an established standard now, so we'll happily fall into line.

All of which gives us a site rejoicing in the URL:

http://commissionondevolutioninwales.independent.gov.uk/

unless you're Welsh, in which case you get:

http://comisiwnarddatganoliyngnghymru.independent.gov.uk/

- which, if I'm not mistaken, is the joint longest root URL in UK government, matching that of the Commissioner for Public Appointments who - guess what? - is also independent of government.

It's a single child site, running off a fairly simple but internationalised theme. The content is fully bilingual, managed - somewhat reluctantly, I must say - via the paid-for WPML plugin. As Word Up Whitehall attendees will have heard, Mr Wheatley and I are working on a multilingual plugin of our own: but it's not quite ready yet, and anyway, the Wales Office server wouldn't be ready for it either. (Long story.) I bear the scars of several WPML-based developments recently, but this one doesn't push it too hard, so it's been OK.

My thanks, as ever, to Matt for the creative work, Simon for some last-minute cake icing, and the Commission team for making this one run remarkably smoothly.

We'll have more multilingual shenanigans to come in the next couple of months... but on a completely different scale. ;)

Friday 11 November 2011

Paris go! Off to France’s first WordCamp

France's first 'proper' WordCamp takes place in Paris in a couple of weeks: and I've just bought my ticket.

I did French as part of my degree - although that was nearly two decades ago, and only a tiny part of it was ever computer-related. So I'm placing a lot of confidence in 1) my memory of the language, and 2) the likelihood of the most difficult words being derived from English anyway. :)

There's a reassuring familiarity to the day's provisional programme: the themes business, scale, security, optimisation, and so on.

But the star attraction, for me anyway, will be the appearance of Michel Valdrighi - the man who created the b2/cafelog blogging platform, and whose sudden disappearance led to a discussion between a kid from Texas and a bloke in Stockport, which ultimately led to... ;)

Also worth noting is the gold-level sponsorship offered by Microsoft. Yes, yet another one.

Alors... est-ce qu'il y en a parmi les lecteurs de ce blogue qui voudraient me rejoindre à Paris? Tickets are a very reasonable €25, and there are still plenty left. Come on, let's help the neighbours build some momentum.

Thursday 10 November 2011

Foreign Office finally switches to WordPress

Earlier this week, the Foreign Office rebuilt its blogs.fco.gov.uk site. It doesn't look much different. But the screenshot above isn't the significant one. The one below is.

Yes, after some gentle encouragement on the pages of this blog, it's great to see the Foreign Office moving off the Apache Roller blogging platform - What, you've never heard of it? Exactly. - and on to the blogging platform of choice, WordPress.

Like a lot of government projects, the brief has clearly been to keep the visuals almost exactly as-was. But Steph Gray has rebuilt the site using an HTML5-based theme, deployed on a multisite setup at Bytemark (by the look of it), and has managed to migrate 50+ blogs' worth of content too.

I can see a few things we'd have done differently - notably around non-English content. But as Word Up Whitehall attendees will have heard, Simon Wheatley and I have been concentrating on precisely that subject for most of the past few months, so we're probably deeper into it than most.

And so the highest-profile blogging platform in Whitehall comes over to WordPress, joining similar efforts at DFID (launched Oct 2008), Health, DECC and BIS. Well done to Ross & co for doing the right thing. You know it makes sense. That really only leaves the MOD...

Wednesday 9 November 2011

When WordPress gets boring, things get interesting

[Thanks to @JonAkwue for suggesting a vastly improved headline for this piece...]

The big moment of this year's Word Up Whitehall came in the second presentation of the day: Gavin Dispain from the Department for Transport, telling the story of their hasty migration to WordPress.

It was already clear that we were in very different territory from last year's inaugural event: Stephen and Francis from Health had opened with a presentation featuring the kind of technical architecture diagrams you just don't see at WordCamps. We weren't just talking about the potential for government departments to use WordPress, or sharing examples of little microsites they'd built: no, this was real corporate-sized heavy-duty stuff. And there, at the heart of it, increasingly so in fact, was WordPress.

Then came Gavin, and that slide. He didn't really make a big deal of it. I think we all knew about the potential to generate massive savings. But there it was, in black and white: hundreds of thousands of real pounds, not notional pounds, saved at a stroke. With further savings to come, as more arms-length agencies come on-board. (Defra are a bit further down that track already, as David Pearson related later in the day.)

Technical architecture diagrams. PowerPoint slides with incomprehensibly large numbers on them. Weren't these precisely the things which drove me out of 'proper' IT, and into the world of WordPress? What the hell were these doing at a WordPress event? For a moment I could feel myself switching off, as I'd done in countless meetings over the years.

And that's when it all suddenly fell into place.

I'd reacted against such things in the past, because they were visions of the future - and for the most part, futures that never quite arrived. But something was different here. People weren't talking about how they could or would do it. They were demonstrating how they had done it. Health had built that structure, and it was working. Transport had left behind one set of contracts costing £X, and were now in a new arrangement costing £Y.

To be frank, systems admin and accountancy can be a bit boring. But it's a mark of the success of the WordPress mission1, and the potential it has unlocked, that we're now into that business-as-usual territory. When you're getting stuck into the 'boring' bits, that's when change is really happening.

And it turns out, I don't actually hate technical architecture diagrams and budget forecasts after all.

1 When I first drafted this, I wasn't sure about using the word 'mission'. But then, by sheer coincidence, Seth Godin posts a few lines on his blog, and I feel a whole lot better about it.

Tuesday 1 November 2011

Coming up in WordPress 3.3

The next version of WordPress, version 3.3 is on the horizon: a second beta release came out a couple of weeks back, and a first release candidate is due in the next couple of days.

So what is there to look forward to? I'll hand you over to Andrew Nacin, one of the core developers, and the presentation he gave at a recent New York meetup.

There are quite a few incremental improvements to the admin interface, but nothing to stop you in your tracks. The left-hand menu is now based on 'fly-out' submenus, more or less as the compressed view has always done, albeit with a nicer animation. There are tweaks to the Admin Bar (including pointy notifications), the 'Help' area, and the 'welcome' screen you see on an initial install. The file uploader is no longer Flash-dependent, favouring HTML5 where available, and adds drag-and-drop functionality.

Lots of little things, none of which sounds like much; but I'm told that once you've been using 3.3 for a while, going back to 3.2 feels rather dated.

Final release is currently scheduled for the end of November.