RE: Smarty with vBulletin?
| From: | Jonathan Chum | Date: | Thu, 21 Mar 2002 11:44:35 +0000 |
| Subject: | RE: Smarty with vBulletin? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3210@lists.php.net to get a copy of this message | ||
That's something I never understood why vB uses the database to store
templates rather than a file system. I find it much easier to FTP and drop
it into a folder, and it reduces the amount of querying needed just to pull
up a template.
Smarty is quite a great little tool with the CMS I'm working on and it's
quite great when caching is turned on as it reduces the time to generate a
page once the template is fixed.
Internal functions is something cool that I use alot in developing the board
module in which templates could parse timestamps into someting readable.
Also vB does something with loading bits which I find another pain editing
templates while with Smarty, the index page can handle header, categories,
forums, and footer all as one template using Smarty.
Speed wise, it's a tad longer than just eval $strings in the templates, but
for logic that can be possessed in the template, Smarty rocks :)
Regards,
Jonathan
http://www.blazeboard.com
Co-Branded CMS Developed With Smarty
-----Original Message-----
From: Matt Rogish [mailto:matt@fanhome.com]
Sent: Thursday, March 21, 2002 4:26 PM
To: smarty@lists.ispi.net
Subject: [smarty] Smarty with vBulletin?
Hi,
We currently run the vBulletin bulletin board software. As you may or may
not know vBulletin uses the concept of 'templates' which are stored in the
database. However, it lacks things like conditionals and caching. I was
wondering how Smarty would integrate (if at all) with vBulletin to provide
more performance (we're a large vB and always looking for ways to improve
performance) vis-à-vis caching.
>From what I see, the documentation says that variables *can* be in
templates
but are not needed.. vB keeps all variables in templates, e.g.
<html>
<header>
<title> You're at: $location </title>
</header>
</html>
Would that work well with Smarty? Further, how does the caching/compiling
mechanism work? On runtime different templates are loaded depending on if a
user is currently logged in, is viewing a particular forum, etc.
ex.
index.php (
if( $logged_in == 1 )
load_template( "navigation_loggedin" );
else
load_template( "navigation_loggedout" );
)
forumdisplay.php (
if( $forumid == 43 ) {
load_template( "special_header" );
else
load_template( "regular_header" );
)
Thanks,
--
Matt
---
You are currently subscribed to smarty as: jchum@aismedia.com
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/