Example #1
0
 public function __construct($setPrevURL = true, $device = DEVICE_TYPE_PC)
 {
     parent::__construct();
     switch ($device) {
         case DEVICE_TYPE_MOBILE:
             $this->_smarty->template_dir = realpath(MOBILE_TEMPLATE_REALDIR);
             $this->_smarty->compile_dir = realpath(MOBILE_COMPILE_REALDIR);
             $this->assignTemplatePath(DEVICE_TYPE_MOBILE);
             break;
         case DEVICE_TYPE_SMARTPHONE:
             $this->_smarty->template_dir = realpath(SMARTPHONE_TEMPLATE_REALDIR);
             $this->_smarty->compile_dir = realpath(SMARTPHONE_COMPILE_REALDIR);
             $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE);
             break;
         case DEVICE_TYPE_PC:
             $this->_smarty->template_dir = realpath(TEMPLATE_REALDIR);
             $this->_smarty->compile_dir = realpath(COMPILE_REALDIR);
             $this->assignTemplatePath(DEVICE_TYPE_PC);
             break;
     }
     if ($setPrevURL) {
         $this->setPrevURL();
     }
     PluginHelper::hook("SiteView.Construct.After", array($this));
 }
Example #2
0
 public function init()
 {
     parent::init();
     $this->_smarty->template_dir = realpath(TEMPLATE_ADMIN_REALDIR);
     $this->_smarty->compile_dir = realpath(COMPILE_ADMIN_REALDIR);
     $this->assign('TPL_URLPATH_PC', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . TEMPLATE_NAME . '/');
     $this->assign('TPL_URLPATH_DEFAULT', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . DEFAULT_TEMPLATE_NAME . '/');
     $this->assign('TPL_URLPATH', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . 'admin/');
 }
Example #3
0
 public function __construct($template_dir, $compile_dir = COMPILE_REALDIR)
 {
     parent::__construct();
     $this->_smarty->template_dir = realpath($template_dir);
     $this->_smarty->compile_dir = realpath($compile_dir);
 }