手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
7 h1 Y: E; j( z0 Z! o. X: H这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
& d3 S5 v7 z+ a' F" l, B2 x# o* j6 c4 S$ R0 u
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):0 b: e$ U D2 ]1 u: N
打开:/upload/source/language/lang_message.php
) g; c! U" T8 G* J& u找到
4 E8 z2 x4 K, _( Y' i/ s- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
3 ^/ v5 b7 V, {- A9 r. J- 'attachment_mobile_buy' => '附件购买成功',
复制代码 3 l& ~( a% L9 r! h( s" H
打开:/upload/source/module/forum/forum_misc.php
& t/ x4 k3 z5 `5 b找到 - <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>
复制代码改为: 6 m4 ^, a; @' Y m9 T' h9 p" Y
- if(defined('IN_MOBILE')) {1 `7 g- g. `! q/ h0 G
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);( O2 O& k$ D8 t% ^$ y
- }else{% O% I1 y& F6 T7 f" ?+ O
- if(count($aids) > 1) {
& S; [6 v! B' S; `0 j2 ?* z - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
* l) H' d4 p' c( l) |' J% C - } else {8 k! L, K* S" L% K2 h7 w* w. G3 x
- $_G['forum_attach_filename'] = $attach['filename'];6 B7 F# m+ e. R& m- `9 \% c
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
& Z, a* d: `+ l3 l - }9 q1 A: [% X' |4 a
- }
+ O3 ?3 y/ {4 b6 f
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm9 M3 P9 v$ Z9 N* Z( l3 I) B; p, P, R
: Y$ a" G, m6 f! P找到
5 p# I i V" Q* ~) _" W3 z& g7 A) R
- <!--{if !$attach['price'] || $attach['payed']}-->! B+ s2 h5 L* n! [ E& M: p; ^. ?# B
- <div id="attach_$attach[aid]" class="box attach mbn" >
. U0 K5 |/ Q( w' f9 K - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->* {2 ]3 l x m; [: ]- y% R
- $attach[attachicon]5 \ ?# e6 F- C7 h$ a) i
- <!--{/if}-->3 ?/ B& Z# A6 e/ p0 Z7 z0 g
- <!--{if !$attach['price'] || $attach['payed']}-->
. }: w2 d6 Y; S" R) ^; C. L9 E& H - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
9 A8 T/ |, D- W# U, z1 J2 a( Y - <!--{else}-->; ]4 v& F# ]$ C4 R
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>) U# `: {7 B; t2 h/ Q9 n
- <!--{/if}-->( R: f; d, K1 ^& k. R
- <em class="xg1">($attach[attachsize])</em>
3 b8 ?1 R! m0 y9 f1 F( M5 Z - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})7 o& X0 p6 `" z. C1 z8 D# G' T
- </em>* N# d( Q- a8 L: a/ m _
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->& |" f5 Z9 n( ]7 N1 ?$ _+ ]
- </div>$ \2 x" B" u( T2 [: P
- <!--{/if}-->
复制代码 改为:
' G. l; o8 l: ?* V3 R6 @% C9 d$ M$ G4 O, q( U0 e
- <div id="attach_$attach[aid]" class="box attach mbn" >* T& z) v) t) u" x
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->8 l; Y8 h* _8 ^2 n& L4 ?7 M
- $attach[attachicon]- t* Q# ]6 Z( S) G# I
- <!--{/if}-->
0 f+ u$ i2 D; H1 z - <!--{if !$attach['price'] || $attach['payed']}-->! \! w: k5 X9 q9 H
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>! [' v: w/ I- A! O' D3 L" G% o
- <!--{else}-->
& w H( ]- z G - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
2 C; l0 W/ f* ~6 ? { - <!--{/if}-->' y( g/ t6 R J- Y
- <em class="xg1">($attach[attachsize])</em>
9 r! j/ a0 r) y' h - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
8 n4 ?5 @" O3 y8 Q, b' v - </em> b* K9 P% J E
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->6 t3 J% X1 k- R
- </div>
复制代码 GBK格式需要转码
. w ?2 C0 ?) K; x然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可/ I. N4 @3 y1 R& S
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA ) _3 w: q2 @( h. c. I; u
提取码:8wg1 7 [1 ?7 P8 k: u8 A1 ?* T* ], {
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
4 U2 j9 G) G; o
|
|