equal
deleted
inserted
replaced
165 global $httpd; |
165 global $httpd; |
166 static $smarty = array(); |
166 static $smarty = array(); |
167 if ( !isset($smarty[$theme_id]) ) |
167 if ( !isset($smarty[$theme_id]) ) |
168 { |
168 { |
169 $smarty[$theme_id] = new Smarty(); |
169 $smarty[$theme_id] = new Smarty(); |
170 $smarty[$theme_id]->template_dir = "./themes/$theme_id"; |
170 $smarty[$theme_id]->template_dir = GREY_ROOT . "/themes/$theme_id"; |
171 $smarty[$theme_id]->compile_dir = "./themes/$theme_id/compiled"; |
171 if ( !is_dir("./compiled/$theme_id") ) |
172 $smarty[$theme_id]->cache_dir = "./cache"; |
172 @mkdir("./compiled/$theme_id"); |
|
173 $smarty[$theme_id]->compile_dir = "./compiled/$theme_id"; |
173 $smarty[$theme_id]->config_dir = "./config"; |
174 $smarty[$theme_id]->config_dir = "./config"; |
174 $httpd->add_handler("themes/$theme_id", 'dir', "./themes/$theme_id"); |
175 $httpd->add_handler("themes/$theme_id", 'dir', GREY_ROOT . "/themes/$theme_id"); |
175 } |
176 } |
176 return $smarty[$theme_id]; |
177 return $smarty[$theme_id]; |
177 } |
178 } |