Page 1 of 1

Comment Moderation - Changing the Behavior.

Posted: Thu Jul 17, 2008 7:14 pm
by psiege
It appears that when a comment is marked for moderation, the moderation announcement is sent to the author of the particular blog post, and not the blog admins. This is not advantageous for a multi-author blog. Is there a way to change this behavior? I'd much rather all of the admins get notification for comment moderation.

Thanks in advance for any help!
Chris

Posted: Thu Jul 17, 2008 8:31 pm
by judebert
There's no plugin for this. It'll require modifying code.

In include/functions_comments.inc.php, around line 625 or so (depending on version), you'll find a line that looks like:

Code: Select all

serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']));
Change the $row['email'] (the second argument) to the email address you'd like comment and moderation announcements to go. If you want it to go the "Blog's email address" as configured in admin, you can use $serendipity['blogMail'].

If you want more than one moderator to receive the email, you'll have to loop through them or collapse them into a single RFC-822 address string.

Posted: Thu Jul 17, 2008 8:49 pm
by psiege
Excellent, thanks for the help!

I'll give this a go.