MyBB Support

[ask] custom file permission

Submitted by Hollyman13, , Thread ID: 71814

Thread Closed

RE: [ask] custom file permission

This post was last modified: 05-02-2018, 11:12 PM by Deadboy
#2
i'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.

Users browsing this thread: 1 Guest(s)