Some of you may have noticed the atrocious comment spam that’s been popping up here lately. I’ve deleted the comments as I’ve found them, but the spammers are finding old comment threads and flooding them with junk.
When the new version of MT came out, I upgraded, but didn’t do anything about the new feature that lets you close old comment threads. I’ve just closed all but a handful. Rather than do it by hand for 450+ entries, I used a little SQL that I’m sharing here for those who don’t deal with databases on a regular basis:
update mt_entry set entry_allow_comments = 2 where entry_blog_id = 1;
This closes all comment threads in the blog whose ID is 1. (To find out what your blog ID is, check the URL while you’re managing your blog. You should see “&blog_id=[number]” somewhere toward the end.)
To reopen the comments on your last few posts, find the entry ID (again, check the URL) of the earliest one you want comments on, and then use this:
update mt_entry set entry_allow_comments = 1 where entry_blog_id = 1 and entry_id > #;
where # is the entry ID you found. Or, you can find that ID before you run the first command, and do it in one step:
update mt_entry set entry_allow_comments = 2 where entry_blog_id = 1 and entry_id < #;
You can reopen the comments on a single old post by doing something like this:
update mt_entry set entry_allow_comments = 1 where entry_blog_id = 1 and entry_id = 258;
You’ll need to rebuild when you’re done. And when you’re done you can, like me, put installing MT-Blacklist on your weekend to-do list.