Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problems extending Smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
haste
Smarty Rookie


Joined: 07 Jun 2003
Posts: 17

PostPosted: Mon Jun 30, 2003 1:48 am    Post subject: Problems extending Smarty Reply with quote

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
View user's profile Send private message
haste
Smarty Rookie


Joined: 07 Jun 2003
Posts: 17

PostPosted: Mon Jun 30, 2003 2:10 am    Post subject: Reply with quote

Ooops. Wrong forum. Would one of the mods mind moving this to the correct forum, "Installation and Setup."

Thanks so much.
Back to top
View user's profile Send private message
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Mon Jun 30, 2003 6:38 am    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
haste
Smarty Rookie


Joined: 07 Jun 2003
Posts: 17

PostPosted: Tue Jul 01, 2003 9:22 pm    Post subject: Reply with quote

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 Wink


OMG. You see what 12 straight hours of programming does to you? Thank you so much for catching that.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP