| 方法一: 1、找到“\source\class\discuz\discuz_application.php”,将其中的
 
 复制代码'mobiletpl' => array('1' => 'mobile', '2' => 'touch', '3' => 'wml','yes' => 'mobile'),
 改为
 
 
 复制代码'mobiletpl' => array('1' => 'mobile', '2' => 'touch', '3' => 'wml','yes' => 'touch'),
 2、上面的修改已经成功了,但是顶部会有“用掌上论坛访问本站,拥有更好阅读体验”的一小段文字,现在把它删掉。
 
 找到“\source\plugin\mobile\mobile.class.php”,将其中的
 
 
 复制代码if(strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false) {
return lang('plugin/mobile', 'mobile_tip_ios');
} elseif(strpos($useragent, 'android') !== false) {
return lang('plugin/mobile', 'mobile_tip_android');
} elseif(strpos($useragent, 'windows phone') !== false) {
return lang('plugin/mobile', 'mobile_tip_wp7');
}
 
 删掉或者注释掉,就完全OK了。
 
 方法二:
 把source/function下的function_core.php
 
 复制代码if(dstrpos($useragent, $pad_list)) {
                return false;
        }
        if(($v = dstrpos($useragent, $mobilebrowser_list, true))){
                $_G['mobile'] = $v;
                return '1';
        }
        if(($v = dstrpos($useragent, $touchbrowser_list, true))){
                $_G['mobile'] = $v;
                return '2';
        }
        if(($v = dstrpos($useragent, $wmlbrowser_list))) {
                $_G['mobile'] = $v;
                return '3'; //wml版
}
 
 改为
 
 复制代码
if(dstrpos($useragent, $pad_list)) {
                return '2';
        }
        if(($v = dstrpos($useragent, $mobilebrowser_list, true))){
                $_G['mobile'] = $v;
                return '2';
        }
        if(($v = dstrpos($useragent, $touchbrowser_list, true))){
                $_G['mobile'] = $v;
                return '2';
        }
        if(($v = dstrpos($useragent, $wmlbrowser_list))) {
                $_G['mobile'] = $v;
                return '3'; //wml版
        }
 |