Page 1 of 1
Comment notification options
Posted: Mon Aug 14, 2006 9:15 pm
by Shoup
I'm not sure if this is a bug or not, but I have turned off comment notification for all users except the admin, but the users are still receiving comment notifications. I have all entries set to require moderation of comments, but we want our admin to have the ability to approve or delete them. Is the moderation requirement causing the notifications to be sent?
I thought about setting everyone's e-mail address to the admin, but if I did that they couldn't retrieve their passwords if they lose them. However, if I did that, then all comment notifications would get sent to the admin, which is what we'd like to have happen.
Re: Comment notification options
Posted: Tue Aug 15, 2006 9:34 am
by garvinhicking
Hi!
Yes, when comment moderation is turned on, comments are sent to Admin users of the blog/owner of the entry. Otherwise nobody would receive a notifiction, and s9y thinks that this should not be the case.
But we have tracked this thing on our SF.Net bugtracker, and I think there should be some kind of switch to "unforce" this. An easy temporary workaround is just to enter an invalid email address for your administrator(s) - but you are right that then password retrievals wouldn't work...
Best regards,
Garvin
Posted: Tue Aug 15, 2006 3:29 pm
by judebert
So could we get around it by creating a new group, with the same permissions as Admin but with a different name, and moving all the non-Admin users to that group?
Posted: Tue Aug 15, 2006 3:49 pm
by garvinhicking
Hi!
I think the comment mail notification thingie evaluates the "userlevel" attribute of a group. Thus it wouldn't help creating another amdin-group with the same userlevel; and that userlevel would be required to make it a real admin in older plugins.
Regards,
Garvin
Posted: Tue Aug 15, 2006 5:55 pm
by Shoup
garvinhicking wrote:Yes, when comment moderation is turned on, comments are sent to Admin users of the blog/owner of the entry. Otherwise nobody would receive a notifiction, and s9y thinks that this should not be the case.
So if I turn on notification for the admin and have that account as a member of all groups, would that cause notifications to be sent to the admin even if it isn't the entry author?
What we're looking for is a way to have every admin-level user receive all notifications of comment postings regardless of who the author is. We don't want the actually bloggers to receive the notifications because they don't have the access privileges to approve comments.
Posted: Wed Aug 16, 2006 11:30 am
by garvinhicking
Hi!
Okay, I'm sorry for the confusion. I now looked at the code, and can now clarify.
In include/functions_comments.inc.php the function serendipity_saveComment() handles when a new comment comes in.
With this query it fetches the owner of an entry:
Code: Select all
$query = "SELECT a.email, e.title, a.mail_comments, a.mail_trackbacks
FROM {$serendipity['dbPrefix']}entries e, {$serendipity['dbPrefix']}authors a
WHERE e.id = '". (int)$id ."'
AND e.authorid = a.authorid";
So the E-Mail is fetched from the owner of an entry and later a check sees if either comment moderation is turned on, or if the user wishes to be notified of comments/trackbacks all the time:
Code: Select all
// Send mail to the author if he chose to receive these mails, or if the comment is awaiting moderation
if (serendipity_db_bool($ca['moderate_comments'])
|| ($type == 'NORMAL' && serendipity_db_bool($row['mail_comments']))
|| ($type == 'TRACKBACK' && serendipity_db_bool($row['mail_trackbacks']))) {
serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']));
}
I confused the admin-thing with another plugin that would send notifications to all admins - but I don't know with what I confused that.
HTH,
Garvin