The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Vb if condition question
Okay say i create 3 custum fields. now i want to have them set up in my postbit. But i dont want it to appear unless one of these fields is filled.
Now I want to have some text above Code:
<vb:if condition="$post['field5']"> <center>Text Here</center>< /br> <vb:if condition="$post['field5']"> | vb:if condition="$post['field6']"> | <vb:if condition="$post['field7']"> |
#2
|
|||
|
|||
I don't understand exactly what you want but you use "AND" and "OR" inside the quoted stuff in the conditional. For example:
Code:
<vb:if condition="$post['field5'] OR $post['field6'] OR $post['field7']"> ............. </vb:if> |
#3
|
|||
|
|||
yeah thats somewhat right. it will show it now but it will still show the images for the other fields. even though there blank ( figured out i needed to add the if conditions in between each link or they would all show reguardless )
Code:
<dl class="userinfo_extra"> <vb:if condition="$post['field9'] OR $post['field10'] OR $post['field11']"> <dd><center><b>Gamer Info</b><br> <body class="gamerfont"><vb:if condition="$post['field9']"><a href="#" class="tooltipy"><img src="images/xboxicon.png" alt="My Gamertag" /><span><strong>My Xbox Gamertag is</br> {vb:raw post.field9}</strong><br />Go ahead and add me as a friend</span></a> </vb:if> <vb:if condition="$post['field10']"> <a href="#" class="tooltipy"><img src="images/Psnicon.png" alt="My Psn Gamertag" /><span><strong>My Playstation Gamertag is</br> {vb:raw post.field10}</strong><br />Go ahead and add me as a friend</span></a></vb:if> <vb:if condition="$post['field11']"> <a href="#" class="tooltipy"><img src="images/steamicon.png" alt="My Gamertag" /><span><strong>My Steam Account is</br> {vb:raw post.field11}</strong><br />Go ahead and add me as a friend</span></a></vb:if></body> </dd></dl></center></vb:if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|