Smarty as your template engine..

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
bestweb
Registered User
Posts: 16
Joined: Wed Feb 18, 2004 7:31 pm

Smarty as your template engine..

Post by bestweb »

I really was taken back when I sifted through some of the source codes and templates and found out you were using Smarty as your template engine. Personally, I dislike Smarty. Though it is full of all sorts of amazing features, that is just the problem with it.

Generally, template engines are supposed to allow you to separate content/design from logic, and Smarty has obviously not allowed your templates to do so. Some templates I've found more Smarty tags then normal HTML. I seems to me that you have become unbelievably dependant on Smarty in the templates.

Two simple questions..
a) Do you actually like having to code a large amount of Smarty tags into the templates?
b) What prompted you to go with Smarty over making your own template engine?
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev

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

Re: Smarty as your template engine..

Post by Roberdin »

Um, no, phpBB template engine was written by the phpBB group... parts may appear similar, but there you go...
Rob

bestweb
Registered User
Posts: 16
Joined: Wed Feb 18, 2004 7:31 pm

Re: Smarty as your template engine..

Post by bestweb »

By the way, by accident when I was posting, I saved it as a draft. When I tried to load the draft, the message didn't show up. I had to press back to recover my original message, and now for some reason the topic shows itself as having an attachment... A bug?
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev

bestweb
Registered User
Posts: 16
Joined: Wed Feb 18, 2004 7:31 pm

Re: Smarty as your template engine..

Post by bestweb »

Roberdin wrote: Um, no, phpBB template engine was written by the phpBB group... parts may appear similar, but there you go...

Under the Docs folder in the AUTHORS file, it says:

LGPL licenced:
Smarty © 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/" target="_blank
Fet up with waiting for phpBB3?
k4 Bulletin Board version 2.0-Dev

User avatar
the_dan
Registered User
Posts: 700
Joined: Thu Apr 01, 2004 7:36 pm

Re: Smarty as your template engine..

Post by the_dan »

Roberdin wrote: Um, no, phpBB template engine was written by the phpBB group... parts may appear similar, but there you go...
It's a modified version of Smarty afaik.

ShytKicker
Registered User
Posts: 32
Joined: Sun Mar 27, 2005 6:01 am

Re: Smarty as your template engine..

Post by ShytKicker »

It doesn't matter if you modified it, it's Smarty, period.

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

Re: Smarty as your template engine..

Post by Roberdin »

Oh, right, my error.
Rob

Graham
Registered User
Posts: 1304
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK

Re: Smarty as your template engine..

Post by Graham »

Actually, the first statement was correct, it is not Smarty. It does however use code from Smarty to do the logic in the templates
template.php comments wrote: /**
* @package phpBB3
*
* Template class.
*
* Nathan Codding - Original version design and implementation
* Crimsonbane - Initial caching proposal and work
* psoTFX - Completion of file caching, decompilation routines and implementation of
* conditionals/keywords and associated changes
*
* The interface was inspired by PHPLib templates, and the template file (formats are
* quite similar)
*
* The keyword/conditional implementation is currently based on sections of code from
* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
* derived from an LGPL application may be relicenced under the GPL, this applies
* to this source
*
* DEFINE directive inspired by a request by Cyberalien
*/
As for why we use a certain amount of logic in the templates, the majority of it is to control which output is displayed (ie stuff which shouldn't be in the code), there is little if any code logic in any of the templates. A lot of the directives in the templates are for loops (to allow you to specify common output once and loop over it multiple times)

The whole point of doing this is to allow template designers flexibility in how they produce templates.
"So Long, and Thanks for All the Fish"

Graham
Eeek, a blog!

APTX
Registered User
Posts: 680
Joined: Thu Apr 24, 2003 12:07 pm

Re: Smarty as your template engine..

Post by APTX »

AS were on templates... why are all images only 1 pixel high? Makes those pictures/links kind of hard to click... it seems to be normal in firefox... pitty it'll never be my "prefered" browser
Don't give me my freedom out of pity!

ShytKicker
Registered User
Posts: 32
Joined: Sun Mar 27, 2005 6:01 am

Re: Smarty as your template engine..

Post by ShytKicker »

What you mean it is not smarty? You just said it is the code from smarty, if it is the code from smarty, then that automatically makes it smarty. What, you think just becuase you modify a few lines to your preference, it automatically becomes yours? That's not how it works.

And, please, stop using the word logic, if you don't know what it means. Logic does not mean your server-side syntax.

Locked