The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
<if> code help
I am trying to get this code to work. The example below I know is incorrect but I need it fixed so I do not have tons of lines of IF commands.
Code:
<if condition="$post[usergroupid] == X, X, X, X and is_member_of($post, X, X, X, X )"><img src="images/misc/airforce.gif"></if> |
#2
|
||||
|
||||
So you want the airforce.gif image to display in the postbit if the poster is in a certain set of groups?
Try: Code:
<if condition="is_member_of($post[usergroupid], X, X, X, X )"><img src="images/misc/airforce.gif"></if> |
#3
|
||||
|
||||
Fixed up the image tag, as well as the conditional:
Code:
<if condition="is_member_of($post, X, X, X, X)"><img src="images/misc/airforce.gif" border="0" alt="" /></if> |
#4
|
|||
|
|||
TigerC10, "So you want the airforce.gif image to display in the postbit if the poster is in a certain set of groups?" good guess at problem description." I wasn't sure what he was trying to do.
Quote:
Good work. thanks for the lesson. |
#5
|
|||
|
|||
What I need is the member is part of a main usergroup but ALSO the member is part of a secondary member group (air force) then that image will display for them.
|
#6
|
|||
|
|||
<if condition="$post[usergroupid] == B && is_member_of($post, X)"><img src="images/misc/airforce.gif"></if>
So the primary usergroup has to be 'B' and X must be secondary usergroup (air force). |
#7
|
|||
|
|||
Quote:
Right now I have the code, like I posted in my first post, repeated over and over again changing the primary usergroup number each time. I figure there has to be a way to condense this code. |
#8
|
|||
|
|||
Why not just use the Vb rank system? LOL
AdminCP>user ranks>add new user rank. I never change my users primary user group from registered. If they are VIP or Mods, their status is secondary and the icon ranks for secondary show up just fine Including multiple group rank images. Even through vb promotions. HTH |
#9
|
||||
|
||||
Maybe....
HTML Code:
<if condition="in_array($post[usergroupid], array(2,3,4,5,6,7)) && is_member_of($post, 8)"><img src="images/misc/airforce.gif" border="0" alt="" /></if> |
#10
|
||||
|
||||
You may want to choose to exclude some usergroups, instead of include (if there are less "other" usergroups).
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|