james mckay dot net

because there are few things that are less logical than business logic

December 2006

28
Dec

WordPress plugins update

I’ve been spending a while updating some of my WordPress plugins over the past day or so. It turns out that The Frame Buster had a bug that was stopping it working on some servers. If the version you are using is failing to override framesets as intended, or if you get an “undefined function does_host_match” error, you should upgrade to version 1.0.4. If you’re not sure, I’ve put up a page where you can test it here.

I’ve also released another plugin that I’ve been using for ages on end on my own blog, called Include. As its title suggests, it is similar to the <!--#include--> directive which is familiar to Apache or ASP/ASP.NET developers, in that it lets you include a file or PHP script in your blog posts.

26
Dec

Comment Timeout: Automatically closing blog comments on WordPress

Here is a WordPress plugin that automatically shuts off comments on older posts, unless they still have an active discussion going on.

Like everyone else, my blog was getting pretty heavily spammed. I have been using a combination of Akismet and Bad Behavior and this has had considerable success. However, I noticed that a lot of the spam comments that were coming through were targetting posts that were over a year old.

I’ve come across some popular blogs that are getting thousands of spam comments a day. Amazingly, nearly all of them keep comments open on all their entries, in some cases going back as much as four or five years. Why would anyone want to post a legitimate comment today on your trip to New York five years ago?

Since I started using this approach a couple of weeks ago, it’s proven to be pretty successful. Beforehand, Akismet was handling an average of five spams a day, with one day chalking up more than seventy. Bad Behavior knocked that figure down to typically one a day. Now, spam comments seem to be almost non-existent.

Some blog software such as CommunityServer and dasBlog has this functionality built in, though as far as I’m aware the ability to keep active discussions open is a new one. Unfortunately, WordPress has hitherto had no such facility, apart from a much simpler plugin which isn’t configurable and doesn’t allow for active, ongoing discussions.

This is a beta release of the plugin, and it has been tested on WordPress 2.0.5. Any feedback would be welcome.

[Update 28/12/2006]: I’ve created a separate page for the plugin, and released an update that is compatible with WordPress 2.1 alpha 3.

25
Dec

Happy Christmelicious everybody!

Just a short note to wish all the readers of my blog and any passers-by a very merry Christmas and a happy New Year. Sit back and enjoy the YouTube hit of the moment “Christmelicious”:

20
Dec

Firebug – the best Firefox extension ever?

I came across Firebug this morning via Matt Mullenweg’s blog. It is without a doubt one Firefox extension that no web developer should do without.

It’s an awesome plugin. You can debug and profile your Javascript code, step through it line by line, set breakpoints, inspect objects and variables, and quickly find errors when they happen, with detailed and useful information. It has a command line that lets you execute Javascript on the fly. You can edit your HTML and CSS on the fly and have the changes show up immediately, explore the DOM, and monitor the network activity involved in each page request, showing you the HTTP request and response headers for each file that it fetches.

All in all, it has just about everything you need to develop client-side JavaScript effectively and easily. And best of all: like Firefox itself, it’s free and open source.

Just one thing I don’t understand though. Once it is installed, it is disabled by default and you have to enable it, either globally or on a site-by-site basis, before you can use it. I presume that there’s some rationale to this — possibly something to do with either security, performance or stability — but I’m not sure what it is. Can anyone enlighten me?