Templating ... a simple guide

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Templating ... a simple guide

Post by Roberdin »

2.2 will, but the phpBB Template Downloads section won't include templates that utilise php inside them.
Rob

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Templating ... a simple guide

Post by Arty »

metest12 wrote:
Roberdin wrote:Of course, note that phpBB will not support running php in templates for obvious reasons.


2.2 will, as stated in the first post of this topic:
psoTFX wrote:PHP

A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:
It will, but only if php option is enabled. By default that option is disabled.

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Templating ... a simple guide

Post by psoTFX »

We will not make available templates @ http://www.phpbb.com" target="_blank which include PHP.

JanusMTL
Registered User
Posts: 4
Joined: Sat Jun 14, 2003 2:03 pm

Re: Templating ... a simple guide

Post by JanusMTL »

psoTFX wrote:Conditionals/Control structures

The most significant addition to 2.2.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty.
Out of curiosity, why is Smarty not used as template system?

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Templating ... a simple guide

Post by psoTFX »

It's enormous and behaves more like a general "parser" than template engine ... I also heavily dislike their block system.

User avatar
Legoguy
Registered User
Posts: 60
Joined: Wed Jul 23, 2003 4:21 pm
Location: Gurnee, IL
Contact:

Re: Templating ... a simple guide

Post by Legoguy »

Alright, looking in here I've not seen anything mentioning checking for blank strings. For me, using "IF [string] gt 0" seems to work, but the PM module isn't working so I have no clue whether or not it will do what I want when the string isn't empty...

I'm going to do some more testing now...

[edit]
Did some testing, it always evals False. Pso, how to check string lengths? I could use PHP but if the templating system already has a function then I would like to know it...

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Templating ... a simple guide

Post by Arty »

Legoguy wrote:Alright, looking in here I've not seen anything mentioning checking for blank strings.
<!-- IF U_INDEX -->
U_INDEX is set and equal to {U_INDEX}
<!-- ELSE -->
U_INDEX is empty or not set
<!-- ENDIF -->

metest12
Registered User
Posts: 15
Joined: Fri Jun 20, 2003 5:29 pm

Re: Templating ... a simple guide

Post by metest12 »

Roberdin wrote:2.2 will, but the phpBB Template Downloads section won't include templates that utilise php inside them.
It doesn't matter, you don't need variable includes in just the forum. I was trying to use them for parts of my own site or custom changes to the forum.

Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Templating ... a simple guide

Post by Roberdin »

I was referring to people who were planning to include php in general release templates.
Rob

User avatar
Lord Illicious
Registered User
Posts: 19
Joined: Mon Nov 26, 2001 8:52 am
Contact:

Re: Templating ... a simple guide

Post by Lord Illicious »

OH no my fav suffix TPL is replaced by the ol HTML.

Will feel more like site designing rather than forum theme designing.
Image
Shaolin-Venoms.com
SV is retiring. New site will be ShaolinGate.com

Post Reply