WordPress

I’ve disabled WP-Super-Cache on UCalgaryBlogs.ca because it was doing quirky things like showing the anonymous front page after someone logged in, etc… And, with our low load and mostly logged in users, it really wasn’t necessary.

Except for the RSS feeds used to generate the Recent Posts and Recent Comments sections on the front page of the site. Without WP-Super-Cache enabled, the front page (and ONLY the front page) took glacial epochs to load, as the RSS feeds were generated, parsed, and embedded. I wanted to be able to cache the feeds, without having to throw the switch on caching the entire site.

Then it hit me - it’s trivial to set up a cron job to curl the feeds to static files periodically, and then I could just use those static files to generate the Recent blocks on the front page. Duh…

So, I modified the crontab on the server to add these two lines:


*/15 * * * * /usr/bin/curl "http://ucalgaryblogs.ca/wpmu-feed/" > /home/commons/webdata/ucalgaryblogs.ca/postsfeed.xml
*/15 * * * * /usr/bin/curl "http://ucalgaryblogs.ca/wpmu-feed/comments/" > /home/commons/webdata/ucalgaryblogs.ca/commentsfeed.xml

So, every 15 minutes, the sitewide Recent Posts and Recent Comments feeds are updated. I use the static files to generate the display on the front page, using the web-visible URLs for the files at http://ucalgaryblogs.ca/postsfeed.xml and http://ucalgaryblogs.ca/commentsfeed.xml respectively.

Sometimes, it’s easier to just pull out another tool from the server toolbox, rather than trying to find a way to do it within WordPress all the time…

I’ve got a prof using a WordPress site to manage some really active discussions in his course. He’d really like to be able to list all comments posted by each user, as part of the assessment rubric for the course.

I’ve found LOTS of “recent comments” and “popular posts” plugins, and some requests for similar “list all comments for a given user” functionality, but haven’t been able to find anything that fits the bill.

Ideally, the solution would list all contributors to a blog (everyone with accounts), with links to a page (or pages) that lists all of their posts, their pages, and comments.

Any suggestions? Do I get to write another plugin?

I’d missed the news, but the latest version of the Akismet plugin for WordPress includes some tasty stats. As with all things statistical, there’s a few ways to read the numbers, and there are some anomalies (ferinstance, it claims I had a few days of over 1000 ham i.e., valid comments per day and that’s just plain wrong) but the spam stats feel roughly right. They’re not dramatically different from what I was seeing under Mollom, except nobody gets inflicted with Captcha using Akismet.

Akismet history graph

Akismet history graph

I’d experimented with the Structured Blogging plugin for WordPress almost 3 years ago. It’s a way to add structured, complex data to regular blog posts, and provides both human- and machine-readable versions of the content in order to support aggregation and syndication of the data by any service that supports it. The plugin adds a bunch of extra types of posts, from generic reviews and events, to more specific formats such as Journal Article and Book. Those two formats would be extremely useful to any student (or faculty member) who is collecting notes on academic research for use in their studies.

The Journal Article and Book formats also integrate with services to automatically look up reference data. For example, while writing a review of an article in Nature, all I would have to do is enter the article title and click “Lookup: PubMed” - and the rest of the data was automatically queried and entered into the article review.

Similar features are available for books (via Amazon.com). And some formats also provide star ratings as additional fields, making ranking and reviewing items very simple.

Sure, it could be argued that the implementation is somewhat hackish - it replaces the rich text editor, and stores XML in the post content - but it works. That’s really all that matters.

Unfortunately, the Structured Blogging project appears to be defunct. The website has been abandoned, and the WordPress plugin hasn’t been updated since March 2007. The WordPress plugin still works, though, but for how long?

Hopefully, the promise of structured blogging and microformats won’t be abandoned outright. The decentralized, flexible nature of these complex content types has some really interesting implications on distributed publishing and recontextualization of information. It would be a shame to have that completely disappear.

One of the profs using UCalgaryBlogs.ca was asking if there was a way to show the “audit trail” for a blog posts. If she’s having students write stuff, and needs it in by a given date (say, an assignment deadline), she’d like a way to know if a post was saved before the deadline, or updated after it. It’s easy for people to futz around with the “published on” date for a post…

So, I did some poking around, looking for plugins or tricks to expose the revision display list without having to send the prof to the blog’s admin UI every time she wanted to look at the info.

