mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 00:32:15 +09:00
issue 2119. supporting php 5.4.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12682 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
005768c71e
commit
669c9a5948
14 changed files with 768 additions and 492 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
if(!defined('__XE__')) exit();
|
||||
|
||||
if(!defined('__XE__'))
|
||||
exit();
|
||||
|
||||
/**
|
||||
* @file mobile.addon.php
|
||||
|
|
@ -14,17 +16,29 @@ if(!defined('__XE__')) exit();
|
|||
*
|
||||
* after_module_proc > display mobile content
|
||||
* Condition
|
||||
**/
|
||||
* */
|
||||
// Ignore admin page
|
||||
if(Context::get('module')=='admin') return;
|
||||
if(Context::get('module') == 'admin')
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Manage when to call it
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
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;
|
||||
require_once(_XE_PATH_ . 'addons/mobile/classes/mobile.class.php');
|
||||
if(!mobileXE::getBrowserType())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Generate mobile instance
|
||||
$oMobile = &mobileXE::getInstance();
|
||||
if(!$oMobile) return;
|
||||
if(!$oMobile)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Specify charset on the add-on settings
|
||||
$oMobile->setCharSet($addon_info->charset);
|
||||
// Set module information
|
||||
|
|
@ -41,9 +55,15 @@ if($called_position == 'before_module_proc')
|
|||
$oMobile->displayLangSelect();
|
||||
}
|
||||
// On navigation mode, display navigation content
|
||||
if($oMobile->isNavigationMode()) $oMobile->displayNavigationContent();
|
||||
if($oMobile->isNavigationMode())
|
||||
{
|
||||
$oMobile->displayNavigationContent();
|
||||
}
|
||||
// If you have a WAP class content output via WAP class
|
||||
else $oMobile->displayModuleContent();
|
||||
else
|
||||
{
|
||||
$oMobile->displayModuleContent();
|
||||
}
|
||||
// If neither navigation mode nor WAP class is, display the module's result
|
||||
}
|
||||
else if($called_position == 'after_module_proc')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue