手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 + s/ a; w( l9 R( \% B6 Q. O
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。1 v( a' ~- K3 U8 U9 u8 h& e
6 \, q) D, F, m5 n3 s# Z修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
" y$ Q7 m" |' c& M4 W! b5 \打开:/upload/source/language/lang_message.php1 w% j) ] {7 S% _+ R
找到
3 U. [4 n; k) D! Q- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为: k. L$ O( n2 C5 Z
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 ) i8 Q2 [( i6 |) O; Q) k- M/ y1 \
打开:/upload/source/module/forum/forum_misc.php' |1 ~ D# m' V; D' P
找到 - <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>
复制代码改为: $ B% A, k! y; \2 x" U$ b5 a7 H! w% W8 q) Z
- if(defined('IN_MOBILE')) {
; ]0 L% X7 d+ G - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
4 E$ V+ ~% K# q" h" T3 R; D2 p3 H - }else{
/ ?" q1 o. j+ M1 a0 t0 a4 T - if(count($aids) > 1) {! M7 \: q% {! |. Q$ ~5 X! K; P0 a9 J
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
3 U" {. `7 N0 m D# V - } else {
+ s0 F! Q; N2 a. W - $_G['forum_attach_filename'] = $attach['filename'];
5 V7 v) H9 S, {# b c - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
5 S* c% {4 D) a- J% t+ v R! ~: p - }" S( Y5 C3 e5 M5 V% z8 W K
- }; C5 ]& {0 ]- a A( ^( b! R
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm$ ~/ g. h8 l _$ v; O3 `0 c
: Y$ a" G, m6 f! P找到
8 d) A- s2 q" ]" e0 D- y
6 R, |9 J5 g7 w; X( b; [: m- <!--{if !$attach['price'] || $attach['payed']}-->
+ p/ S. C/ H9 r3 g- x4 m# q - <div id="attach_$attach[aid]" class="box attach mbn" >
6 c3 ^8 m+ m7 U2 R - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
/ Q' T5 @6 K8 E - $attach[attachicon]% p* e. I1 W3 C. a7 C; ?4 I
- <!--{/if}-->& t3 X3 r e6 q
- <!--{if !$attach['price'] || $attach['payed']}-->
: B, a" h1 J0 A. N - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>/ Y2 z( R. [8 f9 H- F E
- <!--{else}-->
- _2 z9 a" i7 B: g$ C4 c3 D - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
h' Z H/ Z2 N; P/ |" H8 v3 e - <!--{/if}-->
' n8 q* B. E5 ^6 Q5 G - <em class="xg1">($attach[attachsize])</em>0 Q- g3 L+ H( t# X" }6 u
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}); G2 n7 n8 Y+ c9 ~& Q/ Z t
- </em>
# J6 j/ {0 I+ s5 u, _6 | - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
7 L* r9 u- V: Y# L a0 U5 | - </div>: _, l# g$ Y# m
- <!--{/if}-->
复制代码 改为:8 u2 u4 n5 L! I0 [+ k: n
9 j+ n# O- G* P( y) ]& x- <div id="attach_$attach[aid]" class="box attach mbn" >/ A' o: @, w; e- D+ _* u
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
3 g0 a- ~2 p8 c/ C$ l - $attach[attachicon]
: p! n+ B3 O" a% K0 }% L - <!--{/if}-->) c7 E @ ~3 w
- <!--{if !$attach['price'] || $attach['payed']}-->
3 V8 w8 G( Y0 e1 x% G! B# e - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>& B: B2 U9 K) d, f
- <!--{else}-->
2 Y9 S- _5 d' y" v' X3 n4 M- [+ F - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>- f: V. H5 t6 J1 ?, c* ~+ H% ~$ w
- <!--{/if}-->
. M6 k9 m0 H1 [2 Y3 r3 ?+ r - <em class="xg1">($attach[attachsize])</em>) Q' }6 ?1 x( E" g
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
% d% [5 f+ z! h6 K1 e: Q* `; U! l( p - </em>! L. j y/ x% U" @9 {# k. D
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
0 b( Q4 ^4 F( G. g* a* A1 q$ A: r - </div>
复制代码 GBK格式需要转码7 h) i: J3 ^$ G8 ]
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
3 z0 D0 A' V! Z" k* e[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
" T$ o- @3 |% n' A提取码:8wg1 ) Q# W% T3 X2 Z+ V3 K
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
& N9 @, M5 R. S! i9 c/ p
|
|