I couldn’t find anything, so I asked a question on the WordPress support forum. On a tip from Otto42, I poked around with the wp_list_post_revisions() function. Looks exactly like what I need. So it was pretty simple to write a basic plugin that adds a Filter such that the list gets generated and appended to every post displayed on a blog that uses the plugin. If you’re logged in, and have proper privileges, you’ll also get a link to view the revisions directly. If not, you just get to see that the revisions exist.

I had to copy the wp_list_post_revisions() function and modify it a bit in the plugin, so it behaved as needed. Nothing too major, but the WordPress function relies on echo to dump the list directly, and I needed to modify it to return a string to append to the blog post. Easy peasy.

And so, post-revision-display is born. Install and activate it on your blog, and your posts will automagically generate and display the list of revisions as an audit trail, with no futzing about with themes and hardcoding stuff. Here’s what the audit trail looks like:

Download the plugin here (for now - I’m trying to get it added to WordPress.org/extend/plugins…)

One of the use-cases for UCalgaryBlogs.ca is for a class to integrate external resources such as OpenLearn courses, or potentially anything that has an RSS feed, to be ingested into the class blogsite. Currently, there are 2 scenarios possible for doing this, each with their own specific benefits, but neither quite matching what I think would make for a more powerful way to contextualize these external resources within the activities of a course.

With the VERY sweet OpenLearn Republisher plugin, you can set up a set of Sources (courses on OpenLearn, etc…) to be pulled into an installation of WordPress Multiuser. The OpenLearn plugin creates a new blog for each Source, and sucks down all items in the provided RSS feed into that blog, and creates blog Posts for each item.

OpenLearn Course Importing Plugin Workflow

OpenLearn Course Importing Plugin Workflow

The benefit of this is a set of centralized blog sites for each course, which could be shared across multiple courses. But that’s also the big downside of this model - what if you want to contextualize the content differently for each course that’s using it? If you didn’t want to do that, why not just use the online OpenLearn hosted version of the course?

With FeedWordPress (or wp-o-matic) you can pull RSS feeds into a single course blogsite, and all items will be published as blog Posts within that site. Categories can be set up and inherited to help organize the imported content.

FeedWordPress RSS Importing Workflow

FeedWordPress RSS Importing Workflow

But, if the activity of the course takes place as blog Posts, it becomes mixed in with any content imported from the external resources. Conversation and content become merged.

Ideally, a course blogsite would use the Pages feature to manage “content” - the stuff the conversations refer to - and use the blog Posts for the activity and conversation of the course. As such, I think it would be more effective to have the content from external resources be ingested into a blogsite as Pages, created within the hierarchy of pages (select a parent page, and a full table of contents structure is generated as needed).

Ideal open content ingestor workflow

Ideal open content ingestor workflow

I’m not sure if that’s possible now with the available tools, but I think we’re getting REALLY close to a powerful open content contextualization platform - ingesting prepared resources for use within the spatial and temporal contexts of a course.

Ideally, the power and features of OpenLearn Republisher, with the ability to designate the “host” blog for the ingested content (or have it create new blogsites as needed), and to create Pages rather than Posts. It’s VERY close, and it’s got the potential to change how people interact with (open) content.

I wasn’t convinced that we needed a “campus blogging platform” here at UCalgary. I’d tried to set up one before, at weblogs.ucalgary.ca , and watched it basically wither on the vine for 3 years. Little activity, except in small bursts when used in a class. Almost no individual involvement or ownership. Not interesting or relevant to anyone.

I’d decided that a “campus blogging platform” was the wrong tack. Why not just send people to other services that provide the software, for free. Services like wordpress.com or edublogs.org or blogger.com or typepad.com etc… They all provide the functionality, hosting, and support, without any intervention by a “campus”.

And then, in conversations with people whom I deeply respect, it was pointed out that there are, in fact, good reasons for having the publishing platform managed by the University.

  • community - if everyone has access to the same tool(s) they can build on each other’s work more easily
  • support - again, if people are using a common set of tool(s) it’s much easier and more effective for us to provide support and strategies for integrating those tools into the activities of teaching and learning
  • ownership - if the platform is hosted by the University, we can guarantee that no corporate entity is going to take it over and change the rules of the game. The license can’t change. The fees can’t go up. Ads can’t find their way onto the blogs…
  • safety - this one is twofold -
    • we need to be able to provide private blogs, where students and faculty can publish content to be seen only to a given audience. This is harder (if not impossible) on services hosted by other organizations.
    • non-US servers. This sounds odd, but if we’re going to be compelling our students to publish anything, we can’t force them to use services hosted in the States, due to implications of DMCA and Patriot Acts. We need to provide a service that’s hosted in Canada, and since there really isn’t a big blogging service hosted up here, we need to host our own on campus.

