Following a thread through some blog posts this morning - I started at The Reverend’s post about Martha’s documentation of her hacking on WPMU, including a description of a WordPress plugin I hadn’t heard of before - Flutter.

Damn. The Rev’s gonna love this.

One of the things I LOVE about Drupal is the fantastic CCK plugin that lets me create compound structured content types without hacking the database or writing code. Things like Events. Profiles. Pretty much anything that can be stored as database records.

Flutter appears to do most of what I use CCK for. It’s a bit of a hack on top of WordPress’s custom fields design, but whatever. I really don’t care how it works under the hood. It works. And it’s really nice. You can create any number of custom content types, groups that can contain any number of fields - and the fields can be simple text strings, long text chunks, images, audio, dates… Very cool.

So far, the only thing I’ve found really missing from what I use in CCK is the idea of linking nodes (or posts or pages - I haven’t seen a way to select a page or post as a field in another - but that’s not fatal - tags and categories can make up for some of that).

I’ll be playing with Flutter over the next few weeks. I think this might go a LONG way to implementing some of the things I’ve been thinking about wrt WordPress as a course blogging and publishing platform - WITHOUT HAVING TO WRITE CODE.

I love that. Thanks to Martha and Jim for the heads up on Flutter!

Update: doh. Looks like Flutter does some unpleasant things to the main Write Post interface as well - it was wrapping this post to a set width, making it look ickyier than usual. hrm…

yeah. definitely not quite ready for prime time. but still, something worth keeping a close eye on. this could really make some interesting things possible with wordpress…

I got word back from Akismet that using it on UCalgaryBlogs.ca to protect all of the blogs hosted there falls under the free license, despite the wording on their website that suggests it’s an enterprise use. This means I’m now able to protect all blogs on the service with Akismet, without requiring a Captcha challenge.

The current version of the Akismet plugin for WordPress installs just fine in the mu-plugins directory, meaning each blog automatically gets protected, without any configuration or setup. The Akismet key can be hardcoded into the plugin file, and when that is done, all configuration interface magically disappears from the wp-admin interface. Easy peasy.

All that was required by Akismet was that I provide a link from each blog to Akismet.com to give credit for the spam protection. I wrote up a VERY simple mu-plugin to automatically insert the text and link in the footer of each blog on UCalgaryBlogs.ca.

I’m curious to see how well Akismet functions on some of the topics of conversation - some post colonial courses commonly use language that trips up word filters pretty readily…

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

WordPress has supported Gravatars for awhile, which is great, but if you’re rolling out a site for a bunch of students to hammer on, it’s not ideal to have to send them to a third party service to set up photos. It’s awkward, and confusing, for new users to have to go somewhere else to add a photo to their profile. And profile photos can be very useful, especially at the beginning of a semester when everyone is just getting to know everyone else in a class, to put a face to a name.

So, for UCalgaryBlogs.ca, I just installed the handy User Photo plugin. Now, any site can enable this, and the users of that site will be able to add photos to their profiles, like this:

The plugin can be configured with custom sizes for the full-size and thumb versions of the avatar, and the avatar image can be deleted and/or replaced at any time.

It’s not completely trivial to enable - because the themes need to be User Photo aware. That’s pretty easy to add, though. For the cutline theme we’re using on a project, I edited a handful of files to add the code, and it works great. On index.php, and single.php, just add this wherever you want the blog author’s photo to be displayed on the post (I put it in the section displaying the post meta information):

<?php if (function_exists('userphoto_the_author_thumbnail')) {  userphoto_the_author_thumbnail();}?>

Wrapping the thumbnail display code in a function_exists conditional means it will degrade nicely if the plugin is unavailable. Always a good thing to degrade instead of borking.

That results in this display when viewing the post:

Now, if you also want to show avatars on the comments, just edit comments.php to add this code (I put it in the comment meta info section):

<?php if (function_exists('userphoto_comment_author_thumbnail')) { userphoto_comment_author_thumbnail();}?>

And that will look like this when displayed on the blog:

If a user hasn’t added an avatar, it won’t display any image. But if they do have one, they’ll get the properly sized version of their avatar image displayed automatically. Easy peasy. It’s a bit awkward having to edit the themes, but it’s not difficult. The hard part will be remembering to re-apply the edits if the themes get updated (hence this post…)

August 19, 2008 9:52 am -

It’s been bugging me for awhile that comments have been quote-escaped for some time now. I did a quick Google search, and it looks like the WP-OpenID plugin is the culprit. I’ve disabled it, and it looks like the problem has gone away. I’ll test more later…

comment (0)
August 18, 2008 9:05 pm -

I was trying to be clever today, and installed the eAccelerator plugin for WordPress, as my CanadianWebHosting.com server offers eAccelerator built in. Thought it’d be handy to speed things up. Worked GREAT. At first. Then faceplant. Fail. 500 Internal Server Error. No more eAccelerator plugin on my blog…

