MyBB Community Forums

Full Version: Hide Header Link to certain user group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2011-12-08, 09:52 PM)david42 Wrote: [ -> ]Thanks again, must be a problem my end, because now it is just showing the link to everyone.

Which plugin did you installed?
I have quite a few, is there a way to list them quickly?

I did install PHP in templates though before using this.
Bumping this for a solution, is there something i am doing wrong?
What is your final code and what are you using? Manual php file edits or php in template conditionals?
Please paste here the exact code of your template, as well as the exact information about your plugin from the ACP->Plugins area.
Plugin i am Using: PHP in Templates/Conditionals

Final code:

<if $mybb->user['usergroup'] != '5' || $mybb->user['usergroup'] != '6' then><a href="http://www.berlingoforum.co.uk/donate.php"><img src="http://i.imgur.com/NWhnR.png" alt="" title="" /> Donate</a></if>

The logic: If someone has donated and they are now in the donator group, i don't want them to see the donate link.
Try replacing:
'5' ||

With:
'5' &&
<if in_array($GLOBALS['mybb']->user['usergroup'], array(7,1,4)) then> 
<a href="#">LINK</a></if>

I am using the exact method here and works fine.

Try this:

<if !in_array($GLOBALS['users']['usergroup'], array(5,6)) then>
<a href="http://www.berlingoforum.co.uk/donate.php"><img src="http://i.imgur.com/NWhnR.png" alt="" title="" /> Donate</a></if>
What the heck is going on. There must be a fault somewhere else. I tried all your suggestions but it still doesnt work.

Group numbers are the order in which groups are displayed on the User & Groups page right?

I.e

Guests = 1
Awaiting Activation=2
...
Banned=8

?
Pages: 1 2 3