 | |  |
 | 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
' Y" x( |! d* X1 G6 f4 g( d+ ?这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。6 t3 P; d( l) W3 r' w
5 k# f9 x1 S0 `! _4 C1 U修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
9 d/ n4 ~8 S8 _5 q打开:/upload/source/language/lang_message.php
- x5 Q0 i& y5 n找到: u @7 h, M! l
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
7 ^" l3 `/ A2 J4 E j- 'attachment_mobile_buy' => '附件购买成功',
复制代码
: v" ^ K8 x, {. k 打开:/upload/source/module/forum/forum_misc.php
& E: R7 a1 C0 J) l g找到 - <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 j4 v( B( T0 f2 ~8 ~- if(defined('IN_MOBILE')) {' d+ j; L7 e0 D8 |$ x( C, ]) r
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
1 c. Y T2 P; A! O/ V - }else{) _- F1 ~/ }3 v6 D$ [% I t
- if(count($aids) > 1) {' [+ p, F& L; g) U/ [/ C; J" n* x6 a
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
; \% Q- m, S) z3 s' v9 C - } else {
/ D% q& I7 ]4 ` - $_G['forum_attach_filename'] = $attach['filename'];0 h% r: @1 ?# z7 H, } t; _
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
9 T3 H! [( a* a - }6 b! X+ f* ?" u
- }4 I1 e" P/ V% x% L- n7 e5 Z) o: I/ v: X: K
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
" `( {' i; O- y: Y$ a" G, m6 f! P找到" ^7 q6 J; ` V) F' Z, v) `
, g/ e+ B- j1 E# Z3 G' [& i- C6 ?! F- <!--{if !$attach['price'] || $attach['payed']}-->, d# B3 ^ @& ^; k. \2 w
- <div id="attach_$attach[aid]" class="box attach mbn" >. T: }4 M; q0 O7 v( b6 ^' _# ~. y* j
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->! b7 S# d* C, }1 d1 c
- $attach[attachicon]" }9 f8 `2 {6 v0 a5 [+ Z5 y! a& ~' [6 @
- <!--{/if}-->. ^3 S& u0 }) @% {
- <!--{if !$attach['price'] || $attach['payed']}-->
0 j8 R- m) E2 z7 Z. c# h/ c - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>+ N! j6 K H8 m [0 z* v
- <!--{else}-->
# B5 y, d/ h/ `# T, U' Y' J" R8 n - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
* ?& F5 R+ S' T; _0 j - <!--{/if}-->- V$ p3 [5 R1 O( g
- <em class="xg1">($attach[attachsize])</em> f3 U l6 p( T+ ^
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})% ~7 H6 k" t. S' c% Q3 Y
- </em>% {1 k! n! N- D5 B, V
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
% [6 Z7 }, [) x$ B0 u - </div>
: c7 \( r. W p U+ z8 _ - <!--{/if}-->
复制代码 改为:1 f% b5 i2 u# ^' v( l
1 e; J8 J& u/ O+ v# S- <div id="attach_$attach[aid]" class="box attach mbn" >
( X: Y+ H, |% o/ _# X m - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
5 F: g9 L" f# z( o& e - $attach[attachicon]
9 M! Y0 c8 A6 X: r- b5 S - <!--{/if}-->. O0 L- |0 R) T4 H
- <!--{if !$attach['price'] || $attach['payed']}-->$ B; [6 ~7 x$ w
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
* q2 p3 h* b" H; _. l1 t, L - <!--{else}-->' {) e" x$ e. ? F
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
- Y& l5 [1 k7 i* Z; T& p - <!--{/if}-->
1 r( W( s: i$ H7 {1 ? - <em class="xg1">($attach[attachsize])</em>
7 N9 }/ A$ [- I( `+ I* V1 k- z; u& u - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
6 }0 i2 Z9 I' q3 z1 Q. s) a5 i - </em>% O# t; Q9 i1 J1 ]2 u/ W
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
w4 `3 O. |& }( c; a - </div>
复制代码 GBK格式需要转码
8 p4 \: P' H% N然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
) N _% _- _% j( H+ e5 q[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA ( i7 ]$ q* G# ^* U7 q6 L" U
提取码:8wg1
* W( p9 L" s: A" [4 d6 t1 F2 h复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
7 Y# V7 W9 i; K% u- c
| |
 | |  |