2011-04-18, 07:08 PM
If you want to make selective Usergroups to ByPass Password Protected Forums, then here is how;
Open ./inc/functions.php file and find;
Now within the same file, find;
and add a single } at the end of the string, like that;
Now Change 3,4,6,8 in the above array() to the
Open ./inc/functions.php file and find;
function check_forum_password($fid, $pid=0)
{
global $mybb, $header, $footer, $headerinclude, $theme, $templates, $lang, $forum_cache;
$showform = true;
and Change it to;function check_forum_password($fid, $pid=0)
{
global $mybb, $header, $footer, $headerinclude, $theme, $templates, $lang, $forum_cache;
$showform = true;
$groups = array(3,4,6,8);
if (!in_array($mybb->user['usergroup'],$groups))
{
Now within the same file, find;
$_SERVER['REQUEST_URI'] = htmlspecialchars_uni($_SERVER['REQUEST_URI']);
eval("\$pwform = \"".$templates->get("forumdisplay_password")."\";");
output_page($pwform);
}
exit;
}
}
and add a single } at the end of the string, like that;
$_SERVER['REQUEST_URI'] = htmlspecialchars_uni($_SERVER['REQUEST_URI']);
eval("\$pwform = \"".$templates->get("forumdisplay_password")."\";");
output_page($pwform);
}
exit;
}
}
}
Now Change 3,4,6,8 in the above array() to the
Usergroup IDs
you wish to allow them to ByPass pasword protected forums