手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
- g8 m& q" }. @这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
]7 M* R+ N5 w9 u& [$ F/ V8 A: U* s- J
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
) p) h1 w! h& O2 F8 k打开:/upload/source/language/lang_message.php; u/ }% _ D5 h9 N- S2 E- n* J
找到; Q" r/ O G% } p9 h
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:5 S* o/ w% x! a8 X. _6 Q* u
- 'attachment_mobile_buy' => '附件购买成功',
复制代码
8 f. h6 D5 H! ?6 E3 d0 k 打开:/upload/source/module/forum/forum_misc.php- t3 z7 T" W( \/ H2 X
找到 - <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>
复制代码改为: 2 h+ D8 N$ Y) w* o
- if(defined('IN_MOBILE')) {
. i; N3 ]( L/ Z1 s: n6 g" u - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
& o4 K1 L" \3 D; C1 u5 F' [ - }else{
1 E7 {' M! S2 y( r* o1 x7 ? - if(count($aids) > 1) {$ q& b" ^6 R4 f. A3 T3 i9 R: x9 u3 t
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
8 N) I0 ^ O! K# C- _ - } else {8 B/ D: F1 l, K6 u5 }; {
- $_G['forum_attach_filename'] = $attach['filename'];" S5 h) h+ j2 h4 [' v
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
. s7 I7 U0 u& I( X0 R5 J |* a! Q - }
, L5 c& J4 ^# U+ A9 z( L+ S( L - }
7 f) w$ ?: j2 q& g/ }" R
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm+ Q- E8 S H* r# _' H5 n
: Y$ a" G, m6 f! P找到
' s2 |5 Y8 d4 A9 Y7 j( N" E9 \. X, y, N2 N4 z0 B: }. F9 R! X" |8 @
- <!--{if !$attach['price'] || $attach['payed']}-->
0 O1 V& r# N! t" P7 n - <div id="attach_$attach[aid]" class="box attach mbn" >$ i: ?$ z% F; E; D! A* r* N
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->' c! |& z7 ]' N
- $attach[attachicon]
1 E+ U0 `; E4 }8 A5 o5 }- R( V/ y - <!--{/if}-->3 D5 Q/ t; c# b& k0 O
- <!--{if !$attach['price'] || $attach['payed']}-->
# {2 m* E! h) k- R) ]! ] - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>+ m' y( ~' F* }" _5 Q/ i4 U
- <!--{else}--># o* r. ^% e+ Q7 |1 J4 c: z' }
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>( S9 B/ H+ Y7 p. b( V, g
- <!--{/if}-->! \1 H$ m* A5 W& g3 t9 ]3 f
- <em class="xg1">($attach[attachsize])</em>
) [- p" t( z+ ]# M - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
J) u; I, O* J' ~ o8 A - </em>
' ^' }4 X8 {+ Q" N8 w - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
# f; ^( G B6 e; n - </div>
& u2 {( d- Z [% d' ^ - <!--{/if}-->
复制代码 改为:
& A+ a+ Y% ^* q6 x
6 q }: ^% g5 w/ O2 o! P- <div id="attach_$attach[aid]" class="box attach mbn" >6 Q0 _8 D3 _3 J- C8 i! M2 a$ F
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->: |3 ~ o5 ~. H' B% e; G
- $attach[attachicon]
2 I% I* `* N( e9 T! k: M. D - <!--{/if}-->
/ U2 U1 @- ]. L% h - <!--{if !$attach['price'] || $attach['payed']}-->
0 i0 w; @: ~; g( ~' Q. k$ E9 F - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>& r4 u) t2 @; W; ~+ a; R/ M4 K
- <!--{else}-->
. }: N2 a+ k# X1 C m/ F0 @$ e6 Q - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>" }: f" v; f r
- <!--{/if}-->. \1 h; p& I1 z! u5 i8 T8 H
- <em class="xg1">($attach[attachsize])</em>+ O+ n: _0 J2 ^8 @; [; z
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})4 k$ S6 O$ K" h, V- l
- </em>1 h% c7 @; p& y" q5 I
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->& o1 y2 M: T. T+ {) ]7 G
- </div>
复制代码 GBK格式需要转码
7 z& f( {, }% _' y2 A% d: R! x$ a然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可5 f" @! w" h0 I. H# g0 l
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
- p$ X G, R' O提取码:8wg1
6 s% D3 q$ ^, K# x" V复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
5 ?( v) L4 K5 v6 W/ r _
|
|