MyBB Community Forums

Full Version: Have link be for certain groups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have created a new link that when clicked it will bring users somewhere on my site, but i only want it to show if the user is apart of a certain group. (Just like how mod or admin cp's will only show if you are mod or admin).

Not sure if this will help but the group id (or what i think gid stands for) is 8 [ gid=8 ].

In the attachment below the link "Premium Control Panel" should only be access by the group stated above and staff.

Any help is appreciated thanks.
You can use the template conditional, inside your template, to achieve the desired results.

<if $GLOBALS['mybb']->user['usergroup'] == 8 then>
this test will only be seen by usergroup 8 Smile
</if>

(if you are using the template conditional plugin)
(2019-09-10, 03:22 AM)Michael2014 Wrote: [ -> ]You can use the template conditional, inside your template, to achieve the desired results.

<if $GLOBALS['mybb']->user['usergroup'] == 8 then>
this test will only be seen by usergroup 8 Smile
</if>

(if you are using the template conditional plugin)
Thank you so much!