SMF Support > SMF 2.0.x Support
Rank Only?
Skyro:
Hey, I'm adding a tab to the navbar. It works and all, but I want it to show only if the user is a 'Host' rank? How do I do that?
--- Code: ---'gambling' => array(
'title' => 'Gambling',
'href' => $scripturl . '?action=dicing', // Change to the rules when released.
'show' => true,
'sub_buttons' => array(
'dicing' => array(
'title' => 'Dicing',
'href' => $scripturl . '?action=dicing',
'show' => true,
),
'hostlist' => array(
'title' => 'Host List',
'href' => '#',
'show' => true,
),
'buyrank' => array(
'title' => 'Buy Rank',
'href' => '#',
'show' => true,
),
'dicingcp' => array(
'title' => 'Dicing Panel',
'href' => '#',
'show' => true,
),
),
),
--- End code ---
There's the code.
Kays:
Hi, I'm assuming that 'Host' rank is a member group. If so, download and install my custom permissions mod (link in my sig). Create a permission and assign it to that member group. then for 'show' use allowedTo() with that permission.
--- Code: --- 'show' => allowedTo(seeThis),
--- End code ---
Skyro:
What's the mod called?
Kays:
http://custom.simplemachines.org/mods/index.php?mod=2930 :)
Skyro:
Installed it and all, but it just says 'Hacking Attempt!' when I try add one.
Navigation
[0] Message Index
[#] Next page
Go to full version