Automatically Moderate Comments »
As you may or may not know, I developed a Movable Type plugin a while back called MT-Moderate, to help me with the growing tide of comment spam. The plugin is simple. It's only 3KB, and involves installing only a single file on your server. No special modules are needed, and it works immediately upon installation. MT-Blacklist is great and Jay did a simply amazing job, but let's face it - I don't want to spend the time installing it or maintaining it. Enter MT-Moderate.
The idea behind the plugin is remarkably simple: Older entries typically have higher placement in search engines, a feature desired by spammers, so don't allow new comments without checking them first. If, by some chance, a valid comment was left recently on an older entry, and it has been approved, then allow more comments on that same entry, assuming the conversation has picked up again. Some people like to close comments on old entries, and that's not a bad idea, but it means that those occasional valid comments that do come in won't ever be left. I don't like that. Handling it this way actually addresses that.
You see, for the most part, older entries don't get (valid) comments. They get spam comments. As the entries move into your archives, people don't often find them when they are reading your blog. Out of sight, out of mind and all that. They might be found through a search, either on your blog, or through an external search engine such as Google, but I have found it very rare that people who find your blog through those methods will leave a comment.
Be realistic. It just doesn't happen that much. Most of us have a regular following that reads now and again, and occasionally comments on things. Those people will typically leave a comment within a few days at most. So by default, this plugin will moderate every comment that comes in that's more than a few days old. In the case of MT-Moderate, that default is 7 days. But other comments are still allowed - they just require moderation before they will show up on your blog. This prevents comment spam from showing up on your site, while continuing to allow valid comments to be left and approved as time allows, without having to close comments altogether.
If such a comment is left, and subsequently approved, then the clock resets slightly. Instead of the original seven days, it's reset to 1 day. This is because a new comment on an old entry is likely to start a new conversation very quickly or it won't happen at all. So if a new comment is left, and someone picks up on it, then subsequent comments will be automatically approved, so long as they happen within 1 day of the most recently approved comment (or are on a more recent entry). Out of hundreds of comment spam that I have received since creating MT-Moderate, only 3 have slipped through this test. Three! And one of those was before I shortened the "follow-up comment" period from 2 days to 1. I'd say that's a success by most any measure.





















Comments (6)
Hey, I installed Moderate in my MT plugins folder yesterday and I just got spam comment in a post from eight months ago. Does it require something more than just putting the .pl file in the plugins folder?
Posted by Greg | December 12, 2004 10:42 PM
No, it does not. However, please realize that MT-Moderate performs two checks on each comment. Either could affect your installation. The first is that the entry is less than 7 days old. Obviously this should not be an issue here.
The second check is to see if the entry has an approved comment that is less than 1 day old. So if someone left a (valid) comment on this entry yesterday, then a spam comment posted on it today will be approved. This is so that valid conversations that pop up on older entries have a window (small, but a window nonetheless) where they don't need to constantly be approved.
Posted by Chad Everett | December 15, 2004 7:45 AM
I know this is a dumb question, but what does it mean to "moderate" a comment?
Posted by Ted | December 21, 2004 9:22 AM
Hi Ted - In MT 3.x, a comment has two possible status codes. One is visible and the other is not. Being visible, the comment acts as if it did in prior versions - that is to say that the comment is included on any pages that would normally display that comment.
Being not visible, or moderated, means that the comment won't appear on your blog. It will still appear in the management interface, where you can delete it or approve it, the latter meaning that it will shift to a visible status and show up on your blog.
Posted by Chad Everett | December 23, 2004 6:10 AM
I'm still on MT 2.6x (the install is shared and we've got bills to pay before we upgrade to MT 3.1). Am I correct in understanding from the previous comment that MT-Moderate requires MovableType 3.0, or will it work in 2.6?
Posted by Chris Garaffa | January 11, 2005 2:38 AM
There are actually two reasons why it won't work in 2.6x. The first, and perhaps most important, reason (because it cannot be easily overcome) is that comment moderation wasn't introduced until version 3.x. So even if the plugin would work, it wouldn't work.
Which leads to the second reason. MT-Moderate uses the callback mechanism introduced in version 3.x to moderate the comment automatically. This would need to be hacked into the system, rather than doing it the way that it is now. Of course, the column doesn't exist in the table, so that in itself is somewhat pointless.
Posted by Chad Everett | January 11, 2005 5:57 AM