OK, from insite adminpermissions.php I see the following code:
Code:
if (!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY)))
{
print_stop_message('sorry_you_are_not_allowed_to_edit_admin_permissions');
}
So, if I want to make this work in reverse, can I remove the ! as follows?
Code:
if (in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY)))
{
Option belongs in here;
}
EDIT - OK, the first code locks non-superadmins out of a file... I just want to also hide the admin option.... where are the option sin the left of teh AdminCP stored and how can I add a conditional to them in a similar way to the second code above?
OK, I think I found the code.... not that I know just how to use it yet?
It looks to me like the permissions for the navigation in the AdminCp is defined in the /includes/xml/ files...
For example:
<navgroup phrase="sr_classifieds" permissions="canadminusers" displayorder="15">
I see similar files for things like vBa, my classifieds, my links directory, etc....
I went into the adminpermissions.php file and I am still quite clueless how this all works....
I would really like to know how I can add new areas under the "Admin Permssions" area such as (Can Administer Classifieds, Can Administer Links, Can Administer vBAdvanced) then use those permissions as assignd to the Admin group to selectively show these CP options....
Perhaps this is too complicated for what I am going to gain from doing this...