MT Real Comment Throttle: The Last Hurrah
Meh. It’s a good thing WordPress has “Pages” that make it easy to create a “project page” that I can keep clear of the usual bitching and depression I want to void when I finish with something.
Real Comment Throttle for Movable Type 3.2, version 0.2 is out! Get it from the project page!
This version adds an option for what to do when you’ve gotten more comments than the throttle allows: you can either refuse them, or send them to the Junk Folder. Of course, if you choose the default refuse them behavior, then just like 0.1 it tells any genuine human who tries to comment in the middle of a flood that you’ve enabled a feature that requires a weblog commenter to wait a short amount of time before being able to post again
when they haven’t posted yet, and compounds that sin by suggesting that they try to post your comment again in a short while
when in fact they need to either wait some part of an hour or of a day if you don’t intervene and delete some crap comments. If instead you choose the new junk them behavior, they are told that you have enabled a feature that allows your comments to be held for approval the first time you post a comment
no matter how many times they’ve commented in the past, and despite the fact that “thrown into the Junk pile” is not precisely “held for approval.” Someone could probably figure a way to jump out of the comment throttle and junk filter sandboxes and actually talk to the person who sent the comment, but not me.
This version uses MT 3.2’s fancy new in-page plugin settings and the built in PluginSettings, rather than a separate config page and hand-rolled PluginData. That means that separate settings appear in each weblog’s Settings -> Plugin settings, so you can have different throttle values for different weblogs. However, I don’t see any way to keep the settings out of the System Overview -> Plugins, so you can set system-wide throttle values which will be completely ignored. Maybe someone can see a way to make use of the system-level settings; not me.
When you use the default refuse them behavior, you can tell that your throttle has been triggered by looking in the activity log. However, either because it’s an ErrorHandler doing the logging, or because $app->blog
isn’t set on a comment post, or more likely both, it only appears in the system-wide activity log, not in the activity log for that particular weblog. Even if you log
with the passed-in $app
in a Comment Throttle, it still doesn’t set the blog
field for that item. Maybe someone can find a way to properly log from inside a Comment Throttle; not me.
When you use the junk them behavior, you can tell that your throttle has been triggered by looking in the junk folder, and seeing that there are a bunch of comments with the test result “Junked, too many this (hour or day).” I did consider using moderation rather than junking, but because Movable Type nags you about every single moderated comment with a separate email, rather than sending something like “1 requiring approval,” then “2 requiring approval,” and “5 requiring approval” and then shutting up, it amounts to the same flood of email you would get if you didn’t have a throttle at all, and the throttle is there to save your sanity and your server, not to keep your readers from having to see more than 75 spams per hour. Maybe someone can figure out how to have Movable Type send just one email when the throttle gets triggered; not me.
Anyway, I’m done with it: the very minimal parts that are my original work (some of the variable names is all I can point at for sure) are in the public domain, the rest is under the same ambiguous licensing status that I used to steal them from Six Apart’s core code, built in throttle plugin code, and Nofollow and SpamLookup plugin code. If you want to take it over, just let me know when you have a release, and I’ll redirect people on to you.
Phil: just wanted to say thanks – this looks like a very good update. RCT has saved my sanity several times before.