Re: [SMARTY] Installing Smarty docs

From: Date: Tue, 25 Jun 2002 07:43:39 +0000
Subject: Re: [SMARTY] Installing Smarty docs
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5012@lists.php.net to get a copy of this message
Hi Monte, On 24-06-2002 Monte Ohrt wrote: > That is right, if you do not set the $debug_tpl class variable, > it will look in the $template_dir by default. I like to place > the debug template directly under the SMARTY_DIR so it is not > affected by multiple $template_dir locations across > applications, but this is not the default setup. That is the other suggestion I was going to make... It strikes me that things (such as the debug.tpl file) which can be considered "core" to Smarty, SHOULD be located directly under the SMARTY_DIR. If correct functioning is dependent upon being able to access a specific file then that file either needs to be placed correctly, or it needs to be placed in such a way that can always _by default_ be found, irrespective of how someone installs the system. The first of these is prone to errors/mistakes, especially in new users of the system, so I think needs guarding against. Keeping such "core" elements central to Smarty is a cleaner way of implementing. Advanced or knowledgeable users who may wish to make changes to it can always set the $debug_tpl class variable, but many, especially newcomers will not want to be bothered by such details, preferring that things work "out of the box", or at worst, without too much fiddling. Question: Would it not therefore be better to set $debug_tpl to point at SMARTY_DIR/debug.tpl by default? This strikes me as a sensible setup and could be accompanied by a note in the installation guide to the effect that: "N.B. The debug template necessary for smarty to provide debug output is, by default, located in the main Smarty directory and identified with the class variable $debug_tpl. Users wishing to use their own debug templates, or place the one provided elsewhere in their filesystem, should define this class variable in accordance with those changes." and provide a couple of examples to illustrate. Cheers Rob Rob Schumann Managing Director M: +66 (0)1 860 4533 RS-Tech Consulting Co., Ltd. T: +66 (0)2 516 2991 70/592 Moo 3 Krisdanakorn 19, F: +66 (0)2 516 4025 Klong Nung, Klong Luang, E: robs@rs-tc.com Pathum Thani 12120, roblgs@cscoms.com Thailand W: http://www.rs-tc.com/

« previous php.smarty.general (#5012) next »