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.
the wierd thing i was having the main problem with was that i never edited that file then all of a suddent it didn't work. that's why i asked, if you look a couple posts bafck i had it working.
thankyou - great support
also, i have a quesiton.
I don't know if this is your hack or the boards but here it goes.
I add moderators to boards and if i say add a moderator to board a he has acces to board b which is privated. It automatically gives it to him. Any ideas? and i don't want this.
What i'm saying is i add a mod to one board and he has access to evrything - i just want him to have access to his priv board that he moderates
what happens is they automatically have access - they can only change masks to their forums - but as soon as i make someone a mod they get all the permissions for the private forums.
[QUOTE]other problem could be that you may have the access masks set for the private forum so that all moderators can see it.
is where they are contained, there is nothing in the code which would allow mods to see private forums, unless they are a mod of that forum or category and they set it themselves for them to see it using this hack, that is the one issue.
I'm gonna have to find a solution to that, as one of my mods gave themselves permission to see the admin forum as they were a mod of the category they were in.
what happens is they automatically have access - they can only change masks to their forums - but as soon as i make someone a mod they get all the permissions for the private forums.
how do i change that? ^^^^^^^
Your running into the same problems as I did
When you add a moderator, they automatically get shifted into the Moderators usergroup, and access masks are set for all private forums.
This is how my ### Start Insert ### in admin/forum.php looks
PHP Code:
$mods=$DB_site->query("SELECT DISTINCT moderator.userid FROM moderator,user WHERE moderator.userid=user.userid AND user.usergroupid<>6 AND user.usergroupid<>5");
if ($DB_site->num_rows($mods)) {
while ($mod=$DB_site->fetch_array($mods)) {
$accessto[] = $mod['userid'];
}
while ( list($key,$userid)=each($accessto) ) {
// CODE EDIT BY MARTZ!!!
// Line was commented out to stop custom permissions for all moderators on the board being assigned
// when a new private forum is added.
// $DB_site->query("INSERT INTO access (userid,forumid,accessmask) VALUES ('$userid','$forumid',1)");
}
}
}