手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 S0 }! s6 O3 }$ R7 d6 D
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
3 ?; C/ r: H4 v5 Z+ r/ }' S3 C, f3 W3 z2 k
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
8 j) l! {/ Q; y" l1 q$ ]1 b) y打开:/upload/source/language/lang_message.php
0 w {4 C" }. O, w" ^+ i* {找到
0 `' m1 i) ^; w7 F- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
" f7 z# J) }3 h* I8 J- 'attachment_mobile_buy' => '附件购买成功',
复制代码
3 y* N6 e' s6 d x+ r 打开:/upload/source/module/forum/forum_misc.php" e" d5 k# b1 L0 n- A6 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>
复制代码改为:
. P. S/ Y) w8 ~7 x* c- if(defined('IN_MOBILE')) {
: g) D c# t4 v2 R - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);# N( q* U0 i) n: q8 d/ K1 ], a
- }else{
8 J' W( |- P# @" g9 R6 m0 z - if(count($aids) > 1) {0 ]: C; N7 e% ]" S
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);$ `& Y+ A; m) V6 c( N
- } else {
/ h/ Z7 B4 t+ A/ F& O5 Q - $_G['forum_attach_filename'] = $attach['filename'];) O4 l! V& B/ Q; o, E: b
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
t, S1 y [7 |: O N2 |* L - }
' K" B0 O1 J9 y$ b f - }
! n$ V1 M7 [3 a* s/ m! v& J2 O
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm: c- v; _3 s3 r* t. L$ P
: Y$ a" G, m6 f! P找到+ W \* {' k5 ~, P9 {7 Q: r
$ `9 k) q: b0 M$ J1 S1 Z
- <!--{if !$attach['price'] || $attach['payed']}-->
5 h0 [/ m1 R3 V: `+ @ - <div id="attach_$attach[aid]" class="box attach mbn" >
9 C; P2 B9 X R; ] - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->* \7 [1 Q# b7 f) k' s9 x( {
- $attach[attachicon]/ ]3 W/ S0 l! e" c# P0 o
- <!--{/if}-->
5 H' N+ g3 x b* K- T. D C - <!--{if !$attach['price'] || $attach['payed']}-->. i7 l; N9 C/ p3 K
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>7 {3 E- k# Q) Y
- <!--{else}-->
# K2 A% k& C0 U' Y! H& |$ }5 b2 p- F/ O - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>0 B% w8 I& b, f$ v; Z: V
- <!--{/if}-->* l% p) b; F* }
- <em class="xg1">($attach[attachsize])</em>
0 K9 Z# O- A9 h& p4 @9 d' d - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
+ Y) K! G: H3 g1 y' G2 c - </em>
- } \! L0 W2 @6 u/ g - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
: T7 y& E M7 g; I7 n2 Z - </div>
# I9 ]$ D6 ]4 i$ x9 K$ Z - <!--{/if}-->
复制代码 改为:
3 o1 C' f2 J4 [
( s( F( z5 ^+ H, d5 i8 d- <div id="attach_$attach[aid]" class="box attach mbn" >2 f o( W. d0 H/ e
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
, O, Q9 N! Q" _; w- m - $attach[attachicon]
$ Z( ~' A4 o5 G) `' \8 S: k - <!--{/if}-->0 Q5 \6 J8 @" P3 Q
- <!--{if !$attach['price'] || $attach['payed']}-->
9 l+ O1 G" |0 j$ _ - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
8 W# d: _7 V8 c* Y - <!--{else}-->' R( v% e7 k6 Y5 r; c5 W# Q5 ^: e
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>9 `8 y$ ~7 J I" _7 i! y' N) K
- <!--{/if}-->6 Z) ?3 ^+ v( b+ Z( l/ @
- <em class="xg1">($attach[attachsize])</em>5 b! @( \$ Q& b+ f2 ?3 ]8 p" Z
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
& H# Z) b$ l7 _3 f7 C - </em>9 F* g. N( G# M X. m
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->$ v6 `& l; ^ A0 A) s
- </div>
复制代码 GBK格式需要转码" \* k) z# R2 m9 R0 S' S7 [3 v% B
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
4 U1 M0 h9 j8 k% A0 f* U6 E; X6 O[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
+ ~" L/ C5 y- E N7 @提取码:8wg1 5 n8 Y9 |% p: E
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
1 _' d1 ~; C3 u. v3 |8 A* F8 Z
|
|