MyBB Community Forums

Full Version: if user group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi

i need hide content if user login in template index

if guest show this code :

<div class="signup_class" align="center"><a href="member.php?action=register">اشترك الآن!</a></div>

if user hide this code

can help me
Install plugin PHP in Templates, and code:
<if $mybb->user['usergroup'] == ID then><div class="signup_class" align="center"><a href="member.php?action=register">اشترك الآن!</a></div></if>

Replace ID to the group ID that can see it.
why don't you use the header templates to do that ?

Only have to set when is a guest or member and done !!!

You can set many more opts as mod or admin too or your entire header code, but you can work with this two guest for only guests and member for all registered users.

Cheers...
thanks Snake and Dark
^ header is visible on all the pages of MyBB forum.
code in header_welcomeblock_guest template is visible to guests at each & every page

if required, you can use template conditionals plugin instead of earlier suggested php in templates plugin