The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
making an if statment in postbit
I need to make this
$post['postcount'] == 1 equal more then the first post $post['postcount'] ==1,2,3 doesn't work, how do i require more then one postcount besides creating a whole new IF statment for each postcount? Thanks |
#2
|
||||
|
||||
<if condition="$post[postcount] >= 1">
|
#3
|
|||
|
|||
Sorry my example may be off a bit need something that i can choose each postbit
$post['postcount'] == 1,6,10,50 Not all of them ;-) I guess it has to be $post['postcount'] == 1 | $post['postcount'] == 6 | etc..... is that correct? |
#4
|
|||
|
|||
why not set something in your php script.
if ($var == 1 OR $var == 6 ......) { $postcountspecial = 1; } then in template just test this 1 var. |
#5
|
|||
|
|||
Well this is in a template thats why.
|
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
Yes but you could make the if statement in the script that loads the template, then just a single if statement in the template, based on a var set in the php.
Think i have seen OR like if's in templates once, but i don't remember in which one anymore |
#8
|
||||
|
||||
Quote:
<if condition="$var OR $var2"> basicly conditions let you do some real basic php, nothing fancy. |
#9
|
|||
|
|||
Thanks for the explanation Zachery
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|