Fix an annoying comment notification quirk in Movable Type. Continue reading...
17
well done ! thanks
it didn’t work for me… when i chsnge the code above and then try to open my popup-comment-window i get this:
An error occurred: syntax error at lib/MT/App/Comments.pm line 145, near “}” (Might be a runaway multi-line << string starting on line 124) Compilation failed in require at mt-comments.cgi line 21.
It sounds like your code is incorrect. Make sure you don’t have a semicolon (;) before the “unless” and that you do have one at the end of the line. You might want to copy the code directly from this page and paste it into your code. All the code should be one a single line. If there are line breaks, remove them.
Awesome! Thanks!
I just upgraded to MT 2.6 and ran into trouble when I tried hacking the comments.pm file.
For this to work in 2.6 the line should read…
MT::Mail->send(\%head, $body) unless $author->email eq $comment->email;
It’s just a small change from << to $ in front of ‘body’. Just thought I’d pass the info along.
Trackback from Through the Looking Glass
Comment hack
Excerpt: If you're using Moveable Type, this is an extremely useful hack - by simply replacing a line in the code, you can still be notified by e-mail when someone comments on your site, but you won't receive the e-mail when...
Thanks for this hack! Worked a treat! (Its on line 152 in 2.6…)
Trackback from izzy|wizzy
Ban Those Spam Comment IPs
Excerpt: 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...
Trackback from ShawnAllison.com
Comment Notification Hack for Mt-Blacklist
Excerpt: This is my first attempt to share I hack I've made based on a few others hacks around the web. It worked for me but...
Trackback from PromoGuy dot Net
Blacklisted and Tweaked
Excerpt: MT-Blacklist appears to supercede any mods you've made to comment notifications. Here are a few links to work-arounds, plus a few other Comment Notifcation Mods you may want to try, and some nifty hacks I found along the way.
Trackback from nf0's Life
Nightly Link Dump
Excerpt: Sony Ericsson: P900 Possibly my Next phone, once it works with a Mac Wired News: TV on DVD: What's the Difference? I think its crapy, and just something else wrong with the music industry. I read that the new Roswell DVD's have the music replaced. I t...
Has anything been done to fix this for MT 3x? I’m getting sooooo tired of getting my own comments.
I’d really appreciate an answer and I’d more appreciate a posted fix!
Thanks.
i don’t know how dirty it is, but i changed lines 471 and 472 in lib/MT/App/Comments.pm (MT-3.15) from:
MT::Mail->send(\%head, $body)
or return $app->handle_error(MT::Mail->errstr());
to
MT::Mail->send(\%head, $body) unless $author->email eq $comment->email;
# or return $app->handle_error(MT::Mail->errstr());
to get rid of the annoying self-comments.
i’m sure you could just use a filter in your email app, too.
Heather’s mod worked for me. thanks heather and adam!
FYI, if you would like to do this in MT v.3.1x and have MT-Blacklist installed, the file to modify is called Submission.pm, located in your plugins folder: plugins/Blacklist/lib/Blacklist/App/Submission.pm
Around line 797 (almost the very bottom of the file) you can use Heather’s mod above.
Seems to work for me. Hope someone else finds this useful!
FYI, its lines 578-579 in MT 3.2
This discussion has been closed.
Adam Kalsey
Mobile: 916.600.2497
Email: adam AT kalsey.com
AIM or Skype: akalsey
©1999-2010 Adam Kalsey.
Content management by Movable Type.
sweet! thanks