tips and tricks for movable type

comment notification hack
September 07, 2002

Adam Kalsey offers a hack to stop MT from sending you notification when you make a comment on your own blog.

Open lib/MT/App/Comments.pm and find this line (line 123 in MT 2.21):

MT::Mail->send(\%head, <<BODY);

Change it to read:

MT::Mail->send(\%head, <<BODY) unless $author->email eq $comment->email;

Note that the email address you use in your comment must be the same as the email for your author name in MT.

Comments

I just upgraded to MT 2.6 and ran into trouble when I tried hacking the comments.pm file.

Fiddled around with it until I realized that the new line should now read...

MT::Mail->send(\%head, $body) unless $author->email eq $comment->email;

Just thought I'd pass the info along.

by patricia | 02.13.03 11:47 PM

Just for what it's worth, I used the line from the original tip in Movable Type 2.63 and it worked fine for me.

by Andrew | 03.18.03 09:46 PM

Do you have an update for this that works for 3.15? Thanks, Andrew

by Andrew Hecht [TypeKey Profile Page] | 02.03.05 10:03 PM

Does this hack work for MT 3.x?

thanks,

Andrew

by Andrew Hecht [TypeKey Profile Page] | 02.22.05 02:39 PM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 6
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/74)

» Geeky part 238
Excerpt: For my MT pals:: The Girlie Matters is an incredible source for MT tips and tricks. If you haven't visited her site yet, you really should. My latest finds:Login Form on Main Page:: handy for blogs with multiple authors.Change Number of Entries:: good ...
Weblog: As deep as a puddle after a hard rain
Tracked: 01.15.03 11:51 PM

» I'm fearless
Excerpt: You'd think after the trouble I caused earlier I wouldn't have been in such a hurry to upgrade to MT 2.6, but I'm more impatient than trepidatious so I chanced it. I'm happy to say I had no troubles at all. Woohoo. I think this speaks more to how user
Weblog: As deep as a puddle after a hard rain
Tracked: 02.14.03 12:17 AM

» Comment notification hack
Excerpt: I'm putting this here so I can find it next time I upgrade MT. :) Comment notification hack: Open lib/MT/App/Comments.pm
Weblog: Unix Gal
Tracked: 03.03.03 10:37 PM

» Preventing Emails From Yourself in MT
Excerpt: For anyone interested in preventing emails from themselves when they comment on thier own blog, check this hack. Pretty spiffy....
Weblog: J.A.S.O.N - Just A Simple Online Nerd
Tracked: 03.04.03 09:54 PM

» The Magic Behind the Curtain
Excerpt: I just wanted one central place where I could record all the little dodads that make this site tick. Plugins MT Paginate MT Entry If Comments Global Listings MT Other Blog Smarty Pants Simple Comments Archive Date Header Word Count...
Weblog: Lunanina.com
Tracked: 08.10.03 01:13 AM

» Bloggie Scripty Reverb
Excerpt: BB's Script, Plugin and Hack Archive as of 3/1/04: Collapse...
Weblog: Bloggie Broad
Tracked: 03.01.04 05:43 PM