Hello,
How do I show items only to admins for pages which are not part of MyBB.
I do have the page integrated but it doesn't seem to work when I try it.
Assuming you're using template conditionals:
<if $mybb->user['gid'] == '4' then>
Content
</if>
I'm afraid that didn't work on my integrated page.
It just output "$mybb->user['usergroup'] == '4' then" on the page.
If it is a custom PHP file why not just do
if($mybb->usergroup['cancp']==1)
{
// code here
}
?>
<if in_array($GLOBALS['mybb']->user['usergroup'], array(4)) then>
//Anything here will only show the the group added above (gid : 4)
</if>
Competition time!
<if $mybb->usergroup['cancp'] then>
Hi admin!
</if>
If doesn't work, change $mybb with $GLOBALS[['mybb'] .
Thanks Omar, that did work but also wanted global moderators to see this information too.
Sorry, I should have specified.
Then,
<if $mybb->usergroup['cancp'] || $mybb->user['canmodcp'] then>
Hi admin/mod!
</if>