Re: [openupload-devel] permissions on templates_c
Status: Beta
Brought to you by:
tsdogs
|
From: Bob M. <bo...@co...> - 2012-06-19 20:30:26
|
Alessandro:
Thank you for your reply
> > So the questions would be: is it possible to have a separate
> > templates_c
> > directory for each site? If there is any documentation, I haven't
> > found
> > it, a pointer would be kindly appreciated. And, assuming I cannot
> > have
> > a separate templates_c directory for each site, can anyone suggest a
> > cleaner way to allow all sites write access to the templates_c
> > directory?
> >
>
> Yes it's possible and it's even already available (not documented
> though).
> Use the $CONFIG['SMARTY_DATA'] variable.
>
> For more information look at the lib/base.inc.php
>
> Alessandro
I found the config['SMARTY_DATA'] variable in lib/main.inc.php. I think
that was the pointer I was looking for, thank you :)
I have one follow up question if I may regarding this snippet of code:
if (isset($this->config['SMARTY_DATA'])) {
$this->tpl->compile_dir =
$this->config['SMARTY_DATA'].'/templates_c/';
$this->tpl->cache_dir = $this->config['SMARTY_DATA'].'/cache';
I do not find a cache directory in the expected location as I do a
templates_c directory. Is that directory necessary and should I be
creating it?
Either way, presumably what I am doing is correct since everything so
far appears to be working. For the benefit of others trying to puzzle
out a layman's interpretation of this:
edit the config file in the www folder of each site, and add the
following line (I put mine right above the INSTALL_ROOT variable):
$CONFIG['SMARTY_DATA'] = '/path/to/folder/where/templates_c/lives';
then put your templates_c folder in that directory.
thanks again Alessandro
--
Bob Miller
867-334-7117 / 867-633-3760
http://computerisms.ca
bo...@co...
Network, Internet, Server,
and Open Source Solutions
|