comment (0)

Jim posted about Yahoo! Shortcuts, and while the WordPress plugin sounds cool (it claims to scan a blog post and automagically find links to blog posts, flickr photos, and other sources of info), I’m not sure how well it’ll translate into real life. It looks like it scans the blog entry as you’re writing it, and when done it’ll run some code to insert stuff into the post before publishing.

I’m wondering if this is like StructuredBlogging with some automated lookups. How does the output look? Is this something worth using? How accurate is the logic for finding relevant links and photos? I’m just going to leave this post however Yahoo! Shortcuts generates it, as an example. And maybe to get the free t-shirt…

Jim raises a very important point - is this just a tool to embed content from Yahoo! endeavors? Will we be able to add other sources? Automatic lookups of Wikipedia pages? IMDB lookups? Or, is this just a tool to increase the Google Juice of Yahoo! properties?

So far, it looks like it just inserts hyperlinks around some predefined keywords, and points them to Yahoo! search pages. Not very useful, and something I find very annoying on the big sites that use this strategy. A link should point to a page, not a generic query. Anyone can do a search for a keyword without having these blasted hyperlinks inserted all over the place, with their annoying pop-in preview windows. Ick.

Update: wtf? looks like it uses javascript to embed the links and content. so the content doesn’t really exist, and the links don’t really mean anything from the perspective of search engines etc… this isn’t an intelligent structured blogging at all, it’s a javascript insertion. don’t like that one bit… And for some reason it’s adding the span tag several times for some of the identified keywords. Think I’ll be disabling this plugin. It’d be pretty cool if they released the cool CC Flickr photo finder as a separate plugin, perhaps with a more fully-featured Flickr photo inserter function…

When I switched from Drupal to WordPress as the software that runs my blog, one of the things I missed was tag autocompletion while writing posts. Drupal has a great freetext tag field, including an AJAX utility that automatically checks with the server for tags that match what you’ve started to type in the tags field.

And now, WordPress has that too! With the Simple Tags plugin. It has some other features, too (but I haven’t tried them yet) but the tag autocompletion is killer. Why isn’t that included in a stock WP install?

Here’s what the autocompletion offered as I entered the tags for this post:

SimpleTags Autocompletion

I’ve been using the WP-Cache 2 plugin for some time, as it offers pretty effective file-based caching of WordPress pages to help reduce the load on the database server and reduce page generation time. But the plugin has kind of languished without any real updates for months(?) or years(?).

Donncha O Caoimh, the WordPress guru who’s name I’ll never be able to pronounce, released an updated and refined caching plugin called WP-Super-Cache, based on the great start offered by WP-Cache 2.

Traditionally, if someone wanted to run a high-performance weblog, or an enterprise-level weblogging system, they really had only 2 choices.

  1. MovableType - because it generates static HTML for every page of the site, and only runs code when posting new content (posts or comments). It can, in theory, scale pretty much infinitely, but can also take for fracking EVER to publish content because it may have to regenerate static files for EVERY page on the site (if you change the theme, you get to create 5,000 new .html files to reflect it).
  2. WordPress on some bad-ass hardware. WordPress.com runs on it, but they use 23 bajillion servers, with jaw dropping MySQL clustering and replication. Dynamic content with query caching, etc… Works great, but needs a fair bit of care on the back end to manage the tiers of MySQL (or Oracle?) database servers, and multiple webservers.

Now, there’s a pretty kickass third option.

  1. WordPress on commodity hardware, with WP-Super-Cache

WP-Super-Cache does some great caching, storing the output of dynamically generated pages, and returning those rather than hitting the database. It doesn’t even have to fire up PHP to spit out the cached pages - it’s essentially running as a static file server. Kinda like MovableType. But with lazily bound cache that gets regenerated as needed. You don’t have to staticize an entire website, just the pages that are being requested. And they’re updated every hour or so, so the load on the server should be extremely low.

If your server is kosher, it’ll also gzip the cached pages, saving disk space, time and bandwidth (sadly, neither of my servers seem to play nicely with the gzip “super cache” option - I’ll play more later).

Now, my blog likely still won’t survive a full-on Slashdotting because I’m running on an inexpensive shared hosting provider (Dreamhost). But it should survive a pretty respectable amount of traffic (i.e., way more than I currently get) so I should be good to go. And ucalgaryblogs.ca should be able to serve out some pretty decent traffic loads, assuming I manage to actually market it and get folks to use it…

WP-Super-Cache also works out of the box on WordPress MultiUser. It installs as a mu-plugin with minimal effort, once you RTFM. The options, oddly, don’t show up in “Site Admin” but in the “Options” panel on the main blog of a WPMU installation.