|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
haste Smarty Rookie
Joined: 07 Jun 2003 Posts: 17
|
Posted: Mon Jun 30, 2003 1:48 am Post subject: Problems extending Smarty |
|
|
This is the code I have in a class that extends Smarty:
[php:1:1cbd22b356]<?php
$smarty_path = $root_path . 'includes/smarty/';
define('SMARTY_DIR',$smarty_path);
// extend the Smarty template engine to fit the directory structure of this app
class ls_smarty extends Smarty
{
function ls_smarty($root_path)
{
$this->Smarty();
$this->template_dir = $root_path . 'templates';
$this->complie_dir = $root_path . 'system/templates_c';
$this->config_dir = $root_path . 'templates';
$this->cache_dir = $root_path . 'system/smarty_cache';
$this->caching = false;
}
}
?>[/php:1:1cbd22b356]
The problem is that Smarty can't seem to recognize the './system/templates_c' directory. It always tries to create the compiled templates in the root fold of the system, /
If I change the compiled directory to $root_path . 'templates_c' everything works fine.
Permissions on system/templates_c and system/ are set to 777.
Help? |
|
Back to top |
|
haste Smarty Rookie
Joined: 07 Jun 2003 Posts: 17
|
Posted: Mon Jun 30, 2003 2:10 am Post subject: |
|
|
Ooops. Wrong forum. Would one of the mods mind moving this to the correct forum, "Installation and Setup."
Thanks so much. |
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Mon Jun 30, 2003 6:38 am Post subject: |
|
|
There's a typo:
Replace
$this->complie_dir = $root_path . 'system/templates_c';
with
$this->compile_dir = $root_path . 'system/templates_c';
Perhaps this is your problem |
|
Back to top |
|
haste Smarty Rookie
Joined: 07 Jun 2003 Posts: 17
|
Posted: Tue Jul 01, 2003 9:22 pm Post subject: |
|
|
andre wrote: | There's a typo:
Replace
$this->complie_dir = $root_path . 'system/templates_c';
with
$this->compile_dir = $root_path . 'system/templates_c';
Perhaps this is your problem |
OMG. You see what 12 straight hours of programming does to you? Thank you so much for catching that. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|