The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
HTML <if>?
How do you use this? I can't find any guides, or indeed anything about the <if> tag anywhere outside the actual code of forum software itself! I'm trying to work an if clause into a template modification (iTrader based), and I just need to know the correct usage of <if>... Does it have to be
HTML Code:
<if condition=>(code)</if> HTML Code:
<if $var=$var2>(code)</if> And what about else options? |
#3
|
||||
|
||||
The syntax is:
Code:
<if condition="CONDITION">Displayed when CONDITION is TRUE</if> |
#4
|
|||
|
|||
That's what I thought. But all the time I see
Code:
<if condition=$var>(stuff to do)</if> |
#5
|
||||
|
||||
In PHP, $var is the same as isset($var) which returns TRUE if $var exists and FALSE if it does not.
So-- Code:
<if condition="$var">Stuff to do</if> |
#6
|
|||
|
|||
Oh, I see. Thanks. I'm going to try out my template modification and see if it works...
|
#7
|
|||
|
|||
see this tutorial for vB conditionals: http://www.vbulletin.com/docs/html/
type in 'template conditionals' in the search box and click on first link. |
#8
|
||||
|
||||
The condition between the two quotes is parsed as a boolean expression.
Quote:
Code:
<if condition="$variable == 'Yes'"> <if condition="$variable > 10"> <if condition="$vbulletin->options['something_enabled']"> |
#9
|
|||
|
|||
Thanks for the help guys. Modification works great.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|