The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello there,
Actually I always find this kind of condition statements in the vbulletin templates, it's like this: PHP Code:
so I would love to know what language does support this, so I can read more about, such as how to use "and", "or" operaters in case of multible conditions thanks in advanced |
|
#2
|
||||
|
||||
|
Template conditionals are converted into the PHP ternary format, and then eval()'d.
|
|
#3
|
|||
|
|||
|
Hello again,
thank you very much for your replay, actully I would love 2 knoe how to use more than one condition with the "&&" operator or the word "and", and the same is with the "||" operator or the word "or" ..... any details about it would make me glad |
|
#4
|
||||
|
||||
|
Just put it in there...
Code:
<if condition="$x AND $y == 15"> |
|
#5
|
|||
|
|||
|
Thanx Dismounted
So this condition is true syntactically? Code:
<if condition="$userinfo[userid] != 1 AND $userinfo[userid] != 5"> |
|
#6
|
||||
|
||||
|
You should quote array keys that are strings. (Don't do this in templates outside of the conditional though!)
|
|
#7
|
|||
|
|||
|
Well, actually I'm not very good with arrays specially associative arrays
so I'm going to postpone it, till I have time to dig in it, but I also would like to say thank you, Dismounted
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|