Cms技巧
分享创造价值 合作实现共赢

Cms技巧

当前位置: 首页 > 新闻动态 > Cms技巧

Discuz在电脑PC访问手机触屏版或“标准版”改为“

发布时间:2019-12-16 11:15:52作者:admin点击:

新开发Discuz手机版(触屏)时,在电脑访问查看效果最方便了,在电脑PC访问手机触屏版需要对代码做些修改(修改前请备份相关文件):

1. 在 source\class\discuz\discuz_application.php 中查找

'mobiletpl' => array('1' => 'mobile', '2' => 'touch', '3' => 'wml','yes' => 'mobile'),

并修改为

'mobiletpl' => array('1' => 'touch', '2' => 'touch', '3' => 'wml','yes' => 'touch'),

2.在 static/js/mobile/common.js 中查找

!supporttouch && (window.location.href = 'forum.php?mobile=1');

并注释掉(如下)

//!supporttouch && (window.location.href = 'forum.php?mobile=1');

3. 在浏览器安装User-Agent Switcher插件

如Firefox或chrome插件User-Agent Switcher(如下图所示)

火狐User-Agent Switcher插件

User-Agent Switcher插件面板图

4. 在浏览器中输入网址访问

Discuz在电脑PC访问手机版

TOP

QQ客服

18910140161