Dan is sick of comment spam and has realized that if he closes off old comments, it'll probably reduce comment spam. He's right. I've been doing this for months now and it's very effective. So, as my Giftmas gift to the blogging world, here's my whopping 26 lines of Perl code to do the job: blog_close_comments.pl.
It should be easily adapted for anyone using MT and MySQL.
Oh, the Blog::DBI module it requires looks like this.
You'll obviously need your own version.
It's not elegant or fancy, but it's working code that Does The Job and that's what's important. I could have written this using the MT API, but I was in a hurry. Someday I may fix that if I get ambitious.
UPDATE: The Blog::DBI module is not something from CPAN. It's meant to be installed "locally" rather than system-wide. I use it to supprt about half a dozen little blog/perl hacks I have. And it's actually a bit larger than the version I posted. Also, Derek sent a patch to make the blog_id an argument on the command-line. I've applied that.
Posted by jzawodn at December 25, 2003 06:44 AM