Quote:
Originally Posted by PKRWUD
I was going to say I noticed that the Warnings by Warners Statistic doesn't list anyone in the other three usergroups. If you get a chance, and have the time, I'd appreciate it if you could note where else I will need to make changes.
I first tried adding an "OR" to each one, followed by it's counterpart, but that made it possible for all the staff to warn in every forum, and allowed the members to see the links. The way it is now, every staff member can see the WARN image, and the view links, but only the super mod, admin, and the specific mod for that forum can see and use the warn links. It may not be right, but so far, I absolutely love it. It took me a couple hours to install it, but I haven't received a single error message yet, and for me, that's an accomplishment worth celebrating.
The two Admin usergroups are for webmaster and admin, which have slightly different abilities, but are still both admin. The rest of the usergroups were doubled a couple years ago when we decided to create a second usergroup for sponsoring members, sponsoring moderators, and sponsoring super mods, and everything has just been built around that ever since.
I'm sure there was/is an easier method, but I'm a mechanic, not a coder, and this stuff is as foreign to me as cooking. lol.
|
That's easy. Edit your admin_warn.php file and find:
PHP Code:
if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7) ORDER BY userid");
Replace that with:
PHP Code:
if ($_GET['act'] == "viewstats2")
{
$get_warns=$DB_site->query("select wt.userid, wt.username, wt.usergroupid from
".TABLE_PREFIX."user wt WHERE (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=13 OR usergroupid=21 OR usergroupid=20 ) ORDER BY userid");
As for the other changes, what you should do, is make sure that wherever there is a reference to group 6, there is also a reference to the equivalent group. Typically, the two references should be OR-ed and even better put them in a parenthesis like ($bbuserinfo[usergroupidi]==6 OR $bbuserinfo[usergroupid]==13 ). Same with the rest.
Let me know how you are progressing.
Rgds