手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
4 y+ C9 E: a6 y* E$ K1 K这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。$ M" }1 R2 x: D
; x' t0 k* P) y2 x1 _
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
# w, k) C4 P$ y; N打开:/upload/source/language/lang_message.php
9 G, e+ _. a4 |) M, v找到! r+ w. J" c0 x8 ]. ~
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:% {1 K6 [" z# ^3 L. B. x
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 8 S& Z U, i, s I2 T
打开:/upload/source/module/forum/forum_misc.php+ [0 t% L. ~2 k1 a/ G, g: L
找到 - <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>
复制代码改为:
7 J+ e: ^, R! ^/ C- if(defined('IN_MOBILE')) {( I) A- h$ o+ o5 ?+ ?
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);: d- T# B% b0 l7 [4 [( Q3 v
- }else{) z: d+ M' l* E9 F3 _9 I; c; w
- if(count($aids) > 1) {
. N: V* }# [2 X% H7 l P4 \ - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
5 X5 v9 s8 s/ g, O8 G - } else {
, Y& u1 Q6 c. c- C4 y# U5 |7 b - $_G['forum_attach_filename'] = $attach['filename'];
2 W, @9 ~$ Y2 ?' N; M$ O2 ~ - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
# W, {9 R5 Z1 e, R - }
. L# j. e$ l }# m1 A# T/ ? - }
) l; x0 u9 M3 N& c
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
( e0 x' v8 w/ u" |8 ~' V6 q: Y$ a" G, m6 f! P找到. N! R- J% D6 b! ?- P: }1 U+ ?/ c: _
( Z9 f5 {* b5 P) y1 c4 q" P
- <!--{if !$attach['price'] || $attach['payed']}-->/ y& J" v% T$ x. n) f: \6 R
- <div id="attach_$attach[aid]" class="box attach mbn" >0 ^* Q( P1 r" e: e3 u$ S. U+ T
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
1 K$ u3 K( s* g) c: z - $attach[attachicon]
+ B' v* u0 ?2 r$ o/ ^3 w - <!--{/if}-->
% H$ y; r1 v+ y1 _6 T! n8 s - <!--{if !$attach['price'] || $attach['payed']}-->/ |" J( O; A' h! B& D
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
$ f1 ?2 W3 b5 L1 j; c& K - <!--{else}-->
5 `+ z" M$ U; }* } - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
3 k3 X# q6 [+ k/ ^3 o - <!--{/if}-->
9 `9 [% D/ x' G% { F2 p - <em class="xg1">($attach[attachsize])</em>
2 q/ t3 O# C6 w9 U+ X - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})" [1 }# }7 R0 g9 F
- </em>4 D" M( M$ Z$ s5 i
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->0 w, S: S. N1 o- N) t
- </div>7 U; u5 C$ D! H. f V7 M1 y1 q
- <!--{/if}-->
复制代码 改为:
. [ t' W3 s( [( ^% | {, J) W; |7 p) H2 g* k8 B) I& Y
- <div id="attach_$attach[aid]" class="box attach mbn" >
+ R* A- y6 ?& W - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
6 I8 {2 l9 t, x" k' e% M0 g+ k - $attach[attachicon]
4 Y4 }' j: N' `4 P6 K+ T - <!--{/if}-->
* |. C4 x2 t& L( m- R& E8 W" ^8 Q& E" z - <!--{if !$attach['price'] || $attach['payed']}-->% s' k5 m9 T6 l' \# i
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
2 A6 h6 g" Y3 T5 h/ P; A1 g - <!--{else}-->; O1 W) c3 K6 O9 h1 h: y5 \
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
$ Y$ p `. K0 K, d: D - <!--{/if}-->
0 X- r4 z0 `0 V - <em class="xg1">($attach[attachsize])</em>
2 w% o" W6 u/ O! N: q4 Y - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
, J- z1 `% m" i - </em>4 w0 E6 w; o O: Y
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->0 ^' ^- K) T0 _4 L% ^9 \% m/ K
- </div>
复制代码 GBK格式需要转码
% |/ C( X2 G( Z+ `3 _$ S2 L- ~然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可3 E, y8 p. p! K
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA 4 a# x& K5 N9 p+ x. }7 D' p7 C
提取码:8wg1 " E: ~0 k) _ d; @0 b( E
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
2 @, ]4 H4 p8 d* c) v
|
|