mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 09:14:48 +09:00
1. Use __XE__ instead of __ZBXE__
2. Reformat indentations git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9722 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
477db7ed4f
commit
29f0d4a503
12 changed files with 648 additions and 650 deletions
|
|
@ -1,50 +1,50 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
if(!defined('__XE__')) exit();
|
||||
|
||||
/**
|
||||
* @file mobile.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Mobile XE add-on
|
||||
*
|
||||
* If a mobile connection is made (see the header information), display contents with WAP tags
|
||||
*
|
||||
* Time to call
|
||||
*
|
||||
* before_module_proc > call when changing general settings for mobile
|
||||
*
|
||||
* after_module_proc > display mobile content
|
||||
* Condition
|
||||
**/
|
||||
// Ignore admin page
|
||||
if(Context::get('module')=='admin') return;
|
||||
// Manage when to call it
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
// Ignore if not mobile browser
|
||||
require_once(_XE_PATH_.'addons/mobile/classes/mobile.class.php');
|
||||
if(!mobileXE::getBrowserType()) return;
|
||||
// Generate mobile instance
|
||||
$oMobile = &mobileXE::getInstance();
|
||||
if(!$oMobile) return;
|
||||
// Specify charset on the add-on settings
|
||||
$oMobile->setCharSet($addon_info->charset);
|
||||
// Set module information
|
||||
$oMobile->setModuleInfo($this->module_info);
|
||||
// Register the current module object
|
||||
$oMobile->setModuleInstance($this);
|
||||
// Extract content and display/exit if navigate mode is or if WAP class exists
|
||||
if($called_position == 'before_module_proc') {
|
||||
/**
|
||||
* @file mobile.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Mobile XE add-on
|
||||
*
|
||||
* If a mobile connection is made (see the header information), display contents with WAP tags
|
||||
*
|
||||
* Time to call
|
||||
*
|
||||
* before_module_proc > call when changing general settings for mobile
|
||||
*
|
||||
* after_module_proc > display mobile content
|
||||
* Condition
|
||||
**/
|
||||
// Ignore admin page
|
||||
if(Context::get('module')=='admin') return;
|
||||
// Manage when to call it
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
// Ignore if not mobile browser
|
||||
require_once(_XE_PATH_.'addons/mobile/classes/mobile.class.php');
|
||||
if(!mobileXE::getBrowserType()) return;
|
||||
// Generate mobile instance
|
||||
$oMobile = &mobileXE::getInstance();
|
||||
if(!$oMobile) return;
|
||||
// Specify charset on the add-on settings
|
||||
$oMobile->setCharSet($addon_info->charset);
|
||||
// Set module information
|
||||
$oMobile->setModuleInfo($this->module_info);
|
||||
// Register the current module object
|
||||
$oMobile->setModuleInstance($this);
|
||||
// Extract content and display/exit if navigate mode is or if WAP class exists
|
||||
if($called_position == 'before_module_proc') {
|
||||
|
||||
if($oMobile->isLangChange()) {
|
||||
$oMobile->setLangType();
|
||||
$oMobile->displayLangSelect();
|
||||
}
|
||||
// On navigation mode, display navigation content
|
||||
if($oMobile->isNavigationMode()) $oMobile->displayNavigationContent();
|
||||
// If you have a WAP class content output via WAP class
|
||||
else $oMobile->displayModuleContent();
|
||||
// If neither navigation mode nor WAP class is, display the module's result
|
||||
} else if($called_position == 'after_module_proc') {
|
||||
// Display
|
||||
$oMobile->displayContent();
|
||||
}
|
||||
if($oMobile->isLangChange()) {
|
||||
$oMobile->setLangType();
|
||||
$oMobile->displayLangSelect();
|
||||
}
|
||||
// On navigation mode, display navigation content
|
||||
if($oMobile->isNavigationMode()) $oMobile->displayNavigationContent();
|
||||
// If you have a WAP class content output via WAP class
|
||||
else $oMobile->displayModuleContent();
|
||||
// If neither navigation mode nor WAP class is, display the module's result
|
||||
} else if($called_position == 'after_module_proc') {
|
||||
// Display
|
||||
$oMobile->displayContent();
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue