rhymix/addons/smartphone/smartphone.addon.php
haneul 51a00c8c15 require location modification
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7070 201d5d3c-b55e-5fd7-737f-ddc643e51545
2009-12-23 08:23:09 +00:00

39 lines
1.5 KiB
PHP

<?PHP
if(!defined("__ZBXE__")) exit();
if(Context::get('module')=='admin') return;
require_once(_XE_PATH_.'addons/smartphone/classes/smartphone.class.php');
if($called_position == "before_module_init")
{
if(Context::get('full_browse'))
{
setcookie("FullBrowse", 1);
}
}
if(!smartphoneXE::isFromSmartPhone()) return;
if($called_position == 'after_module_proc' ) {
$oSmartphoneXE = new smartphoneXE($this, $this->module_info, $output);
$oSmartphoneXE->procSmartPhone();
Context::set('layout', 'none');
Context::set('smart_content', $oSmartphoneXE->content);
Context::set('parent_url', $oSmartphoneXE->parent_url);
Context::set('prev_url', $oSmartphoneXE->prev_url);
Context::set('next_url', $oSmartphoneXE->next_url);
$this->setTemplatePath('addons/smartphone/tpl');
$this->setTemplateFile('layout');
} elseif($called_position == 'before_module_proc' && !$this->grant->access) {
$oSmartphoneXE = new smartphoneXE($this, $this->module_info, $output);
$oSmartphoneXE->procSmartPhone('msg_not_permitted_act');
Context::set('layout', 'none');
Context::set('smart_content', $oSmartphoneXE->content);
Context::set('parent_url', $oSmartphoneXE->parent_url);
Context::set('prev_url', $oSmartphoneXE->prev_url);
Context::set('next_url', $oSmartphoneXE->next_url);
$this->setTemplatePath('addons/smartphone/tpl');
$this->setTemplateFile('layout');
}
?>