MyBB Community Forums

Full Version: Hiding links for certain usergroups?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wanted to hide a link so only my premium members can view it in the user control panel. Is there any way for me to implement that on my forum?

I am also not looking for a plugin if there is one.

Thanks for your time!
Yes you can use Template Conditionals plugin to do that more info here: http://community.mybb.com/thread-48224.html
(2014-02-13, 11:34 PM)iHasZombiesHD Wrote: [ -> ]I am also not looking for a plugin if there is one.

Unfortunately to complete this you have two options; to apply edits to the core and possibly lose them when upgrading or to install a plugin somewhere down the line, either Template Conditionals (to add logic to MyBB's Templates) or Patches (to apply edits to the core that can be restored).

Template Conditionals would be your best bet, as it keeps your code in the same place and understandable.
Your code would look something like this:
<if in_array($mybb->usergroup['gid'], array(3,4,6)) then>
<a href="{$mybb->settings['bburl']}/index.php"></a>
<else>
You are unable to view this link...
</if>