Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Aug 2009, 23:16
zethon zethon is offline
 
Join Date: May 2005
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
www.anothermessageboard.com
Reply With Quote
  #2  
Old 17 Aug 2009, 08:21
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Template conditionals are transformed into ternary operations (in the current version of vBulletin). The "template" is then evaluated.

The following:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Is transformed into:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 17 Aug 2009, 10:36
zethon zethon is offline
 
Join Date: May 2005
Originally Posted by Dismounted View Post
Template conditionals are transformed into ternary operations (in the current version of vBulletin). The "template" is then evaluated.

The following:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Is transformed into:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Where is this transformation happening?
__________________
www.anothermessageboard.com
Reply With Quote
  #4  
Old 17 Aug 2009, 13:30
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
The template is transformed into raw PHP and stored in the database, therefore, it is actually done when you save the template.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:42.

Layout Options | Width: Wide Color: