MyBB Community Forums

Full Version: Hide Admin in Memberslist.php 1.6.11
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I hide Administrator from Memberslist.php in mybb 1.6.11?

Please make a simple plugin because I don't want to modify core files.
If you want to hide all Administrators (users from Administrator group) from forum team page, just edit that group, and you'll see option "Show on forum team page?". Just unstick it.
Will that hide them from members list ?
Oh, I am really sorry. I thought somehow, you want to hide them from forum team page. My apology!

Take a look on this post:

http://community.mybb.com/thread-71537-p...#pid611656
Don't worry about it it's OK! How to make a simple plugin with this code I don't want to modefy core files because that will be a problem in the future when I will have to upgrade.

if($user['usergroup'] == 4 && $mybb->user['uid'] != 1)
        {
            continue;
        } 

Can I do something like this?
<?php

if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("memberslist");
function memberslist_info()
{    
    return array(
                "name" => "title",
                "compatibility" => "16*"
            );
}
function memberslist()
{
    if($user['usergroup'] == 4 && $mybb->user['uid'] != 1)
        {
            continue;
        }         
}
?>
Just one off topic suggestion for you, when you make something, and you want to know does It works, simply test it and you'll know, instead of asking.

If you're not in hurry, I can take a look in next few days about plugin for you. If you're in hurry just edit memberlist.php as above is stated, and when I make a plugin I'll send you it.
It does not totally hide the admin, you can use the Hide Super Admin tutorial on my site (link in sig) for more details to make it totally hidden. It does require that your admin account you want to hide is a super admin though.
below code segment should work for the plugin
function hideadmins()
{   global $mybb, $user;
    
    if($user['usergroup'] == 4 && $mybb->user['uid'] != 1)
        {    
		    $user['username'] = "";
        }        
}
(2013-10-15, 10:21 PM)Jovan J. Wrote: [ -> ]Just one off topic suggestion for you, when you make something, and you want to know does It works, simply test it and you'll know, instead of asking.

If you're not in hurry, I can take a look in next few days about plugin for you. If you're in hurry just edit memberlist.php as above is stated, and when I make a plugin I'll send you it.

Dear Jovan J and everyone thanks very much for your help.

.M. my love it works great thanks very much for your great support.