This site runs with your support. Please donate:
Evaders Squadron Coding [ESC] :: View topic - Fix: Setting Users Permissions
View previous topic :: View next topic
Author
Message
Evaders99 Joined: Jan 11, 2002 Posts: 3079 Location: USA
Posted: Sun Feb 11, 2007 2:24 am Post subject: Fix: Setting Users Permissions
Can't set your users to moderate individual forums? Here's a fix for those using the latest BBToNuke versions.
in modules/Forums/admin/admin_ug_auth.php
Code:
FIND
$sql = "SELECT user_id FROM " . USER_GROUP_TABLE . " WHERE user_id = '$user_id'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$user_check = $row['user_id'];
REPLACE WITH
$sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE user_id = '$user_id'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$user_check = $row['user_id'];
$group_id = $row['group_id'];
FIND
message_die(GENERAL_ERROR, 'Could not create private group', '', __LINE__, __FILE__, $sql);
}
}
REPLACE WITH
message_die(GENERAL_ERROR, 'Could not create private group', '', __LINE__, __FILE__, $sql);
}
$sql5 = "SELECT forum_id FROM " . FORUMS_TABLE . " WHERE 1;";
$result5 = $db->sql_query($sql5);
while($row5 = $db->sql_fetchrow($result5)) {
$sql6 = "INSERT INTO " . AUTH_ACCESS_TABLE . " (group_id, forum_id) VALUES (" . $group_id . ',' . $row5['forum_id'] .")";
$result6 = $db->sql_query($sql6);
}
} else {
$sql5 = "SELECT forum_id FROM " . FORUMS_TABLE . " WHERE 1;";
$result5 = $db->sql_query($sql5);
while($row5 = $db->sql_fetchrow($result5)) {
$sql6 = "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id AND forum_id = " . $row5['forum_id'];
$result6 = $db->sql_query($sql6);
if ($row6 = $db->sql_fetchrow($result6)) { } else {
$sql6 = "INSERT INTO " . AUTH_ACCESS_TABLE . " (group_id, forum_id) VALUES (" . $group_id . ',' . $row5['forum_id'] .")";
$result6 = $db->sql_query($sql6);
}
}
}
_________________Evaders99
Webmaster
Administrator
Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
The cake is a lie.
Back to top
Evaders99 Joined: Jan 11, 2002 Posts: 3079 Location: USA
Posted: Sun Feb 11, 2007 11:12 pm Post subject:
Can't set your users to individual permissions to access forums?
in modules/Forums/admin/admin_ug_auth.php
Code:
FIND
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id][$auth_field]) )
REPLACE WITH
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id]) )
_________________Evaders99
Webmaster
Administrator
Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
The cake is a lie.
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Powered by phpBB © 2001, 2005 phpBB Group