So, taking those into consideration, it became obvious that we needed a great blogging platform to be available on campus. And that weblogs.ucalgary.ca wasn’t it. Following in the footsteps of several others, I grabbed a copy of WordPress Multiuser, and installed it on our IT-hosted virtual machine server. I registered ucalgaryblogs.ca - I wanted to use a non ucalgary.ca domain name to avoid issues relating to “quality” of content, as well as “branding” of the website. People need to be able to write anything, and not have the constraints of having to live within the official UCalgary design template.

We set up DNS wildcarding, so people could have their own blog subdomains such as dlnorman.ucalgaryblogs.ca and installed the Domains plugin so people could also use the service for their own custom domains.

And then, I slowly started telling people about it. I didn’t expect much to happen, as it was a stealth project. But, pretty much every person that got their hands on it said it was exactly what they needed. They wanted their students to be free to publish, in their own spaces, without the limitations of Blackboard’s discussion board.

Faculty appeared to be getting on board, and judging from the activity, students were getting into it as well - at least they weren’t rebelling too loudly.

For a portion of Friday afternoon last week, students published 76 blog posts within one hour. We’ve now got 127 users in the system, publishing to 79 blogs (73 of which are public).

That doesn’t sound like much, but for a stealth project with no budget, we’ve been able to help over 100 people publish content, with over 1000 blog posts published so far, since the service started getting use in September. That ain’t half bad :-)

I mentioned this morning on Twitter that it took me maybe 30 seconds to upgrade my blog to the latest WordPress release. I thought it might be handy to show how I do it. I’m not sure if this follows best practices, and it might be a good idea to back stuff up before upgrading, but this process has served me well for the last several versions, and it’s just so quick and painless that upgrading is trivial.

I’m working with a faculty member who is using a WordPress with his students this semester as a place for them to publish and reflect as a group. To make things easier for everyone involved, it’s a good idea to batch create user accounts for the students so they don’t have to go through that process (it’s easy, but every step avoided means people are more comfortable and less aggravated with a service).

Do support that batch creation of users, I installed the “Import Users Plugin” which, surprisingly, provides a way to import users into a site. All you need to provide is a username and email address for each student and it will create the account, generate a password, assign the specified user Role, and send an email to the student so they can login. It doesn’t create blogs for each student, but for our current use-case, it’s ideal - adding users to a single blog in a WordPress Multiuser service.

If you need to batch create a bunch of users, first enable the “Dagon Design Import Users” plugin on your blog, then follow these instructions:

The list of users could be pulled from Blackboard or Peoplesoft, but needs to be reformatted into

username|email address

structure so the plugin can make use of it.

Donncha pushed the WPMU 2.6.1 update live today, and it’s a required upgrade for security reasons. I just wanted to post that I’ve upgraded ucalgaryblogs.ca to WPMU 2.6.1 and everything appears fine. It took all of 2 minutes to do, too.

Here’s my process:

  1. back stuff up.
  2. login to the server via ssh
  3. download WPMU 2.6.1 into ~/temp, and unzip it.
    cd ~/temp
    wget http://mu.wordpress.org/latest.zip
    unzip latest.zip
  4. delete the wp-content directory in the freshly downloaded copy of WPMU 2.6.1 - I do this so I don’t accidentally overwrite any customized themes, or nuke anything in mu-plugins or plugins…
    rm -R wordpress-mu-2.6.1/wp-content
  5. copy the fresh copy of WPMU over top of the existing one in the web directory
    cp -R wordpress-mu-2.6.1/* ~/webdata/ucalgaryblogs.ca/
  6. run the WPMU upgrade site script to run any necessary updates (I don’t think there were any database updates, but it’s probably a good idea to run it anyway). This will automatically run the script on each blog installed on that copy of WPMU.
  7. done. test some blogs to make sure stuff is working fine.
Syndicate content