2013-11-29, 02:47 PM
2013-11-29, 03:57 PM
you can try using Extra Groups To Access The Off Line Forum plugin
2013-11-29, 04:17 PM
By default, when your board is offline, only usergroups that have access to Administration Panel can see your forum.
To allow other usergroups, you need a plugin (as .m. suggested above) or edit core "global.php" file (line 623 in MyBB 1.6.11):
Search:
and replace with:
where $allow_usergroups = "4,3,6"; is the variable where you can insert usergroups that you want to be allowed, separated by a comma.
It is advisable to always allow access to administrators. In this case, is better to replace with this code:
That's all.
To allow other usergroups, you need a plugin (as .m. suggested above) or edit core "global.php" file (line 623 in MyBB 1.6.11):
Search:
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] != 1 && !in_array($current_page, $closed_bypass) && (!is_array($closed_bypass[$current_page]) || !in_array($mybb->input['action'], $closed_bypass[$current_page])))
and replace with:
// If the board is closed, forums can be viewed only by the following usergroups (guid):
$allow_usergroups = "4,3,6"; // 4 = administrators, 3 = super-moderators, 4 = moderators
$allow_usergroup = explode(",", $allow_usergroups);
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == 1 && !in_array($mybb->user['usergroup'], $allow_usergroup) && !in_array($current_page, $closed_bypass) && (!is_array($closed_bypass[$current_page]) || !in_array($mybb->input['action'], $closed_bypass[$current_page])))
where $allow_usergroups = "4,3,6"; is the variable where you can insert usergroups that you want to be allowed, separated by a comma.
It is advisable to always allow access to administrators. In this case, is better to replace with this code:
// If the board is closed, forums can be viewed only by the following usergroups (guid):
$allow_usergroups = "4,3,6"; // 4 = administrators, 3 = super-moderators, 4 = moderators
$allow_usergroup = explode(",", $allow_usergroups);
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['cancp'] != 1 && !in_array($mybb->user['usergroup'], $allow_usergroup) && !in_array($current_page, $closed_bypass) && (!is_array($closed_bypass[$current_page]) || !in_array($mybb->input['action'], $closed_bypass[$current_page])))
That's all.
2013-11-29, 04:38 PM
I always avoid plugins where possible, which is basically all the time, thanks for your help.
2013-11-29, 04:55 PM
^ just two cents related to system core files modification
one should take utmost care while modifying core files
backup of original file should be kept (without any edits)
keep track of modifications (may be in a snippets file)
actually we suggest to use patches plugin for modifying the system core files
one should take utmost care while modifying core files
backup of original file should be kept (without any edits)
keep track of modifications (may be in a snippets file)
actually we suggest to use patches plugin for modifying the system core files
2013-11-29, 04:57 PM
(2013-11-29, 04:55 PM).m. Wrote: [ -> ]actually we suggest to use patches plugin for modifying the system core files
Very good suggestion!