PHP Code:
                            <?php                                                                                           defined('MBQ_IN_IT') or exit;                                                                                           define('MBQ_DS'DIRECTORY_SEPARATOR);                                             define('MBQ_PATH'dirname($_SERVER['SCRIPT_FILENAME']).MBQ_DS); /* mobiquo path */                                             define('MBQ_DIRNAME'basename(MBQ_PATH)); /* mobiquo dir name */                                             define('MBQ_PARENT_PATH'substr(MBQ_PATH0strrpos(MBQ_PATHMBQ_DIRNAME.MBQ_DS))); /* mobiquo parent dir path */                                             define('MBQ_FRAME_PATH'MBQ_PATH.'mbqFrame'.MBQ_DS); /* frame path */                                             require_once(MBQ_FRAME_PATH.'MbqBaseConfig.php');                                                                                           $_SERVER['SCRIPT_FILENAME'] = str_replace(MBQ_DIRNAME.'/'''$_SERVER['SCRIPT_FILENAME']); /* Important!!! */                                             $_SERVER['PHP_SELF'] = str_replace(MBQ_DIRNAME.'/'''$_SERVER['PHP_SELF']); /* Important!!! */                                             $_SERVER['SCRIPT_NAME'] = str_replace(MBQ_DIRNAME.'/'''$_SERVER['SCRIPT_NAME']); /* Important!!! */                                             $_SERVER['REQUEST_URI'] = str_replace(MBQ_DIRNAME.'/'''$_SERVER['REQUEST_URI']); /* Important!!! */                                                                                           /**                                             * plugin config                                             *                                              * @since 2012-7-2                                             * @author Wu ZeTao <578014287@qq.com>                                             */                                             Class MbqConfig extends MbqBaseConfig {                                                                                           public function __construct() {                                             parent::__construct();                                             require_once(MBQ_CUSTOM_PATH.'customDetectJs.php');                                             $this->initCfg();                                             }                                                                                           /**                                             * init cfg default value                                             */                                             protected function initCfg() {                                             parent::initCfg();                                             }                                                                                           /**                                             * calculate the final config of $this->cfg through $this->cfg default value and MbqMain::$customConfig and MbqMain::$oMbqAppEnv and the plugin support degree                                             */                                             public function calCfg() {                                             parent::calCfg();                                             /* calculate the final config */                                             $options MbqMain::$oMbqAppEnv->exttOptions;                                             $this->cfg['base']['sys_version']->setOriValue($options['templateversion']);                                             if ($options['tapatalk_guest_okay']) {                                             $this->cfg['user']['guest_okay']->setOriValue(MbqBaseFdt::getFdt('MbqFdtConfig.user.guest_okay.range.support'));                                             }                                             $this->cfg['user']['reg_url']->setOriValue('register');                                             if ($this->moduleIsEnable('forum')) {                                             $this->cfg['forum']['max_attachment']->setOriValue($options['maximages']);                                             }                                             }                                                                                           }                                                                                           ?>