罗码网络discuz插件模板教程微信小程序安卓电脑软件htmlphp源码下载

罗码gitluo

 找回密码
 立即注册

QQ登录

只需一步,快速开始

微信登录

微信扫一扫,快速登录

手机动态码快速登录

手机号快速注册登录

搜索
开启左侧

[DZ教程] discuz3.4 手机版收费附件不显示的bug修复

[复制链接]
罗码男神 实名认证 官方 发表于 2019-4-16 23:21:16 | 显示全部楼层 |阅读模式
手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。3 k2 C9 c9 t& [: x3 V' e* O
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
$ x. @) Z8 M5 E. O% O+ U2 O' l" s7 L+ t7 x
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):& j/ D% @/ M) b9 Q
打开:/upload/source/language/lang_message.php/ Q5 ^- A* @. @: S/ @& h: ]1 ]9 ?
找到
) |( r) L7 ~9 C: U2 n7 p6 u4 j
  1. 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码
改为:: B1 q5 X: `# ^, c1 V
  1. 'attachment_mobile_buy' => '附件购买成功',
复制代码
7 @2 Z1 ^3 J9 w! u6 O( [& V( q
打开:/upload/source/module/forum/forum_misc.php
. x$ @/ f8 }# P找到
  1. <ol><li>if(count($aids) > 1) {</li><li>                        showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);</li><li>                } else {</li><li>                        $_G['forum_attach_filename'] = $attach['filename'];</li><li>                        showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));</li><li>                }</li></ol>
复制代码
改为:
4 t, y3 M. ]/ d1 ^  p0 i
  1. if(defined('IN_MOBILE')) {* _5 K7 ?! P9 M0 ?" S% I9 K
  2.                         showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
    ; J$ Z* p; k+ d& M9 c
  3.                 }else{
    $ w: H1 T) Y' A5 y) G6 p8 @1 X  D
  4.                         if(count($aids) > 1) {
    2 h0 z! [3 F) `; I, i; s
  5.                                showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);: a2 v0 k' q4 O1 O
  6.                        } else {
    6 ^0 t1 E2 ~  G4 p9 W
  7.                                $_G['forum_attach_filename'] = $attach['filename'];
    - b# N# u* H( e& g* `% h
  8.                                 showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
    " k8 K. O6 O$ _3 L$ y% W
  9.                         }
    ' g5 }7 {3 e5 u+ m4 g* ^+ R% x' |
  10.                 }
    " j; @1 b+ B3 X7 E' p2 E+ L
复制代码
打开:/upload/template/default/touch/forum/discuzcode.htm9 \& b5 I, ?% ^. Y4 z: j/ X/ l
: Y$ a" G, m6 f! P找到
- F) L" G& u# I  H
, e/ N3 x/ h" o; x- _. D
  1. <!--{if !$attach['price'] || $attach['payed']}-->' b+ l: |* Q  v( \" O
  2.                 <div id="attach_$attach[aid]" class="box attach mbn" >
    $ X& Q' J3 |/ |4 E
  3.                        <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->: ?, s# g8 t! Q3 D
  4.                         $attach[attachicon]* B- I. y" G" ]7 V" T/ V9 h
  5.                        <!--{/if}-->
    $ Y& m: F- f9 O& g! j
  6.                        <!--{if !$attach['price'] || $attach['payed']}-->
    " V+ Z( b1 q8 r2 G4 t0 A
  7.                                 <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>6 T" z8 E* Z0 }1 b2 U. e
  8.                        <!--{else}-->
    ) g. {1 D3 ^8 i0 w
  9.                                <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
    ) k8 Q6 g! |' ]& x5 k. D: O! G
  10.                         <!--{/if}-->
    - H2 k, |  T" r8 d6 L
  11.                        <em class="xg1">($attach[attachsize])</em>3 i+ E6 v( D% }* _! k# v- }0 M
  12.                        <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
    & t  B3 ]) C! ^2 e8 |
  13.                        </em>
    : z7 H- d9 s- |7 S. N% Z; L
  14.                        <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->4 `( w5 g- e& W/ N2 I* l! `9 ^: A7 j: _
  15.                 </div>. j9 G4 K* H; Y
  16.                <!--{/if}-->
