View Full Version : whats the IF code for this?
Evil X
06-08-2006, 06:30 PM
to only display something for a couple groups? I want to do something so a certain image only is in certain usergroups posts...
carpzone
06-08-2006, 08:25 PM
And where do u want to display the image ?
Evil X
06-09-2006, 12:13 AM
actually... I want it to be like this
for regular members and mods and smods I want it to show thier rep power in thier post... but for the admins I just want it to say SUPER POWER or some shit... na mean
Ntfu2
06-09-2006, 03:50 PM
Try something like this postbit_legacy (assuming you are using the legacy layout like you see here)
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>
Change to
<if condition="$show['reputation']"><div>
<if condition="$bbuserinfo[usergroupid] == XX">
$vbphrase[reppower]: SUPER POWER
</if>
<if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>
Change XX to your admin group ;)
thats probably not perfect as i didnt test it, but that should be close ;)
Evil X
06-09-2006, 04:59 PM
thanks^...
Ntfu2
06-09-2006, 05:17 PM
If that doesnt work, It may need a else in there
<if condition="$show['reputation']"><div>
<if condition="$bbuserinfo[usergroupid] == XX">
$vbphrase[reppower]: SUPER POWER
<else>
<if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>
</if>
Evil X
06-09-2006, 06:44 PM
how could I make it work for several user groups?
<if condition="$bbuserinfo[usergroupid] == 1,2,3,4,5,7">
didnt work...,,,
Ntfu2
06-09-2006, 06:56 PM
Replace the IF statement
<if condition="!is_member_of($bbuserinfo, x, y, z)
Evil X
06-09-2006, 07:10 PM
ThankS
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.