 | |  |
 | 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
) M `$ X# ?2 D0 E# V这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。% i' r& n( j& I& r; v! a" [
. ]0 t; k9 s) [: U7 ^9 g* |
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
6 D- b; G$ m3 j B% [; H' h打开:/upload/source/language/lang_message.php4 G" g: G7 k+ T, K( O' A+ f& b
找到4 s0 Y4 q' C0 i7 n9 ]
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:0 v0 r/ J- v* R2 ]6 a' I
- 'attachment_mobile_buy' => '附件购买成功',
复制代码
* _5 i5 Y/ S4 ], H I3 p 打开:/upload/source/module/forum/forum_misc.php
* G9 ?' p% _8 D' A/ i2 [找到 - <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>
复制代码改为: 9 T$ n7 ?1 ~4 b) q z2 ~! e4 _
- if(defined('IN_MOBILE')) {, F4 Z! }; K* n' y3 X0 o
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
( K8 P7 U9 J, \) c: B! \9 q, I - }else{ F: @* H- L$ k) r* d8 ]6 S& q" r
- if(count($aids) > 1) {
$ s. n$ H6 \ m- X& _5 h - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
0 ~* R1 i( q/ @- T - } else {
8 s/ b' N( U6 [. o6 | - $_G['forum_attach_filename'] = $attach['filename'];
6 b( O' _* k, `- F& v2 C - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
- N h: D1 C- X) L$ Q; _ _8 w( I - }7 i$ B* C0 Z. G; e
- }
9 }+ ?, D' H+ E& s& A, f4 j3 o
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm9 D0 v9 l5 K. _5 E! O
: Y$ a" G, m6 f! P找到
% Y; `& c9 e1 V1 c6 M" c; a
- b' h+ o# a& n5 t* x7 N- <!--{if !$attach['price'] || $attach['payed']}-->% h w4 _& r3 P
- <div id="attach_$attach[aid]" class="box attach mbn" >
* B3 R) b$ V3 \6 |, E0 d- ` - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->4 A9 M# o c6 S/ P+ f& w* o v: F
- $attach[attachicon]) S/ ]) s; ]8 }6 ^2 ` T) i4 m& K
- <!--{/if}-->3 L. @6 Q+ T4 H+ o
- <!--{if !$attach['price'] || $attach['payed']}-->
' b% x( T* M* C# |& y. B - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a> Y+ k& N9 `, Y' E4 [- v" w% P
- <!--{else}-->1 H. ^ M8 F7 E6 |9 R9 x
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
/ t, Q4 z+ t6 n - <!--{/if}-->
4 ^% R; c# w: o! F0 S6 [ - <em class="xg1">($attach[attachsize])</em>
1 a- D- t4 q F: \' _ - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})8 b* {# F) {" x9 y& C
- </em>
+ N: w: l7 B& t9 e# [5 g - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->& x) m) E# _9 I* S8 c/ _
- </div>7 \: r- f1 {7 K! ]. [; Y1 A) t
- <!--{/if}-->
复制代码 改为:0 V' P# W/ g% X. C, B5 W
" q# w" C9 n. F3 \4 t. Q
- <div id="attach_$attach[aid]" class="box attach mbn" >
9 V6 ^. |/ [; w# V% @ - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->9 t6 s' A7 P5 }3 X* ^0 I( Z
- $attach[attachicon]2 [/ P/ l( n, D0 Y
- <!--{/if}-->
1 j( }% E1 p, g* i+ X/ u - <!--{if !$attach['price'] || $attach['payed']}-->6 E2 s1 H$ J0 k# A2 U
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>% c8 x$ ^; k" d( I* L$ K ?! F
- <!--{else}-->
# ]6 u$ n" J2 W - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
5 z, o( l) C- ], E& h, k' p- l - <!--{/if}-->! F- \& l/ K/ g h
- <em class="xg1">($attach[attachsize])</em>) _( [* Q7 i6 G4 e9 U2 Y
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})) q8 R! k4 t7 ~
- </em>/ M- U i5 K; r, X# L
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
5 ^/ c d. y7 j) R4 Q! } - </div>
复制代码 GBK格式需要转码
4 ]4 {) t4 b* [* p3 V" P" D然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可! L" ]% M* m9 F2 K
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA $ d# |4 m0 C3 Z, D& \! P/ _
提取码:8wg1
! q9 b$ Q8 W* n! |复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
/ r' q& U, s( K' ~5 e
| |
 | |  |