The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Template <if> tag
I have a personal project going on and I'm trying to develop a template system similar to the one vBulletin uses.
One thing has me stumped. I want to use the <if> tag in my templates, but they never get parsed. I looked in the vb code for some help, but I can't see anything that much different from vb is doing and what I'm doing to cause this. What is it in the vb that 'allows' the parsing to the <if> tag? The code I'm using to import that template and print it looks like: PHP Code:
|
#2
|
||||
|
||||
Template conditionals are transformed into ternary operations (in the current version of vBulletin). The "template" is then evaluated.
The following: Code:
<if condition="$show['guest']">Something<else />Else</if> Code:
(($show['guest']) ? "Something" : "Else") |
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
The template is transformed into raw PHP and stored in the database, therefore, it is actually done when you save the template.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|