MyBB Community Forums

Full Version: <if> tags
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I installed the plugin to be able to do <if> tags easily.

Now I want to display info for more than just 1 usergroup. At the moment, I only know how to use the following part.

<if $GLOBALS['mybb']->user['usergroup'] == 8  then>

Of course this is just for 1 group but how do I make it so it shows for more than 1 group?

Hope I explained this well enough...
<if in_array($GLOBALS['mybb']->user['usergroup'], array(x,y,z)) then> 
do this
</if>
replace x,y,z with group IDs
I tried what you said, but it doesn't seem to show anything in my usergroup.

<if in_array($GLOBALS['mybb']->user['usergroup'], array(8,4)) then>
<b><u>VIP Preferences</b></u><br><br>
<a href="usercp.php?action=changename"><strong>Change Nickname</strong></a><br>
If you fancy a new nickname but want to keep all your settings, you can change it here.<br><br>
</if>
if the plug-in working then above code should work (reference)

see also this post where a member said that plug-in is not working for some modifications