james mckay dot net
because there are few things that are less logical than business logic

Comment Timeout 2.0 and friends

The first alpha versions of my new WordPress comment plugins are now available for download.

Comment Timeout 2.0 closes comments on posts on your blog a certain time after they are posted. It has been rebuilt from the ground up to incorporate some new features:

  • You can now override the default settings to allow certain posts to have the discussion kept open for a shorter or longer time, or even indefinitely.
  • You can define a “popularity level” above which the discussion can be kept open for an even longer period of time if you so desire.
  • You can have comments on older posts sent to the moderation queue instead of closing the discussion altogether.
  • The comment form now indicates when the discussion for a particular post will close.

Some features were added to version 1.3 but have now been spun off into two separate plugins:

Three Strikes and You’re Out examines your Bad Behavior logs and your spam queue and closes comments across the board on your blog when you are visited from any IP addresses that have been repeatedly misbehaving (the default settings are three times in a week). It also defines a couple of hooks and adds a new logging table to the database, so other plugins can register naughty events (e.g. failed captcha tests) or override the counting mechanism (e.g. to implement whitelists or blacklists).

Link Limits rejects comments which contain BBCode or more than two normal hyperlinks. I’ve found that this blocks approximately 80% of spam, yet genuine comments exceeding these limits are almost non-existent. It informs your commenters that this restriction is in place. It also logs any violations to Three Strikes And You’re Out, but it works perfectly well if you do not have Three Strikes And You’re Out installed.

I’ve marked them all as “alpha 1” status, which means use at your own risk, though I am dogfooding them on my own blog. If you have any problems with them, I’ve written a post on how to report problems with WordPress plugins — please read it before giving me a shout, though I do welcome feedback and suggestions of course.

Starting with these plugins, I have changed the licensing terms. Whereas the old versions were GPL, these ones are available under the MIT X11 licence. It is GPL compatible but doesn’t have the “copyleft” element. This means that if you wanted to, you could adapt it for use with another, non-GPL, CMS or blog program.


  • # Reply from David Chart at 01:41 on 27 Jul 2007

    First, thanks for the plug-in. There seems to be an odd problem with the alpha version, but it’s an alpha version, so that’s OK.

    It looks like it is working, but I’m still getting spam on an old post. Only one old post, though, which is peculiar. Specifically, this one:


    (Yes, the blog is in Japanese. The “Comments are closed” message is still in English, though.) My Akismet spam queue has 15 spam comments in, all linked to this post, and all posted since I installed the plugin.

    There was one post that was getting hit by a lot of spam, so I manually set it to comments closed. It *may* have been this one, but it was some time ago, so I simply don’t remember. However, that’s the only thing I can think of that could make this post different from the others. If so, it had comments set to closed when I installed and activated the plugin.

    Installation details:
    WordPress 2.2.1
    Comment Timeout 2.0alpha1
    PHP 4.3.11
    MySQL 4.0.27-standard
    Akismet is the only other active plugin.

    Thanks again for the plugin.

  • # Reply from James at 07:46 on 27 Jul 2007

    Thanks — I had noticed something similar on one of my own posts just the other day but I haven’t had time to investigate yet. Unfortunately I am just about to go away for the week, but I will take a look at it when I get back.

  • # Reply from David Chart at 13:44 on 27 Jul 2007

    Thanks. No problem at all with waiting a week for you to do more free work for us…

  • # Reply from James at 17:56 on 11 Aug 2007

    OK I’ve fixed the bug and the new version is now available for download.

  • # Reply from Dan at 13:54 on 18 Aug 2007

    Hi James,
    First off, thanks for you work on this plug-in. Blogs hope to live peacefully and relatively spam-free because of your work.

    Originally, I was writing this comment in response to splitting the original plug-in to three, but my comment was rejected from that post (even though comments weren’t supposed to be closed until September 1).

    Although I would have voted for separating the plug-ins as well (at least from a feature management perspective), I’m shuddering at the thought of other plug-ins in my arsenal doing the same. My dashboard is already clogged with too many plug-ins as it is, but I have difficulty letting any of them go.

    Anyhow, thanks again and keep up the good work.

Comments are closed.