【即将关站通知●已关闭注册功能】,倒计时剩余:计算中...

discuz 手机触屏收费附件不显示的bug修复


手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
6 S1 S$ E9 b- }: X+ ~(www.m oqu8.c om)
( U" k0 Y2 Z8 N(w ww.m oqu8.c om)
, v: j, g& W0 C% D1 j+ |(w w w.m oqu 8.c om)
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
+ t5 Y" z4 t/ r6 o( x(w w w.m oq u8.c om)
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
打开:/upload/source/language/lang_message.php


找到
  1. 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码
改为
  1. 'attachment_mobile_buy' => '附件购买成功',
复制代码
打开:/upload/source/module/forum/forum_misc.php
找到
  1. if(count($aids) > 1) {
  2.                         showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
  3.                 } else {
  4.                         $_G['forum_attach_filename'] = $attach['filename'];
  5.                         showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
  6.                 }
复制代码
改为:
  1. if(defined('IN_MOBILE')) {
  2.                         showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
  3.                 }else{
  4.                         if(count($aids) > 1) {
  5.                                 showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
  6.                         } else {
  7.                                 $_G['forum_attach_filename'] = $attach['filename'];
  8.                                 showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
  9.                         }
  10.                 }
复制代码
打开:/upload/template/default/touch/forum/discuzcode.htm' N0 w9 ?# R- U. N(ww  w.m oqu  8.c om)
找到
  1.   <!--{if !$attach['price'] || $attach['payed']}-->
  2.                 <div id="attach_$attach[aid]" class="box attach mbn" >
  3.                         <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
  4.                         $attach[attachicon]
  5.                         <!--{/if}-->
  6.                         <!--{if !$attach['price'] || $attach['payed']}-->
  7.                                 <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
  8.                         <!--{else}-->
  9.                                 <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
  10.                         <!--{/if}-->
  11.                         <em class="xg1">($attach[attachsize])</em>
  12.                         <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
  13.                         </em>
  14.                         <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
  15.                 </div>
  16.                 <!--{/if}-->
复制代码
改为
  1. <div id="attach_$attach[aid]" class="box attach mbn" >
  2. <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
  3. $attach[attachicon]
  4. <!--{/if}-->
  5. <!--{if !$attach['price'] || $attach['payed']}-->
  6. <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
  7. <!--{else}-->
  8. <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
  9. <!--{/if}-->
  10. <em class="xg1">($attach[attachsize])</em>
  11. <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
  12. </em>
  13. <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
  14. </div>
复制代码
然后将下列attachpay.htm 复制到 template/default/touch/forum/ 即可

attachpay.htm

懒人包(简体GBK版本,其他版本请自行转换)

懒人包.zip


收藏 邀请

路过

雷人

握手

鲜花

鸡蛋


最新评论

在线支持
关闭
欢迎来到魔趣吧
如果你有建站技术问题、仿站需求、模板插件修改需求,请联系我们的技术支持!高效率,低价格的帮你搞定!
请认准魔趣吧唯一官网:www.moqu8.com,谨防假冒网站!

一般问题请到【求助区】发帖咨询(免费)!

邮箱咨询:
winkill2012@qq.com

邮箱咨询需注明:资源地址+本站用户名+具体问题,三者缺一不做处理。非本站资源不处理!
在线支持

关于魔趣吧|魔趣建站

魔趣吧,志在打造全国最大的建站资源共享平台。 本站提供海量免费的建站资源,包括WordPress模板、Discuz精仿模板、PHPWind模板、phpcms模板、Discuz精仿插件、帝国cms模板、织梦模板等上万精品模板!同时,提供各种建站素材、JS特效、整站程序源码!
服务中文站长,传播分享精神!建站,就来魔趣吧!!
2015-2024 魔趣吧 ( 豫ICP备2021024354号 )   豫公网安备41030402000182号 百度统计
HTTPS安全认证
|网站地图 | 已运行:天 
温馨提示:本站所有资源、教程、源码,不得用于非法站点及用途,否则,本站将终止提供任何服务! Powered by Discuz! Licensed