예제 #1
0
 protected function initSmarty()
 {
     $systemRoot = Configuracion::getSystemRootDir();
     $config = Configuracion::getConfigXML();
     $templates = $config->templates;
     $skinsDirname = (string) $config->templates['path'];
     if (empty($skinsDirname)) {
         $skinsDirname = "skins";
     }
     $this->smarty = new Smarty();
     // Handler de smarty
     $this->smarty->template_dir = "{$systemRoot}/{$skinsDirname}/{$this->_skinConfig['dir']}";
     // configuro directorio de templates
     $this->smarty->compile_dir = "{$systemRoot}/tmp/templates_c";
     // configuro directorio de compilacion
     $this->smarty->cache_dir = "{$systemRoot}/tmp/{$skinsDirname}/cache";
     // configuro directorio de cache
     $this->smarty->config_dir = "{$systemRoot}/{$skinsDirname}/configs";
     // configuro directorio de configuraciones
     $publicSkinDir = $this->_skinConfig['wwwdir'];
     if (empty($publicSkinDir)) {
         $publicSkinDir = $this->_skinConfig['dir'];
     }
     $this->smarty->assign('skin', $publicSkinDir);
     $this->smarty->assign('relative_images', "{$skinsDirname}/{$publicSkinDir}/images");
     $this->smarty->assign('version', Configuracion::getVersion());
     $this->smarty->assign('skinPath', $systemRoot . "/{$skinsDirname}/" . $this->_skinConfig['dir']);
     $this->smarty->assign('appName', Configuracion::getAppName());
     $this->smarty->assign('cal_files', $this->_calendar->get_load_files_code());
     $this->smarty->assign('dir_images', "{$skinsDirname}/{$publicSkinDir}/images");
     $this->smarty->assign('dir_js', "{$skinsDirname}/{$publicSkinDir}/js");
     $this->assingSmartyMenu();
     $this->smarty->assign('dateFormat', $this->_dateFormat);
     $this->smarty->assign('timeFormat', $this->_timeFormat);
     $this->smarty->assign('dateTimeFormat', $this->_dateTimeFormat);
     $this->assignSmartyTplVars();
     $this->smarty->assign('facade', new smartyFacade($this));
     $this->setTplVar("ckeditorVersion", '4.4.1');
     $this->addJsFile('js/jquery.fileManager.js');
     $this->addCssFile('css/jquery.fileManager.css');
 }