Example #1
0
 public function setCharset($charset)
 {
     parent::setCharset($charset);
     \Smarty::$_CHARSET = $this->charset;
 }
Example #2
0
 public function loadSmarty($force = false)
 {
     if (iaView::REQUEST_HTML == $this->getRequestType() || $force) {
         $compileDir = IA_TMP . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? 'admin_' : 'front_') . $this->theme . IA_DS;
         $this->iaCore->factory('util');
         iaUtil::makeDirCascade(IA_TMP . 'smartycache' . IA_DS, 0777, true);
         iaUtil::makeDirCascade($compileDir, 0777, true);
         $this->iaSmarty = $this->iaCore->factory('smarty');
         if (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType()) {
             $this->iaSmarty->setTemplateDir(IA_ADMIN . 'templates' . IA_DS . $this->theme . IA_DS);
         } else {
             $this->iaSmarty->setTemplateDir(IA_HOME . 'templates' . IA_DS . $this->theme . IA_DS);
             $this->iaSmarty->addTemplateDir(IA_HOME . 'templates' . IA_DS . 'common' . IA_DS);
         }
         Smarty::$_CHARSET = 'UTF-8';
         $this->iaSmarty->setCompileDir($compileDir);
         $this->iaSmarty->setCacheDir(IA_TMP . 'smartycache' . IA_DS);
         $this->iaSmarty->setPluginsDir(array(IA_SMARTY . 'plugins', IA_SMARTY . 'intelli_plugins'));
         $this->iaSmarty->force_compile = $this->iaCore->get('smarty_cache');
         $this->iaSmarty->cache_modified_check = false;
         $this->iaSmarty->debugging = false;
         $this->iaSmarty->compile_check = true;
         // @FIXME: please find a solution instead of suppressing the errors
         $this->iaSmarty->muteExpectedErrors();
     }
 }