MyBB Community Forums

Full Version: Conditionals help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to use this code
               <div class="footer-title">Account</div>
<if in_array($mybb->user['usergroup'], array(2,3,4,5,6,7)) then>
<div class="footer-link"><a href="{$mybb->settings['bburl']}/usercp.php"><i class="fa fa-angle-right" aria-hidden="true"></i>Control Panel</a></div>
<div class="footer-link"><a href="{$mybb->settings['bburl']}/upgrade.php"><i class="fa fa-angle-right" aria-hidden="true"></i>Upgrade</a></div>
</if>

<if $mybb->user['usergroup'] == "1" then>
<div class="footer-link"><a href="{$mybb->settings['bburl']}/member.php?action=login"><i class="fa fa-angle-right" aria-hidden="true"></i>Login</a></div>
<div class="footer-link"><a href="{$mybb->settings['bburl']}/member.php?action=register"><i class="fa fa-angle-right" aria-hidden="true"></i>Create an account</a></div>
</if>
            </div>

So in the footer, if you belong to the main groups it will show control panel and upgrade

If you belong to guest it shows login and register.

But using that above code it wont show any of the links.

I have conditionals installed.
What a coincidence that you have the same class names, order and icons as my theme, but whatever.

in_array($GLOBALS['mybb']->user['usergroup'], array(x))
Which theme is it? I found this on another forum and im using it as a base. If its yours I apologize i downloaded it from somewhere.