Tags working again

Tags in Gimboland were broken. Now they’re fixed. That is all.

Good spam filtering in WP

I’m very impressed with WordPress’ built-in spam protection (well, strictly not built-in – but provided by the Akismet plugin that came bundled with). Since making the switch a couple of weeks ago, it’s caught 354 spam automatically, straight to the spam queue. Today, for the first time, two pieces of spam snuck through to the comment moderation queue. Even better, as soon as I hit “re-check queue for spam”, they were gone – yay, collaborative filtering.

This is such an improvement on my old situation, where I didn’t even have a separate spam queue, and occasionally spam was even published. It was pretty primitive, really. I expect that upgrading my MT version would have helped, but meh. Anyway, as Jo would say: will everyone please stop blogging about blogging, and blog. :-)

Hacking lightstats for ultimate tagness

I’ve hacked the lightstats plugin to forget about categories, and instead display “posts per tag” and “bytes per tag”, querying the tables created/maintained by ultimate tag warrior. Examples here. Code available by request.

Arguably the “posts per tag” is a bit redundant given the w00ty uber tag cloud – particularly once I have that displaying post counts in the tooltips. I’m quite proud of the “bytes per tag”, though… One big SQL statement gives me all I need:

SELECT tag, sum(length(post_content)) AS bytes
  FROM wp_post2tag
  INNER JOIN wp_tags ON wp_post2tag.tag_ID=wp_tags.tag_ID
  INNER JOIN wp_posts ON wp_post2tag.post_ID=wp_posts.ID
GROUP BY (wp_tags.tag_ID)

Well, OK, not so big. Quite big as a one-liner though. :-)

I’ve also installed wp-cache, which may or may not be pointless… (And, the following morning, disabled it, because it would prevent comments appearing for up to an hour after they’re posted!)

go faster stripes #2: sidebar comments & better tagging

The sidebar’s getting chunkier, with the addition of comment previews courtesy of simple-recent-comments.

I’ve also switched tagging tool; I was using category tagging, which is a deliciously simple solution let down by the WP interface for setting multiple categories – c’est clunky! Now I’m using Ultimate Tag Warrior which has a much slicker super-whizzy AJAX-o-matic type interface and also, to my eye, slightly more beautiful tag clouds. However, I do now need to hack lightstats further to examine tag tables rather than category tables – no biggie, just a little SQL tweakery some time. Oh yeah, and now all posts will have the category “Uncategorized”, because I just don’t need categories to be visible any more; so I need to fix the RSS feeds to list tags not categories, and redirect all /category/ URLs to the front page, or maybe to /tags/.

go faster stripes #1: flickr sidebar

I’ve added a flickr feed to the sidebar, using the flickrrss plugin. Nice plugin: I can control how many images to get, their size, whose images to get (user, group, everyone, etc.), refine it by tag, and cache the thumbnails on my server so they’re not fetched from flickr for every hit. Sweet. It can only handle one such feed, unfortunately, but I guess I can live with that. :-)

gimbo breaks everything – hurrah!

Well, hopefully not everything, but…

Woo: I’ve migrated (some might say upgraded) gimboland from Movable Type to WordPress.

This is the fifth system I’ve used to maintain gimboland. Initially I was just editing HTML by hand; very soon thereafter I started using Blogger; in June 2002 I ditched that in favour of some home-grown Python scripts; in December 2004, the desire for a commenting system led to Movable Type; now this. What next? Something in Haskell, perhaps? ;-)

The migration process was by no means “one click” (though aided considerably by my host’s use of directadmin and installatron) – which is why things have been so quiet here lately – and has had a number of consequences…

For one thing, all the URLs have changed, which means bookmarks and inward-links will tend to be broken. I’ve tried to fix this as much as possible with HTTP redirects (yay apache magic). There are nearly 2000 posts in Gimboland, however, so that’s now one long .htaccess file. :-) I might well have screwed up, so if you’re aware of anything missing or horrible, do let me know. One possible issue is the syndication feeds: I used to have RSS and atom feeds, whereas now there’ll be just one RSS feed in a different location – if the feed situation is unsatisfactory do let me know and I’ll look into alternatives.

The most obvious change is that all the blog stuff is now off gimbo.org.uk/blog/ rather than at the root; the rest of Gimboland – ie everything not off /blog/ – is still in a somewhat broken state (in particular the images), but now I’ve got this major part back under control, I look forward to making the rest of the site as good as I’d like it to be. The only problem is that it takes so long to get this stuff sorted, and I’ve got so much other stuff I should be doing. Well, I’ll get there, particularly if I remember that perfect is the enemy of done.

What else has changed? Generally, things have been getting “crufty” for a while, and much of that cruft should now be gone. The search box is working again; comments are up again (and handled better, particularly for code samples – though we’ll have to see how WP handles the spam question); we now have tags rather than categories; hopefully the colour scheme is nicer. :-) Finally, WordPress is GPL‘d, unlike Movable Type – yay.

Anyway: now it’s really time (I hope) to stop tweaking this stuff and start blogging again. And on that note…

WordPress appears to have a quite powerful plugin architecture; one plugin I’ve found fun is lightstats which, with some tweaking (bleurgh, PHP), gives me some interesting and informative graphs about gimboland’s posts over the last nearly six years. The first two show category use and are boring at the moment because most of the posts are uncategorised: I aim to fix that. The third one, posts per month, is the one I really wanted, and it’s a depressing sight: I’ve really dropped off posting over the last couple of years. Part of that, maybe, I hope, is that I’m posting less but better (much early stuff is just links to silly things), but I think I’ve also just trailed off in shame as the site got cruftier and cruftier. Thus, onwards to a cruft-free post-rich future!

Posts per category, snapshot 21 Jan 2007

Words per category, snapshot 21 Jan 2007

Posts per month per category, snapshot 21 Jan 2007

Comments per post, snapshot 21 Jan 2007