Re: [SMARTY] re:[SMARTY] creating dir problem
| From: | Monte Ohrt | Date: | Thu, 20 Feb 2003 14:44:12 +0000 |
| Subject: | Re: [SMARTY] re:[SMARTY] creating dir problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7998@lists.php.net to get a copy of this message | ||
The plugins directory _is_ found in the SMARTY_DIR, even when you change
it.
Now the others: templates, configs, templates_c and cache. They would
not typically be found in the SMARTY_DIR. Why? Because those aren't
library files, those are application specific files. Think of Smarty
like a PEAR library. You don't put application specific things in your
PEAR directory do you?
So, you put the Smarty library files in a central location, such as
/usr/local/lib/php/smarty. These are shared read-only library files. You
only change them when upgrading Smarty.
Then for each application that uses Smarty, you setup templates,
configs, templates_c and cache independently. The Smarty installation
guide shows a good example of this.
Monte
On Thu, 2003-02-20 at 02:50, Dennis Gearon wrote:
> I found the problem. I made an assumption.
>
> After all the examples and tutorials told me that if smarty was not in the standard location, I
> could handle that by setting 'SMARTY_DIR' constant, and seeing that the:
>
> cache
> config
> templates
> template_c
> plugins
>
> directories were **IN** SMARTY_DIR, I A-S-S-U-M-E-D that setting 'SMARTY_DIR; would
> be picked up by the smarty object and used for finding all those directories. It seems
> very NON intuitive that this is not the case.
>
> Is there any reason why the class definition for smarty does not have:
>
> var $template_dir = SMARTY_DIR . 'templates';
> var $compile_dir = SMARTY_DIR . 'templates_c';
> var $config_dir = SMARTY_DIR . 'configs';
> var $plugins_dir = array(SMARTY_DIR . 'plugins');
> var $cache_dir = SMARTY_DIR . 'cache';
>
> ????
>
> These can still be over ridden by extending class 'smarty', or by using a value in
> the a redefined constructor as the smarty dir.
>
> and where is the constant, 'DIRECTORY_SEPARATOR' (from line 50 of Smarty.class.php
> defined?
>
--
Monte Ohrt <monte@ispi.net>