MyBB Community Forums
Report post to group/s - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Report post to group/s (/thread-210541.html)



Report post to group/s - sarisisop - 05-20-2017

Hello does anyone know if there is a way to send the report post email to a group?

If a member reports a post it currently sends an email to Admin (gid=4), Super Moderators (gid=3) and  Moderators of a forum (gid=11) (gid=6)

I would like the email report to only go to Admin (gid=4) and Moderators (gid=3)  

Thank you.


RE: Report post to group/s - dragonexpert - 05-20-2017

ACP->Config->General Configuration. For Reported Content Notification Method, choose Sent Via Email & Show in Mod CP. It only sends to those who are a global moderator or are a moderator for the forum in which the reported post is in. If you want something else, you'll need to make a post in Plugin Requests or Requests / Services.


RE: Report post to group/s - sarisisop - 05-20-2017

(05-20-2017, 03:31 PM)dragonexpert Wrote: ACP->Config->General Configuration.  For Reported Content Notification Method, choose Sent Via Email & Show in Mod CP.  It only sends to those who are a global moderator or are a moderator for the forum in which the reported post is in.  If you want something else, you'll need to make a post in Plugin Requests or Requests / Services.

Yes that's the problem I don't want it to go to moderators of a forum. I only want it to go to global moderators and admin. I don't want a plug-in for it though.

Do you or anyone know what file sends the Email? there may be a way of adding a group only basis in there.

Or I wonder if the Template Conditionals plugin could do something.


RE: Report post to group/s - dragonexpert - 05-20-2017

Looks like it is inc/functions_modcp.php.


RE: Report post to group/s - sarisisop - 05-21-2017

(05-20-2017, 05:28 PM)dragonexpert Wrote: Looks like it is inc/functions_modcp.php.

Thank you, I had a look but couldn't work out which part to remove to stop it going to Forum Mods.

Would you know which part to remove please, or what change I would need to make. ?


RE: Report post to group/s - dragonexpert - 05-21-2017

Remove the g.issupermod = 1 part. Keep in mind that if your supermoderators have access to the Admin CP they would still get an email anyway.


RE: Report post to group/s - sarisisop - 05-21-2017

(05-21-2017, 01:18 PM)dragonexpert Wrote: Remove the g.issupermod = 1 part.  Keep in mind that if your supermoderators have access to the Admin CP they would still get an email anyway.

Gave this error.

Type: 20
File:  (Line no. 0)
Message
SQL Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 5
Query: 
 SELECT DISTINCT u.username, u.email, u.receivepms, u.uid
 FROM mybb_users u
 LEFT JOIN mybb_moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', m.id, ',%')) AND m.isgroup = 1)
 LEFT JOIN mybb_usergroups g ON (CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%') OR g.gid = u.usergroup)
 WHERE m.fid IN (3,4) OR g.cancp = 1 OR 

Sorry I got it. I neded to remove OR too.

OR g.issupermod = 1

Thank you for your help

Smile

Ok it looks like I jumped the gun.

I thought it was only goint to Admin, but the report is still going out to moderators assigned to a forum.


RE: Report post to group/s - sarisisop - 05-25-2017

Ok I worked it out. If anyone else wants to stop moderators of a forum getting an email of a reported post you need to change the "m.isgroup =" from 1 to 0

Line 171:
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR ',' || u.additionalgroups || ',' LIKE '%,' || m.id || ',%') AND m.isgroup = 1)";
}

Line 175:
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', m.id, ',%')) AND m.isgroup = 1)";
}