手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
) I. b8 {1 t3 b7 w9 \# e+ d: V3 U4 _这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
$ Z, R( K4 ?! p, S$ y
, _7 g, G. a: V% Z7 K- R) A修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
+ Z; d5 ]! x! R J# w, {打开:/upload/source/language/lang_message.php' g; ]: Z# n8 f9 J* L/ P+ G
找到3 \' f8 p' J9 g7 o
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
* M/ z0 d% | X1 X- 'attachment_mobile_buy' => '附件购买成功',
复制代码 ! v" t# B& @+ @0 I" A
打开:/upload/source/module/forum/forum_misc.php2 O% ~. H N7 c$ }) a; M5 R' R
找到 - <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>
复制代码改为: ! s3 {3 E1 ]* W8 v8 t# c+ s9 b8 k
- if(defined('IN_MOBILE')) {
; }' f6 {# ?% Y$ K% Z& d, Q+ H - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);9 Y0 o, }3 g+ Q4 Y1 f" O
- }else{. K) L9 u |' k0 L6 ?/ J2 G
- if(count($aids) > 1) {
- r- J+ N# k% \# S$ v8 G3 M - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);6 T' z6 g# o" q8 J
- } else {) k: T u2 I- y/ U- t
- $_G['forum_attach_filename'] = $attach['filename'];
+ l" u2 v! A5 {2 [. B1 l, f - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));; z2 |6 h; K. ^; k1 I/ r4 T
- }9 ^9 K& {2 N3 U: k9 ^
- }
+ B6 u6 K# ?9 b
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm3 s7 f8 f' d$ N5 y/ b
: Y$ a" G, m6 f! P找到& X7 D/ \' f2 m/ k" a: p
' ]9 T1 R( Z3 f+ }# Z/ q ^
- <!--{if !$attach['price'] || $attach['payed']}-->. b" @+ |7 F1 i7 r f2 {
- <div id="attach_$attach[aid]" class="box attach mbn" >1 [: S2 U4 c: h, f& H
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->3 v/ v8 }+ r# J3 c0 w. Z
- $attach[attachicon]
& _+ g4 O4 ~ m5 y0 C5 ^9 Y* q8 [ - <!--{/if}-->
9 \' d# Q! K @# e* C" ? - <!--{if !$attach['price'] || $attach['payed']}-->: L( m+ R. r6 x/ ?. ?0 V* e
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
3 F F9 T$ I# \* a - <!--{else}--># G8 G. C j. g5 w% g3 ~! t
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>, d( c4 \' i* t, n6 I; A5 H7 B
- <!--{/if}-->/ `0 q2 J' Y3 r8 n# e6 R0 p! R
- <em class="xg1">($attach[attachsize])</em>
) `% H. t% z6 w w - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
S# @3 Y7 ^) t% F( w/ X - </em>
( o" U/ b; O5 @" A: h% Y: Y - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
" O* z0 a) m# a& U" [1 Z; w - </div>
# D: \/ Y" I+ K7 Z) q - <!--{/if}-->
复制代码 改为:3 `0 Y2 y+ G! m3 o5 |3 x
; U/ _6 T) [- P* L% U) f; c5 k- <div id="attach_$attach[aid]" class="box attach mbn" >
# b. ]2 s) b# p* N+ X; T! U - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
}4 ?$ f: W8 }, o0 j - $attach[attachicon]: g* D% b6 S- V) u, z6 }2 y( o) ~
- <!--{/if}-->
@& |% q3 z7 L - <!--{if !$attach['price'] || $attach['payed']}-->
. C% ~3 P: `- K" ~9 u' ] - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
3 j: p/ s/ F/ F4 q1 f, f - <!--{else}-->
/ M5 F+ h5 ]$ B& }$ t - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>9 m& D/ \0 K8 O. }
- <!--{/if}-->
# }! X3 W) }! a" g! P) z; Y& y# ^ - <em class="xg1">($attach[attachsize])</em>& ]7 u$ j0 G5 v* ^; M
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
% j2 D T$ K! o$ [ - </em>
; Q# V2 [) E" ~" X - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
9 c) ^7 e0 G$ o8 N8 \1 s! a( L9 v - </div>
复制代码 GBK格式需要转码
$ E+ E6 T& O' y9 F; z0 W- c然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
& D3 K6 g0 g7 n& {& [[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
# z: K" C' l6 o" K提取码:8wg1 * Z7 D K' ]% z$ M
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 ) a b q! A( }3 b8 |/ F
|
|