public function __construct()
{
parent::__construct();
$config = CampSite::GetConfigInstance();
$this->debugging = $config->getSetting('smarty.debugging');
$this->force_compile = $config->getSetting('smarty.force_compile');
$this->compile_check = $config->getSetting('smarty.compile_check');
$this->use_sub_dirs = $config->getSetting('smarty.use_subdirs');
// cache settings
$preferencesService = \Zend_Registry::get('container')->getService('system_preferences_service');
$this->useprotocol = $preferencesService->get('SmartyUseProtocol') === 'Y' ? 'true' : 'false';
$this->templateCacheHandler = $preferencesService->TemplateCacheHandler;
if ($this->templateCacheHandler) {
$this->caching = 1;
$this->caching_type = 'newscoop';
CampTemplateCache::factory();
} else {
$this->caching = 0;
}
if (defined('APPLICATION_ENV') && APPLICATION_ENV == 'development') {
$this->force_compile = true;
}
// define dynamic uncached block
require_once APPLICATION_PATH . self::PLUGINS . '/block.dynamic.php';
$this->registerPlugin('block', 'dynamic', 'smarty_block_dynamic', false);
// define render function
require_once APPLICATION_PATH . self::PLUGINS . '/function.render.php';
$this->registerPlugin('function', 'render', 'smarty_function_render', false);
// define translate modifier
require_once APPLICATION_PATH . self::PLUGINS . '/modifier.translate.php';
$this->registerPlugin('modifier', 'translate', 'smarty_modifier_translate', false);
$this->left_delimiter = '{{';
$this->right_delimiter = '}}';
$this->auto_literal = false;
$this->cache_dir = APPLICATION_PATH . '/../cache';
$this->compile_dir = APPLICATION_PATH . '/../cache';
$this->plugins_dir = array_merge((array) $this->plugins_dir, array(APPLICATION_PATH . self::PLUGINS), self::getPluginsPluginsDir());
$this->setTemplateDir(array(APPLICATION_PATH . '/../themes/', APPLICATION_PATH . '/../themes/system_templates/', APPLICATION_PATH . self::SCRIPTS));
$this->assign('view', \Zend_Registry::get('container')->get('view'));
$this->assign('userindex', false);
$this->assign('user', new MetaUser());
$this->assign('siteinfo', array('title' => $preferencesService->SiteTitle, 'keywords' => $preferencesService->SiteMetaKeywords, 'description' => $preferencesService->SiteMetaDescription));
$this->getTemplateTranslationsFiles();
}