public static function prepare() { self::$smarty = new Smarty(); self::$smarty->setTemplateDir(INDEX_PATH . "/smarty/templates"); self::$smarty->setCompileDir(INDEX_PATH . "/smarty/templates_c"); self::$smarty->setCacheDir(INDEX_PATH . "/smarty/cache"); self::$smarty->setConfigDir(INDEX_PATH . "/smarty/configs"); }
private static function prepareSmartyObject() { self::$smarty = new Smarty(); self::$smarty->setTemplateDir(HOME_DIR . '/templates/' . app::get('template') . '/'); self::$smarty->setCompileDir(HOME_DIR . '/templates_c/'); self::$smarty->setConfigDir(HOME_DIR . '/configs/'); self::$smarty->setCacheDir(HOME_DIR . '/cache/'); self::$smarty->force_compile = true; self::$smarty->debugging = \app::get('debug'); self::$smarty->caching = true; self::$smarty->cache_lifetime = 120; foreach (self::$assign as $key => $value) { self::$smarty->assign($key, $value); } }