MyBB Community Forums

Full Version: Board Online / Offline for other groups?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

I was wondering if it was possible for someone to maybe make a quick plugin to go on the "Board Online / Offline" settings page in the Admin CP which would enable me to set which groups can view the board.

The reason being, I often want my Moderators to be able to view the board to perform quick forum maintenance, etc. I was hoping for something like a text box, with the text "Place Group ID in this box, to select which groups can view the forum"...

If someone could do this, I would be more than greatful.

Thank you.
- e
Ok, this is a bump - can I assume this isn't possible? If so, this can be left floating down the page.
Pretty sure it is possible. You could probably edit global.php to allow mods to not see board closed error. I don't know how to write a plugin for this.
Thanks, I know you can edit a file but I don't want to keep doing this, could it be made done an easier way? and for group IDs?
Find someone who can write a plugin that does this:

(2008-02-05, 05:04 AM)DennisTT Wrote: [ -> ]It's a relatively simple modification to global.php:
Find:
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] == "yes")
Replace with:
if($mybb->settings['boardclosed'] == "yes" && ($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == 'yes' || is_moderator() == 'yes'))
Find:
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))
Replace with:
if($mybb->settings['boardclosed'] == "yes" && !($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == 'yes' || is_moderator() == 'yes') && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))
^ That looks like for MyBB 1.2.
For 1.4, you'll probably replace all the "yes" and 'yes' with 1
HI:
I can't find

if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))

in global.php

I'm runing 1.4

Thanks in advance
Which is why Zinga said to replace all the
Quote:"yes"
with a
Quote:1
Wink.
Thank you NetSage I understood that part by ZiNgA BuRgA about the "yes" being replaced by "1". But in version 1.4 there is no such line

if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))

there are 2 separate not exact and I"m not that good at code so I don't want to mess up my page specially global.php. If I can be guided to where the code will be inserted in version I'll apreciate it.

Thank you in advance
(2008-10-28, 08:45 PM)SPONTNOUS Wrote: [ -> ]Thank you NetSage I understood that part by ZiNgA BuRgA about the "yes" being replaced by "1". But in version 1.4 there is no such line

if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))

there are 2 separate not exact and I"m not that good at code so I don't want to mess up my page specially global.php. If I can be guided to where the code will be inserted in version I'll apreciate it.

Thank you in advance

Same "problem" I had, just make a backup, that way you cannot go wrong.
It is the "similar" one though..they won't have changed that much apart from the numbers.
Pages: 1 2