PDA

View Full Version : <if> tags in vbulletin


Creative Suite
07-23-2007, 10:00 PM
Hi all ..

well , i have my own templates system and i used database to build it ..
and i'm using a function such as fetch_template to output the template ..
and i want to add <if> tags to it like vbulletin ..

so how could i do that .. ?

i found this thread : https://vborg.vbsupport.ru/showthread.php?t=91330&highlight=condition

maybe i got a part of the idea but i still didn't understand how and where should i convert the tags to php ..

thanks in advance :)

Dismounted
07-24-2007, 10:33 AM
<if condition="$x = $x">Hello<else />This will never happen.</if>
Would translate to:
($x = $x) ? "Hello" : "This will never happen.";

Andreas
07-24-2007, 03:14 PM
Have you taken a look at Smarty?

Might be easier than implementing your own Template Engine :)

Creative Suite
07-25-2007, 12:47 AM
Good news ..

i found the function wich convert the <if> tags to php..
and i link it to my own template system .. and it's works very good :) ..

i will post how to use it in your database template system later..

regards
cs

Andreas
07-25-2007, 08:43 AM
If you use the vBulletin backend, your pages must carry vBulletin copyright notice - plese keep this in mind!

Creative Suite
07-25-2007, 02:37 PM
yeah ofcourse .. :)