Comment Moderation - Changing the Behavior.

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Comment Moderation - Changing the Behavior.

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Post by psiege »

Excellent, thanks for the help!

I'll give this a go.
Post Reply