Re: [SMARTY] re:[SMARTY] creating dir problem

From: Date: Thu, 20 Feb 2003 18:34:05 +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-8028@lists.php.net to get a copy of this message
On Thu, 2003-02-20 at 12:32, Dennis Gearon wrote: > 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 So it will run "out-of-the-box" for the impatient. I suppose we could move the library files under a subdir of /libs/, then adjust index.php with the proper SMARTY_DIR setting. That would probably make the most sense. Monte > > 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 If we move library files to /libs/ this will make better sense. > > 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> > > > > > -- Monte Ohrt <monte@ispi.net>

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