MyBB Community Forums

Full Version: Stop users reporting admin staff
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2012-12-31, 05:27 PM)Leefish Wrote: [ -> ]Crikey Jordan - is that not going to cause a query per post on showthread?

This might be a task for template conditionals http://mybbhacks.zingaburga.com/showthread.php?tid=260

something like the below in postbit

<if !in_array($post['usergroup'], array (3,4)) then> {$post['button_report']}</if>

Not tested.

Tested and works.

The report option still seems to exist for my test account when I try this
Have you installed the plugin? Also the test account shouldnt be a admin or a moderator.
The report option will still exist - but not direct from the report button as the report button should be hidden. If you want to PREVENT it totally - then go with Jordan's suggestion.
If you did mine and Leefish's then it would work better. If a user clicks on the report button only to find that they can't report it, they will come away slightly annoyed.
(2012-12-31, 05:21 PM)JordanMussi Wrote: [ -> ]report.php
$usergroup = $db->simple_select("usergroups", "showforumteam", "gid = '".$post['usergroup']."'");
The $post array in report.php doesn't have the usergroup key.
Ill change the code back to what it was before Leefish came. - Changed
lol - I never told you to change the code Jordan - it is up to you to check what variables are in the report.php.
(2013-01-01, 04:07 PM)JordanMussi Wrote: [ -> ]Ill change the code back to what it was before Leefish came. - Changed

(2012-12-31, 05:21 PM)JordanMussi Wrote: [ -> ]
$user = $db->simple_select("users", "usergroup", "uid = '".$post['uid']."'");
$usergroup = $db->simple_select("usergroups", "showforumteam", "gid = '".$user['usergroup']."'");

You need to fetch the result.
It is fetching it isn't it?
(2013-01-01, 04:15 PM)JordanMussi Wrote: [ -> ]It is fetching it isn't it?

Not yet. Fetch the field.
Pages: 1 2 3