MyBB Community Forums

Full Version: Board Message Mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Global.php should be changed from
Quote:if($settings['boardclosed'] == "yes")
{
if($usergroup['cancp'] == "yes")
{
eval("\\$bbclosedwarning = \\"".$templates->get("global_boardclosed_warning")."\\";");
}
}
to:
Quote:// Board closed thingy Smile
if($settings['boardclosed'] == "yes")
{
if($mybbgroup['cancp'] != "yes")
{
error($lang->error_boardclosed);
exit;
}
}
Now, for the real reason for this thread:

I followed the instructions exactly like you said. I added
// Board Message MOD Start
if($settings['showbbmsg'] != "no")
{
	eval("\\$bbmessage = \\"".$templates->get("board_message")."\\";");
}
// Board Message MOD End
to global.php. I added the setting group and the 2 settings, I added $bbmessage<br /> in header template and finally ran templateinstall.php which was successful. Everythign is there, is just doesn't work. So it has to be
// Board Message MOD Start
if($settings['showbbmsg'] != "no")
{
	eval("\\$bbmessage = \\"".$templates->get("board_message")."\\";");
}
// Board Message MOD End
that is causing the problem. Anything wrong with that code??
It would appear that you're trying to install the previous version of the mod, as the new installation instructions have been slightly updated.

The best thing I can suggest is that you download the mod once more and try again.

http://www.mybbmods.com/fileinfo.php?fid=6
hmm :/ I downloaded it when it said RC4. :/

Edit: No change :/
After having a quick look at the file, it seems that the reason the mod isn't working is because you have installed it incorrectly.

You need to add the block of code to global.php after these lines...

if($settings['boardclosed'] == "yes")
{
	if($usergroup['cancp'] == "yes")
	{
		eval("\\$bbclosedwarning = \\"".$templates->get("global_boardclosed_warning")."\\";");
	}
}

...and not these, which appear later in the file...

// Board closed thingy :)
if($settings['boardclosed'] == "yes")
{
	if($mybbgroup['cancp'] != "yes")
	{
		error($lang->error_boardclosed);
		exit;
	}
}

Admittedly, the blocks do look similar, but the instructions do state the correct one, so nothing needs to be changed.
ah, ok, thanks Smile testing now............

Edit: Working now, thanks. You may want to warn other in the future though.