richy96
01-19-2011, 08:56 PM
Hi
Having done a lot of playing around with vbulletin php files I'm now having a good go at messing about with templates ;)
I'm Sorry if this has been asked before but the forum search will not allow two character search for 'if condition' so it is hard to find the information I am looking for and this stuff is probably very basic
So can someone tell me what conditions I can check in a template using <if condition>
For example can I do things like
<if condition $post[blahblah]=="something"> <tr><td>$somevariable</td></tr></if>
<if condition $post[blahblah]=="something else"> <tr><td>$someothervariable</td></tr></if>
Also is there some construct like <if condition> do this <else if condition> do that </if> available to me
Finally can I embed php in templates using.......
<?php .
do all this crazy stuff
?> tags
...... and use the embedded php to manipulate globals or other variables and arrays that were available in the vbulletin php file at the time the template was called, then output the results - to save editing the php file itself?
Cheers
Rich
Having done a lot of playing around with vbulletin php files I'm now having a good go at messing about with templates ;)
I'm Sorry if this has been asked before but the forum search will not allow two character search for 'if condition' so it is hard to find the information I am looking for and this stuff is probably very basic
So can someone tell me what conditions I can check in a template using <if condition>
For example can I do things like
<if condition $post[blahblah]=="something"> <tr><td>$somevariable</td></tr></if>
<if condition $post[blahblah]=="something else"> <tr><td>$someothervariable</td></tr></if>
Also is there some construct like <if condition> do this <else if condition> do that </if> available to me
Finally can I embed php in templates using.......
<?php .
do all this crazy stuff
?> tags
...... and use the embedded php to manipulate globals or other variables and arrays that were available in the vbulletin php file at the time the template was called, then output the results - to save editing the php file itself?
Cheers
Rich