Version: , by Scott MacVicar
Developer Last Online: Mar 2016
Version: 2.2.x
Rating:
Released: 09-21-2001
Last Update: Never
Installs: 35
No support by the author.
There was another version around on the board but it had problems with moderators who had access to moderate a forum through inheritance, ie they were moderator of a category. This code is in no way based on the other version, but no doubt will be similar as there isn't really much of a difference you can make.
This is just really an alternative to letting mods ban people from the whole forum, they can simply ban from a single forum.
Once you have done what it says in the instructions when you add a moderator you will have permission to say if they can edit forum access masks for that particular forum. Remember if they are mod of a category and the edit acccess masks option is enabled then all the forums in this category moderated by the user through inheritance have the ability.
Supermods and Admins can edit all access masks via the mod control panel.
This has been tested on
vb 2.0.1, 2.0.2 and 2.0.3 they all work
also tested on
vb 2.2.0 and 2.2.1 these also work.
I had a small error in the permissions checking for the updateaccess which i just noticed and corrected, so if you have installed this before November 21st it may be advisable to update the /mod/user.php part which involves the updateaccess part.
Not that your mods would want to change access masks for forums they don't mod
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
$edituser=$DB_site->query_first("SELECT username,userid,usergroupid FROM user WHERE userid=$userid");
$ismod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");
change the $ismod to $is_mod here, it only needs to be done once and only at that point, then change the following.
PHP Code:
if ($edituser['usergroupid']!=2 or $ismod) {
echo "<p>You may not edit access for someone who is not a normal registered user!</p>";
$stop=1;
}
change the $ismod to $is_mod i'd never noticed this as i've always used supermod and admin to test this never normal moderator. I recommend that all people update this to deal with this problem.
$ismod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");
to
PHP Code:
$is_mod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");
please make sure you get the right one as there is an identical one that uses $ismod and this is what causes problem, I had two things with the same variable, i don't recommend commenting it out as this allows mods to edit the access masks of anyone, including their own.
Yep, and I for the same reasons. Theres quite a few clan runners out there using vB - which is why I think there is a market for a Community Hosting Control Panel, as I call it on our forums.