Help - Search - Members - Calendar
Full Version: Comment Notification
Movable Type Community Forum > Additional Resources > Tips and Tricks
persnit
How do I hack MT so that I don't receive a notification when I post a comment to my own site?  I tried an old hack but it didn't work in the current MT version.

Thanks!

Jill
urbandyke
Hi Jill.

CODE
lib/MT/App/Comments.pm

/* No email notification on own comments */
CHANGE THIS:
MT::Mail->send(\%head, <BODY);

TO THIS:
MT::Mail->send(\%head, $body) unless $author->email eq $comment->email;
persnit
Thanks. Tried it but I am still getting the email. Did a full rebuild after uploading the file too.  Can't figure out why it isn't working.  LOL
urbandyke
is your email address correct in your profile? that was the problem i had..  :D
persnit
OMG care to guess what silly thing it was?  I have two copies of the comments.pm file.  The original and an altered one I keep in a seperate folder on my pc.  I somehow managed to alter the original and was uploading the UN-altered copy. LOL!!!!!!!!!  Boy do I feel stupid now. LOL

Thanks for your help!

Jill
urbandyke
That is weiiird. Sorry I couldn't help more.  :)
persnit
LOL I was editing my post as you posted your reply.  All fixed.  See my silly mistake in the above reply. *blush*
wujimon
Hi. Is there a way to check the entry author and comment author instead of using the email?

I've tried the following variations and none of them seemed to work.

unless $author->name eq $comment->author;
unless $entry->author eq $comment->author;
unless $author eq $comment->author;

Any help on this would be greatly appreciated wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.