手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
3 E( n1 g4 M4 H0 w A这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
3 z5 h: h& z) X; w0 Q% ^ P+ x) N* S# ]3 G# g
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):& ?( [' l. x5 Y: v! O
打开:/upload/source/language/lang_message.php4 S+ I- U0 E4 q+ o
找到
; [4 Y& b7 G4 a/ l3 Y7 l- H- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:) }0 s0 |5 W6 s$ i" ?5 U c+ z
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 9 k+ p# ]$ F- O5 M
打开:/upload/source/module/forum/forum_misc.php* j3 v. B* D) _* \/ j
找到- <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>
复制代码 改为:
+ M5 f! Q5 |: T1 K Q# I1 m: [% f- if(defined('IN_MOBILE')) {
: ^) ]+ y3 U. Q. N5 E - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);$ M9 n6 G6 r5 W' |$ L- P, b# o
- }else{: O" e. l* l* P
- if(count($aids) > 1) {
. g, u5 M$ q* B8 A$ i1 z - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);/ c" L r; R X9 d5 n5 q
- } else {4 E' L6 f1 S0 p( A- M8 e
- $_G['forum_attach_filename'] = $attach['filename'];
/ q; C2 p1 `' E - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
$ N" [% K, d# P6 h: m2 D* ?" c4 R - }
2 \0 A; Z ]* U$ w4 g6 W4 t - }8 F7 K: s% F/ o0 x% h
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm+ G m. S" x1 v
: Y$ a" G, m6 f! P找到
0 X1 E3 m n& h a' x+ B
9 S! D I% [0 Q- <!--{if !$attach['price'] || $attach['payed']}-->
- n1 K. z8 Y! ]+ K, D+ N" `' E" Z' G - <div id="attach_$attach[aid]" class="box attach mbn" >4 K7 O- K: j7 q
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->5 p9 L, x- U' V: t3 F1 |
- $attach[attachicon] a/ L% t+ N- Y% S' K# }0 P; h' M
- <!--{/if}-->6 z! G( N% n$ Z( D& _
- <!--{if !$attach['price'] || $attach['payed']}-->5 x% g `5 V4 C2 A
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>* E( ~/ b5 Y) ?9 Z
- <!--{else}-->
) G! w% z! j# P2 x$ m - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>. N3 @. l" `7 T
- <!--{/if}-->) S. ]3 T2 k( z5 f3 I4 U+ {% m/ B
- <em class="xg1">($attach[attachsize])</em>
' Z/ |5 @! g& g M: z R; E4 {" M - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})5 h; b/ p+ D( ^( E3 r/ ^7 {
- </em>. g) h; h% {+ t0 v) l5 P; H% T
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
( g$ v8 C5 N+ [ - </div>0 K* w9 \% `- Z
- <!--{/if}-->
复制代码 改为:
0 A, m" Z9 _( S! G. H N- l! X7 I. A$ ^. f4 t7 i
- <div id="attach_$attach[aid]" class="box attach mbn" >. [8 Y6 C1 N7 r& T$ G
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->6 L, ~3 V3 C+ m1 r
- $attach[attachicon]. O3 e# N* N$ \* Q1 A
- <!--{/if}-->* z d1 _: U4 v+ q w% r; F
- <!--{if !$attach['price'] || $attach['payed']}-->
" a8 y/ t3 g. c' _9 o" n - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>/ W3 b, v, \$ [/ Q) O
- <!--{else}-->' j: c x+ ?7 \& g, _0 D# R
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a> m% @6 b3 m* }- J5 C' m
- <!--{/if}-->8 s' C3 K- [+ B- O& F
- <em class="xg1">($attach[attachsize])</em>6 p( t; t: N" z0 ^' p3 W) ]$ h
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
: B. r& L/ c. k" A. q6 E* A - </em>5 b3 Y4 I8 }9 T Z- ?
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->; u& K% `( q; L- Y$ @$ F: H+ y( k; W
- </div>
复制代码 GBK格式需要转码3 d9 {( ~! T7 `* h- q) H ]: f( f, q4 l
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
: X& Z6 x* p5 M[sell=1]链接:https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA + E( Y( f6 i9 j3 S9 N
提取码:8wg1
2 E0 m' w5 V: S2 j6 K5 O U复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]直接复制到网站根目录即可
}1 A/ k; w. k9 [6 J9 j7 P
|
|