Log in

View Full Version : Parsing the IF CONDITION on templates.


andrefedalto
03-30-2007, 04:37 PM
Hi all :)

I'd like to know how vBulletin parse the <if condition="1 == 1">true<else />false</if> during the template eval.

Any help would be appreciated. THanks :)

WetWired
03-30-2007, 05:25 PM
It doesn't. Template conditionals are parsed when they are saved.
<if condition="1 == 1">true<else />false</if>
Gets parsed and saved as
".((1==1)?"true":"false")."
Also, several substitutions are made on variable names. $bbuserinfo gets changed to $vbulletin->userinfo, for instance.

thincom2000
03-30-2007, 05:29 PM
You need to call compile_template() in adminfunctions_template.php

andrefedalto
03-30-2007, 10:42 PM
Oh, great :)

Thanks a lot for your help guys, you got straight to the point :)