Posts: 3,538
Threads: 348
Joined: Mar 2010
Reputation:
57
I've added a new page to my forum using the Page Manager plugin, and I would like the page to be only visible to Moderators and Admins.
Can somebody tell me how I can prevent normal members from accessing it?
So if they do find the URL, and try to view the page, it says "You do not have permission to access this page", etc....".
Thanks.
Posts: 215
Threads: 19
Joined: May 2011
Reputation:
13
You could add this to the php code. (I haven't tested it)
include("global.php"); //path to global.php in mybb
global $mybb;
if(($mybb->usergroup['isadmin'] == 1) || ($mybb->usergroup['issupermod'] == 1))
{
//page here
}else{
print("You do not have permission to access this page");
}
Need website or forum help?
Posts: 132
Threads: 19
Joined: Jun 2011
Reputation:
2
Get a hold on omni im sure he knows
i used to know but i forgot
also what is ur forum? ill sign up
Posts: 3,538
Threads: 348
Joined: Mar 2010
Reputation:
57
Thanks I'll give that a try.
Posts: 215
Threads: 19
Joined: May 2011
Reputation:
13
Meh I thought my way would work better, You don't have to define all the usergroups that have admin / mod access.
Need website or forum help?