MyBB Support

[ask] custom file permission

Submitted by Hollyman13, , Thread ID: 71814

Thread Closed

RE: [ask] custom file permission

OP
#3
Deadboyi'd use a php template conditional. for example:
find the template for the shit displayed on that page
put everything these tags:
Code:
<else /></if>
at the very top, put some new code, something like this:
Code:
<if !$GLOBALS['mybb']->user['usergroup'] == 8 then>
Sorry, you don't have access to this feature. Upgrade today to gain access!
Change the 8 to whatever group id your upgraded group is. Remember to add staff or other groups to this if you want, something like:
Code:
<if !$GLOBALS['mybb']->user['usergroup'] == 3 || !$GLOBALS['mybb']->user['usergroup'] == 4 || !$GLOBALS['mybb']->user['usergroup'] == 6 then>
3 4 6 are the default staff groups, moderators, supermods and admins.


where should I put that code?

[Image: H6lDLDx4.jpg]

Users browsing this thread: 1 Guest(s)