Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] Stop users reporting admin staff
#1
Not Solved
For some reason people report posts made by he admins staff on my site, Some because they didnt like what was said, others for the weirdest of reasons.

Just strikes me as a bit silly that people can report a sites admin to the sites admin so is there a way to stop this?
#2
Not Solved
Open report.php, around line 33
Find
PHP Code:
if(!$post['pid'])
{
    
$error $lang->error_invalidpost;
    eval(
"\$report_error = \"".$templates->get("report_error")."\";");
    
output_page($report_error);
    exit;

Replace with
PHP Code:
if(!$post['pid'])
{
    
$error $lang->error_invalidpost;
    eval(
"\$report_error = \"".$templates->get("report_error")."\";");
    
output_page($report_error);
    exit;
}
if(
$post['uid'])
{    
    
$query $db->simple_select("users""usergroup""uid = '".$post['uid']."'");
    while(
$user $db->fetch_array($query))
    {
        
$usergroup $cache->read("usergroups");
        if(
$usergroup[$user['usergroup']]['showforumteam'] == "1")
        {
            
$error "You can't report a team member's post.";
            eval(
"\$report_error = \"".$templates->get("report_error")."\";");
            
output_page($report_error);
            exit;
        }
    }

Not tested.
Tested and works.
You can also import this patch for the Patches plugin:
.xml   patches-stop-team-reports.xml (Size: 2.04 KB / Downloads: 95)
#3
Not Solved
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

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

Not tested.

Tested and works.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#4
Not Solved
It should only be a query per report.php page opening when pid has been specifyed. Is there a $post['usergroup'] variable?
#5
Not Solved
Yup - see my code for using template conditionals. Also very handy for css per usergroup.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#6
Not Solved
Mine basically does the same as yours now. Except it checks if the user who posted's group is part of the forum team. Yours only displays the button if the poster is not an administrator or a moderator, without any queries.
#7
Not Solved
By adding more group numbers to the array you can trim it down to whatever groups are part of forum team. I must admit, I use template conditionals a lot, so I rarely use plugins for showing and hiding - just that one plugin.

In fact - if I could have only ONE plugin - it might be that one....
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#8
Not Solved
You could never have one plugin. You always need XThreads. So if you were using template conditionals then you would have to count the number of plugins as two because XThreads is hiding at the base of the list. Toungue
#9
Not Solved
(12-31-2012, 05:41 PM)JordanMussi Wrote: You could never have one plugin. You always need XThreads. So if you were using template conditionals then you would have to count the number of plugins as two because XThreads is hiding at the base of the list. Toungue

Nope, I can live without XThreads more than I can live without template conditionals. Honest. Really. I can do this......

* Leefish wails and clings onto xThreads
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#10
Not Solved
* JordanMussi wonders if Leefish will make her own MyBB package that has xThreads included but without the plugin file.
* JordanMussi wonders if this is possible.
* JordanMussi thinks if it is can a fish do it? Toungue


Forum Jump:


Users browsing this thread: 1 Guest(s)