2011-03-27, 12:26 PM
Hey,
I have a custom page which is only accessible to certain user groups, this is done by the following code in the actual file on the server, not the template:
I would like to change the text that the users see when they try to access that page, if they are not allowed to.
I do not want to edit the default no permissions template as this will do the same for all other pages, I want the error message that users see to be unique for this page.
I tried creating a new error template called 'error_nopermission2' however, on the file itself, I do not know how to edit the code above to use the new error message. I always get problems such as 'Fatal error: Call to undefined function error_no_permission2()'.
What do you suggest?
I have a custom page which is only accessible to certain user groups, this is done by the following code in the actual file on the server, not the template:
if(!in_array($mybb->user['usergroup'], array('3','4','6','10')))
{
error_no_permission();
}
I would like to change the text that the users see when they try to access that page, if they are not allowed to.
I do not want to edit the default no permissions template as this will do the same for all other pages, I want the error message that users see to be unique for this page.
I tried creating a new error template called 'error_nopermission2' however, on the file itself, I do not know how to edit the code above to use the new error message. I always get problems such as 'Fatal error: Call to undefined function error_no_permission2()'.
What do you suggest?