Apparently some people are receiving a good deal of spam comments on their blogs. In an effort to do something about this Kalsey brings up the idea of making it easier to delete comments:
When someone posts a comment, MT automatically sends me an email. That email should include a link to delete the comment and rebuild the entry. Then when a comment does slip through, its a simple matter to remove it.
This small hack doesn’t quite do this (no automatic rebuilding), but it certainly makes it easier to edit or remove new comments.
In order for this to work, you need to get down and dirty in the Movable Type perl files. This is naturally at your own risk, I have no responsibility even if cheese falls from the sky and reality shows are taken off the air because of any changes you make to your MT source files yadda yadda. Hint: Backup.
Follow these steps:
UPDATE: With version 2.661 of Movable Type, the line you’re looking for is 236. It still looks the same, and the rest of the instructions still work.
MT::Mail->send(\%head, $body);
my $cfg = MT::ConfigMgr->instance;
$body .= $app->translate('Edit this comment:') . " " . $cfg->CGIPath .
"mt.cgi?__mode=view&_type=comment&id=" . $comment->id.
"&blog_id=" . $blog->id . "\n" ;
so the entire section looks like
$body = Text::Wrap::wrap('', '', $body) . "\n$link_url\n\n" .
$app->translate('IP Address:') . ' ' . $comment->ip . "\n" .
$app->translate('Name:') . ' ' . $comment->author . "\n" .
$app->translate('Email Address:') . ' ' . $comment->email . "\n" .
$app->translate('URL:') . ' ' . $comment->url . "\n\n" .
$app->translate('Comments:') . "\n\n" . $comment->text . "\n\n";
my $cfg = MT::ConfigMgr->instance;
$body .= $app->translate('Edit this comment:') . " " . $cfg->CGIPath .
"mt.cgi?__mode=view&_type=comment&id=" . $comment->id.
"&blog_id=" . $blog->id . "\n" ;
MT::Mail->send(\%head, $body);
Jakob, thanks for the MT hack. Your directions were easy to follow and it works beautifully.
Just wanted to thank you for sharing that. :-)
Cool, it’s great hearing that some people actually got value from this :)
Movable Type: Easier edit/removal of new comments | mentalized.net...
Jacob,
I’ve been looking for this one for a while and have implemented your code. Thanks a lot.
Scott
mentalized.net: Easier edit/removal of new comments - add the edit link to your comment notification email to make editing (or...
I finally implemented this hack, and it isperfect, thanks! I was playing with the files after someone requested it on the MT forum, but couldn’t wrap my head around the variables. You rock! ;)
http://www.mentalized.net/journal/archives/2003/09/09/movable_type_easier_editremoval_of_new_comments/index.asp
The BurningBird has a quick and easy fix for MovableType users to try to help stem the tide of comment spam. According to Mark, it's just a "club" and not a "lojack", but I'll take what I can get until...
Thanks a lot for writing this out — I finally got a chance to set it up on my site, and its gonna really make things easier.
It seems like this might be a related hack — maybe a link below that one that says “ban this IP address” and adds the IP address of the commenter to the ban list? I could see that being pretty helpful too, with the comment spam that’s been going around lately. I wish I knew more perl!!! But, I don’t know how to pass the IP address into the form and make it save it. Maybe I’ll snoop around the code some more.
Thanks Jakob.
This (via Shirley) is much appreciated.
Well, I let my perfectionist tendancies get a hold of me (as well as the undeniable lure of feature creep)
Intrigued by a comment Kristine made on this post over at mentalized, regarding adding a delete comment link to the emails that MT automatically sends when a comment is added, I dug into MT a little to discover how to...
Movable Type: Easier edit/removal of new comments...
Nicely done.
Having hurt email, it would appear the spammers are moving on to blogs. Movable Type's popularity seems to have made it a target for the spam bots. The coding arms race has started......
Comment spam is suddenly the topic du jour in the blogosphere. I admit that even when suffering from writer's block, a single spam comment can inspire much ranting. While there's plenty of suggestions out there for how to stop comment spam, a lo...
The really great thing about open source, such as MovableType and Invision Board, is how strong the internal support and drive to improve can be. The software offers the flexibility, and the users reveal this flexibility through plugins and mods....
Hi, this is a very useful hack! Thanks to your instructions it’s easy to implement. I think it should become standard in the MT templates. Good work, thanks!
Does this work with the updated comments file with 2.661? I found the line where the code insertion is supposed to go around line 236 instead. And yet it would not work. Comments worked fine, just no line to edit or remove the comment. Thanks for any help and thanks for the hack.
Hm, it might. Let’s see.
Edit: Yup, seems to work still
Thanks. It works great and sends you right to the fancy editing screen.
This is a great idea. I just implemented it on my own blog and it works very well! Very slick. :)
I’d like to add that if you’re running MT-Blacklist, you’ll also need to edit the /extlib/jayallen/MTBlPost.pm file. For bloggers using MT 2.65, you need to edit at or near line #195. For those of us using MT 2.66 or 2.661, you need to edit at or near line #405.
Enfim achei o plugin que tanto estava procurando... Funciona da seguinte maneira: Quando alguém faz um comentário no meu blog, eu recebo e-mail com uma notificação sobre o comentário feito, o plugin nada mais faz do q...
我就算天天更新mt-blacklist,這兩天spam又變多了,已經到了無可救藥的地步了嗎? 一個方法是,揚棄MT,換另一個blog系統?可能很麻煩,我麻煩大家也麻煩,好不好用還不知道。 網路上找資料...
Almost immediately after I got rid of the security code, I got six spam comments advertising some online poker website. So I did a little research and found some great solutions here and here. Thank you, online blogging community!...