discuz手机版提示无手机版的终极解决方案! [复制链接]

moqu8 2017-3-1

3752 0
【方法一】
discuz触屏版手机第一次访问的时候有一定概率会提示:您访问的页面无手机页面,是否进一步访问电脑版 ,如果刷新一下就正常了,但是这很影响用户体验,那么到底该如何解决呢?
网上很多人说这样修改:
source\language\lang_message.php
里面的
'not_in_mobile' => '您访问的页面无手机页面,是否进一步访问电脑版?',
为:
'not_in_mobile' => '<style>body {background:#000000;height:1000px;width:auto;}</style><meta http-equiv="refresh" content="0;url=forum.php?mod=portal&mobile=yes">',
还有人这样修改:
修改
source/function/function_core.php

找到 source/function/function_core.php第618行:

$mobiletplfile = './template/default/'.$mobiletplfile;

改成

$mobiletplfile = './template/default/'.$file.'.htm';

然后覆盖源文件即可!
这样就彻底解决了这个问题!

【终极解决】
经过上述修改,本站观察发现仍然会出现类似的提示,很影响体验,那么何不修改这个提示呢?修改的方法如下:
1.
修改模版文件/showmessage.php,将提示代码修改为如下:
<div class="jump_c">
<p class="one">$show_message</p>
<!--{if $_G['forcemobilemessage']}-->
<p>
<a href="http://we.moqu8.com" class="mtn">立即返回首页</a><br />
</p>
<!--{/if}-->
<!--{if $url_forward}-->
<p><a class="grey" href="$url_forward">{lang message_forward_mobile}1</a></p>
<!--{elseif $allowreturn}-->
<p><a class="grey" href="javascript:history.back();">{lang message_go_back}</a></p>
<!--{/if}-->
</div>
即可实现对用户更加友好的提示!

最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心