Perl version of the Comment Queue hack

You have probably all seen the Comment Queue hack over at scriptygoddess. Well, a couple nights ago Cheyenne asked me to install it for her, as she has been having troll problems lately.

The Comment Queue script requires PHP and a MySQL backend and gnome-girl.com is not using a MySQL backend. Needless to say, it would be a chore and then some to migrate her site to MySQL. So, as you may have heard if you read her site, I quickly threw together a perl version for her to use, and I thought I would release it to the general public now. The interface leaves a little (okay, quite a bit) to be desired, but it works.

So, if you want to use it, after you perform the changes to the MT files and database (only if you are using MySQL) as described in the hack, just download one of the following files, unpack it, and place mt-comments-pending.cgi in your base MT directory. Be sure to chmod it to 755 so it can be executed.

8 TrackBacks

This Script/MT Hack will make it so that all comments to your blog(s) will go into a "pending" status. You can login into the script, see all the "pending" comments. Review them. Edit them. Delete the ones you don't want... Read More

David Raynes has created a Perl version of the CommentQueue hack which I use for the pre-moderation of comments. Read More

I was absolutely horrified when I read Phil Ringnalda's comment spam alert story last year in which a Las Vegas real estate agent used a script to try to autogenerate comments to every single one of Phil's entries, including links to the spammer's real... Read More

This Script/MT Hack will make it so that all comments to your blog(s) will go into a "pending" status. You can login into the script, see all the "pending" comments. Review them. Edit them. Delete the ones you don't want... Read More

Thanks to what is now commonly known as blog "comment spam", I had shut my blog comments off last November for several months until I could take the time to figure out how I wanted to "deal" with it... at... Read More

Commenting from Eric Rosenfield on April 24, 2004 4:12 PM

I just installed a module that will solve all my commenting problems by allowing me to approve or deny comments... Read More

YEah I finally got rid of most of the damm SPAM on my site. I also installed a frankenstiened comment... Read More

6 Comments

Answer to a prayer -- there's a lot of MT sites that were hit by some auto comment-spam tonight, and this script might be seeing a lot of traffic soon :)

There's one feature you don't mention, and I wonder if it is even possible (not being very intimate with MT internals): Could it insert some URL into the blog-owner notification email where, if clicked, it would confirm or reject the comment? Going to a list has it's uses too, but I most often get isolated comments and a one-click solution would be easier to manage.

For a really fancy wishlist item, I would love to see an email sent to the comment author as well, with the same confirm/reject URLs in the message; this way, if I am on the road, people can still comment to my blog, but I'll be assured they are using a valid email address.

Dave, thanks for creating this script! My weblog got comment spam, and after a few hacks (I use postgres at the back-end, so I modified the tables necessary) I got your script to work! Sweet!

Thanks!! I needed this. I suppose I should take it as a compliment that my site is now a target. BTW, I wrote up some instructions for installing this that some folks may find helpful ( http://www.idblog.org/archives/000329.html ).

Now any ideas for getting [MTComments lastn="8"] to stop returning unapproved comments?

Just thought I'd let you know that on my site mt_comments_pending.cgi showed "No comments pending." always until I changed
my @comments = MT::Comment->load ({ entry_id => '0' }) or return $html."

No \
pending comments found

";

to

my @comments = MT::Comment->load ({ entry_id => '' }) or return $html."

No \
pending comments found

";


and then it worked. I don't know why (it does say entry_id('0') in Comments.pm), but I thought of it after I noticed that the id= field in the URL line was always id=& rather than id=0& as it should have been.

I've just made two changes to the script that I think are useful. First, I swapped the order of the buttons so that it was easier to click the delete button (it's always in the same place...the button on the right shifts based on how wide the first column is). Second, I added a "Deny All" function, which is very helpful when you get auto-spammed.

My perl is very rusty, so I'm sure this could have been coded better, but as they say, it works for me...you're mileage may vary :).

See http://www.idblog.org/archives/000477.html

Leave a comment

Recent Entries

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

  • The Olympics Make Me Want To Compete Again

    Every time the Olympics come around (most the summer ones) I always start to delude myself into thinking I could complete once again in the...

  • Minimalist plugins are fun!

    Last night I whipped up one of the smallest plugins I’ve ever written. It is so small in fact that I was able to stuff...

  • Feedburner Widget on MT News

    Movable Type News A WordPress 2.5 Upgrade Guide: And of course there are lots of third-party plugins for the MT dashboard, to integrate statistics and...

  • AD&D Monster Stats for the Presidential Canditates

    Charles Stross (scifi author, D&D nerd, and former perl columnist) posted Politics as she is Played with 3d6: The recent death of Gary Gygax, who...

Close