复制代码
改为:
" Z6 Z8 w) m2 I* i# c) C8 {; ?  D9 _& ~7 @1 [
  1. <div id="attach_$attach[aid]" class="box attach mbn" >3 n2 m: X  I: b
  2. <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
    0 G  P8 Z. c! i9 [3 n
  3. $attach[attachicon]
    % O* {; I/ L1 t* [
  4. <!--{/if}-->
    6 V# `! O$ v( h! S6 d
  5. <!--{if !$attach['price'] || $attach['payed']}-->
    $ }3 g, O8 v) |' A
  6. <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
    3 c7 @/ u; D) |: k9 i. I
  7. <!--{else}-->
    / _+ g. }5 q7 Q) i, `
  8. <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
    * m& h7 @. O7 ~' U$ d+ K' c$ q4 p
  9. <!--{/if}-->: G3 A3 L! m7 x7 A: q# u
  10. <em class="xg1">($attach[attachsize])</em>
    " A0 |; d5 U% z# |
  11. <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})  a8 \; N* R0 C
  12. </em>
    , |5 Z. A1 D7 @" o6 H3 S" q
  13. <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->/ J+ f/ i% O5 U8 z5 A( n6 H
  14. </div>
复制代码
GBK格式需要转码
6 b5 t1 B) ?4 T5 v: z7 _* M, L+ U+ X, e然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可

0 B1 ?$ m- [# ~) a  e[sell=1]链接:https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA + E6 C" Y, C, P7 W0 u9 Z- `" v
提取码:8wg1 " t% O( s9 @, G+ z7 \2 |
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
直接复制到网站根目录即可
[sell=1]链接:https://pan.baidu.com/s/1QOodnF-tAUo11jN-vsphUw + \* g$ m' S6 l) W
提取码:w52u
5 D9 g( B& M. ^: y+ P& Y" O复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
7 F& `1 a) p( e' }

想说又不敢说,说了又怕被拒绝,拒绝了又怕尴尬,就是这样的。内心很痛苦的那种。
jjj111 发表于 2019-6-12 00:47:24 | 显示全部楼层
我是个凑数的。。。

回复

使用道具 举报

bogewl 发表于 2019-6-16 00:17:16 | 显示全部楼层

回复

使用道具 举报

66666 发表于 2019-6-17 03:57:44 | 显示全部楼层
谢谢楼主,共同发展

回复

使用道具 举报

 shu1332725 发表于 2019-6-18 02:03:36 | 显示全部楼层
前排支持下

回复

使用道具 举报

foryun 发表于 2019-6-18 03:43:22 | 显示全部楼层
有竞争才有进步嘛

回复

使用道具 举报

123男神 发表于 2019-6-21 00:59:39 | 显示全部楼层
沙发!沙发!

回复

使用道具 举报

hgfhgf 发表于 2019-6-21 18:03:46 | 显示全部楼层
找到好贴不容易,我顶你了,谢了

回复

使用道具 举报

全村的希望 发表于 2019-6-22 23:24:35 | 显示全部楼层
支持一下

回复

使用道具 举报

666男神 发表于 2019-6-23 02:02:57 | 显示全部楼层

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 微信登录 手机动态码快速登录

本版积分规则

QQ|Archiver|手机版|小黑屋|罗码 ( 粤ICP备17073043号 )https://beian.miit.gov.cn/#/home

GMT+8, 2026-8-25 21:27 , Processed in 0.154195 second(s), 61 queries .

Powered by 罗码网络! X3.4

© 2001-2017

快速回复 返回顶部 返回列表