private function loadSmarty() { if (isset(self::$i_smarty)) { return self::$i_smarty; } $smarty = new cmsRuDiSmarty(); self::$i_smarty = $smarty; return $smarty; }
private function loadSmarty() { if (isset(self::$i_smarty)) { return self::$i_smarty; } cmsCore::includeFile('/includes/smarty/libs/Smarty.class.php'); $smarty = new Smarty(); $smarty->setCompileDir(PATH . '/cache/'); $smarty->setCacheDir(PATH . '/cache/'); $smarty->assign('is_ajax', cmsCore::isAjax()); $smarty->assign('is_auth', cmsUser::getInstance()->id); self::$i_smarty = $smarty; return $smarty; }
private function loadSmarty() { if (isset(self::$i_smarty)) { return self::$i_smarty; } cmsCore::includeFile('/includes/smarty/libs/Smarty.class.php'); $smarty = new Smarty(); $smarty->compile_dir = PATH . '/cache'; $smarty->register_function('wysiwyg', 'cmsSmartyWysiwyg'); $smarty->register_function('profile_url', 'cmsSmartyProfileURL'); $smarty->register_function('component', 'cmsSmartyCurrentComponent'); $smarty->register_function('template', 'cmsSmartyCurrentTemplate'); $smarty->register_function('add_js', 'cmsSmartyAddJS'); $smarty->register_function('add_css', 'cmsSmartyAddCSS'); $smarty->register_function('comments', 'cmsSmartyComments'); $smarty->assign('is_ajax', cmsCore::isAjax()); self::$i_smarty = $smarty; return $smarty; }