Version: , by (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 01-24-2001
Last Update: Never
Installs: 0
No support by the author.
Hello,
i have at the moment ca. 74 UserGroups on my Board.
Every Day I have 2 new UserGroups.
When I add a new private Forum , only the 4 Standard Groups have the Permisson "Can View Board = NO"
All other Groups i must change the Permisson manual
Now I need a Hack for the forum.php3 to add the Permission "Can View Board = NO" to all existing Groups.
I have found the follow Code in forum.php3:
Quote:
if ($private==1) {
$usergroup=$DB_site->query_first("SELECT title,usergroupid,canview,cansearch,canemail,canpo stnew,canreply,canadminedit,canedit,candelete,cano penclose,canmove,cancontrolpanel FROM usergroup WHERE usergroupid=1");
$DB_site->query("INSERT INTO forumpermission (forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canreply,canadminedit,c anedit,candelete,canopenclose,canmove) VALUES (NULL,1,$forumid,0,0,0,0,0,0,0,0,0,0)");
$usergroup=$DB_site->query_first("SELECT title,usergroupid,canview,cansearch,canemail,canpo stnew,canreply,canadminedit,canedit,candelete,cano penclose,canmove,cancontrolpanel FROM usergroup WHERE usergroupid=2");
$DB_site->query("INSERT INTO forumpermission (forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canreply,canadminedit,c anedit,candelete,canopenclose,canmove) VALUES (NULL,2,$forumid,0,0,0,0,0,0,0,0,0,0)");
$usergroup=$DB_site->query_first("SELECT title,usergroupid,canview,cansearch,canemail,canpo stnew,canreply,canadminedit,canedit,candelete,cano penclose,canmove,cancontrolpanel FROM usergroup WHERE usergroupid=3");
$DB_site->query("INSERT INTO forumpermission (forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canreply,canadminedit,c anedit,candelete,canopenclose,canmove) VALUES (NULL,3,$forumid,0,0,0,0,0,0,0,0,0,0)");
$usergroup=$DB_site->query_first("SELECT title,usergroupid,canview,cansearch,canemail,canpo stnew,canreply,canadminedit,canedit,candelete,cano penclose,canmove,cancontrolpanel FROM usergroup WHERE usergroupid=4");
$DB_site->query("INSERT INTO forumpermission (forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canreply,canadminedit,c anedit,candelete,canopenclose,canmove) VALUES (NULL,4,$forumid,0,0,0,0,0,0,0,0,0,0)");
}
Can anyone help me to make a Code for my Problem.
I have test the follow Code , but now in every Group I have 3 Permissions for the same Board.
Quote:
if ($private==1) {
$dbresult=mysql_query("SELECT usergroupid FROM usergroup");
while($zeile=mysql_fetch_array($dbresult)){
$usergroupid=chop($zeile["usergroupid"]);
$usergroup=$DB_site->query_first("SELECT title,usergroupid,canview,cansearch,canemail,canpo stnew,canreply,canadminedit,canedit,candelete,cano penclose,canmove,cancontrolpanel FROM usergroup WHERE usergroupid=$usergroupid");
$DB_site->query("INSERT INTO forumpermission (forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canreply,canadminedit,c anedit,candelete,canopenclose,canmove) VALUES (NULL,$usergroupid,$forumid,0,0,0,0,0,0,0,0,0,0)") ;
echo "Hiding fuer Usergroup $usergroupid erfolgreich ";
}
Thx for any Help.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Usergroups have been redone in 2.0. If problems like this haven't been fixed in that version as well as current problems with managing moderators, I will most likely end up re-writing the way usergroups are handled to act more like classes where groups can be grouped.
However I do not plan to put such effort into vBulletin 1.1.X because it will create upgrade problems.