MyBB Community Forums

Full Version: Change no permission page, for forum/user an else?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Can I change the no permissions page that a user group sees a specfic error, or an spefic error for an forum?
BUMP.
In forumdisplay.php change:
if($fpermissions['canview'] != 1)
{
	error_no_permission();
}
to something like this:
//Condition for group, change 4 to any GID
if($mybb->user['usergroup'] == 4)
{
         error("Blah blah blah and other error words");
}

//Condition for forums, change 1,4,9,16 to any comma separated FID
if(in_array($fid, array(1,4,9,16)))
{
         error("Blah blah blah and another error words");
}

if($fpermissions['canview'] != 1)
{
	error_no_permission();
}

You can combine/nest the conditionals and use in_array for gids as well. Use Patches plugin if you don't want to lose changes on update.
Works it then only gor group ID 4, so I must also add the code for other groups?