 | |  |
 | 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
! {5 Q4 {5 C1 Q6 b7 t Q这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。6 [' ]2 l& R( r5 K/ G: @+ x- L C
8 L1 R7 ]$ Z0 ?0 y: d2 M修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):! a4 r5 ]' }8 h9 ^9 B& Y
打开:/upload/source/language/lang_message.php# t* z/ M1 K+ ?3 n6 r, Y; b
找到6 n4 `. Q5 b; A/ o1 s
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:4 |' j( f& \& H. N, }
- 'attachment_mobile_buy' => '附件购买成功',
复制代码
. c8 x0 x4 U2 k* W3 D) w5 q 打开:/upload/source/module/forum/forum_misc.php" j' @0 q6 W% {: U, O7 T, h
找到 - <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>
复制代码改为:
2 l- T; F$ i% l0 b- if(defined('IN_MOBILE')) {
) R T }) S; E9 a+ Y3 z o/ u - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
! r( F$ R/ c' ?7 [5 h/ d - }else{
/ W& m% ]7 A- M6 i) X/ L# h6 ?5 P - if(count($aids) > 1) {5 d0 h. j' C* _" M, ~' C5 E. \% m
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);1 O8 B8 o$ W8 y# s' C' v9 q
- } else {
5 B; t: `& K2 B" \: a" Z/ [ - $_G['forum_attach_filename'] = $attach['filename'];
! M9 f2 t9 O$ [ - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
9 K; Q2 [7 W0 l) t; C3 q4 I - }
& [8 d: ?* D/ l z9 k' B0 Z5 m - }
# `- ~3 e) _$ [' E+ N# S$ I) _' t
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
( g8 N3 _) ]4 X7 p: Y$ a" G, m6 f! P找到4 w3 C: \8 a2 G; t
( U6 u/ Y5 C9 |6 o- e5 P- <!--{if !$attach['price'] || $attach['payed']}-->
: S4 }/ i. o- J H) _. _1 D; a - <div id="attach_$attach[aid]" class="box attach mbn" >
* M6 i9 L1 S! f7 H - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
5 r) A/ u# t9 H' u% X8 ^; ]. { - $attach[attachicon]
& b5 Y, i4 f8 F. J7 e - <!--{/if}-->; n4 M* Q5 Q9 `
- <!--{if !$attach['price'] || $attach['payed']}-->3 R# S+ q& R+ U- z8 K
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
" R% k( k5 @- D2 @ - <!--{else}-->
3 k0 t9 S, V% }* M+ B - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
( H, Z+ h2 \0 ^ - <!--{/if}-->
) u' {/ c2 K h+ G0 G& F8 _8 k - <em class="xg1">($attach[attachsize])</em>
* C4 K; g0 F$ t9 M2 f - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
8 J4 A* R! D, _ q - </em>
# G+ V$ P" r8 M2 ?2 l$ d: q - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
/ w7 W, r# ?" v7 u( j$ u# b* u - </div>- g1 s2 p+ x8 c, S+ C. q
- <!--{/if}-->
复制代码 改为:
& N7 L' y, N, ]" w# e! G# X
% S* ]6 |7 b1 N1 n1 L- <div id="attach_$attach[aid]" class="box attach mbn" >
& H- s; Z. w' _4 b - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->" p7 Z) ?6 H1 p4 Q# D, m
- $attach[attachicon]1 c/ m9 E5 o) N
- <!--{/if}-->5 e8 v# n/ Z- K9 l: R3 N
- <!--{if !$attach['price'] || $attach['payed']}-->
4 c8 W+ \: V" |% J4 {5 z* { - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>/ G7 G! j! f. ?
- <!--{else}-->- a2 M7 [# q) p2 V$ `+ N* n
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>" v* F5 z7 w0 g9 m
- <!--{/if}-->
( s6 F/ b" g. r9 m f - <em class="xg1">($attach[attachsize])</em>9 ]) J! e' |* M: {
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
5 ~. b7 R: R$ h$ F! {1 L5 G - </em>
0 |. T9 F" W. q2 a1 G - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->0 p( U7 [$ t9 O' L; G% \* k( D
- </div>
复制代码 GBK格式需要转码6 ? L# z& Y6 V
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可% L7 E1 a/ A8 o* Y1 I
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
2 E9 O: K0 ?0 O3 F提取码:8wg1 0 d7 I- H# e" N: ?
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
* H5 J# k. I6 H& `
| |
 | |  |