Re: [SMARTY] re:[SMARTY] creating dir problem
| From: | Dennis Gearon | Date: | Thu, 20 Feb 2003 18:32:58 +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-8026@lists.php.net to get a copy of this message | ||
Well,
I think that putting them under the application is the obvious choice, now that you've
pointed it out, thank you.
Why are these directories in the SMARTY distribution then?
templates
configs
templates_c
cache
To me, it implies that is where they are to be run, especially since they have the same name as
defined for the class variables. A better name might be to label them:
test_only_templates
test_only_configs
test_only_templates_c
test_only_cache
or something like that, or leave them off and put in the INSTALL file contents that the user
needs to create these for each application and then write these values to the smarty object per
application, and give an example.
If you want, I will write that up for the INSTALL file.
2/20/2003 6:44:12 AM, Monte Ohrt <monte@ispi.net> wrote:
>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>
>
>