PDA

View Full Version : Lynne Question- If statement for perms


soundbarrierpro
01-06-2009, 06:53 PM
Hi,

I'd like to hide one link which should only be viewable by me admin. What is the statement I should wrap around this.

I'm adding another new post button and I don't want any members to see it.


&nbsp;<a href="search.php?do=getnew"><img src="$stylevar[imgdir_button]/newposts.gif" alt="New Posts" border="0" /></a>

Thank you

Bellardia
01-06-2009, 06:59 PM
<if condition="is_member_of($bbuserinfo, 6)">
CODE HERE
</if>

soundbarrierpro
01-06-2009, 07:20 PM
Awesome. Thank you!:)

Lynne
01-06-2009, 07:50 PM
Hehe. I'm definitely not the only one who knows conditionals. In fact, all I know about conditionals I learned from the users here. :)

Hex_legend
01-06-2009, 09:21 PM
In the past, I have used:

<if condition"$show[admincplink]">
Content Here
</if>

Is there anything wrong with this? I know a lot of users use the
<if condition="is_member_of($bbuserinfo, 6)">
CODE HERE
</if>
code, but to me it does the same job.

Dismounted
01-07-2009, 05:39 AM
$show['admincplink'] will be true for everyone that has access to the Admin CP (more than one usergroup can have access to the Admin CP). However, the second condition will only be true if the user is in the Administrators usergroup.

Hex_legend
01-07-2009, 09:10 AM
$show['admincplink'] will be true for everyone that has access to the Admin CP (more than one usergroup can have access to the Admin CP). However, the second condition will only be true if the user is in the Administrators usergroup.

Thank you very much for clearing that one up.