A few years ago we looked at providing a blog service to support a teaching module, back then the only option for multiple blogs was to either install multiple instances of WordPress, or opt for WordPress MU. Happily things have moved on a long way with WordPress since then. There’s now “networks” which form an integrated part of the WordPress code base – with MU, we quickly found we were on an outdated version.
So proudly, today I announce that we’re now providing http://researchblogs.cs.bham.ac.uk/ to allow research members of the school the ability to create blogs about their research.
We really don’t just like bunging in new systems which aren’t integrated into anything else, so we’re using a couple of plug-ins to help tie authentication into our normal authentication systems. The http-authentication plugin allows one to use Apache auth to provide logins. A few years back, I wrote the authentication module we use, and this provides integrated cookie based authentication across a number of our sites.
So researchers here can now register on-line for blogging. This sets them up inside the WordPress world.
Why not just use normal WordPress registration?
Whilst WordPress allows configuration options to disable registration or to restrict to email domains, we only want to allow our research staff at present to register, so we’ve provided a click to register option. We also don’t want to allow anyone who can use the system to create their own blogs, again we’d like to restrict that to a sub-set of users.
There’s no easy way to accomplish this sensibly with WordPress right now – there’s no command line tools, and poking things directly into the WordPress database is just going to cause trouble in the future, so I’ve written some code to act as an API – internally my API code uses the Curl module in PHP to authenticate into WordPress as a trusted user and then allows it to make calls from the WordPress function reference, so for example, my API code logs in as an admin user internally and then calls the get_blog_details function to find out info on a blog. The main page of the site uses this internally to render all the blogs (and a tweak to the index handler for Apache to load a different page by default). This means we can list currently active and archived blogs, which is derived using the WordPress functions, rather than poking into the database directly.
As we know our researchers have collaborators, we’ve also built part of the API so that allows staff to add external users which are authenticated using the WordPress internal authentication system, so they’ll be able to add collaborators and be able to allow them to post onto research blogs. Hopefully this will make it a workable solution for our researchers!
And what’s with the robot man?
That’s the building we’re located in. The statue is right outside my office. Its called “Faraday” and was designed by Eduardo Paolozzi.
And if we’ve changed the theme since posting … he’ll be gone by now!