The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Lynne Question- If statement for perms
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. Quote:
|
#2
|
|||
|
|||
Code:
<if condition="is_member_of($bbuserinfo, 6)"> CODE HERE </if> |
#3
|
|||
|
|||
Awesome. Thank you!
|
#4
|
||||
|
||||
Hehe. I'm definitely not the only one who knows conditionals. In fact, all I know about conditionals I learned from the users here.
|
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
$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.
|
#7
|
|||
|
|||
Thank you very much for clearing that one up.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|