手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
6 A6 F7 \/ v/ w* D+ \ 这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。 4 B& I$ Y! y$ ]) X9 x" M
) Z- U8 A+ R) U& C( Z 修复起来倒是不很复杂,过程如下( 如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可 ): C! Y+ Q* y9 c i/ a" L" L
打开:/upload/source/language/lang_message.php T' f9 l" l1 e: m4 C* v: K$ y
找到 2 a9 i0 r% d1 J; u
'attachment_buyall' => '本帖所有附件购买成功 ', 复制代码 改为: ' `/ \. Q* V6 v7 p3 ^6 a
'attachment_mobile_buy' => '附件购买成功', 复制代码 * ~# a3 {" x: y* f6 z$ o
打开:/upload/source/module/forum/forum_misc.php
+ g5 W$ @, C9 Y- |8 Q 找到
<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> 复制代码 改为:
3 C3 `) d! o, V if(defined('IN_MOBILE')) {0 v, V' j# B' Z% L- m3 e$ }! w
showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);3 t1 W/ P9 W& R! N& N' X
}else{6 j6 ~0 l, J2 l7 B7 f7 \
if(count($aids) > 1) {
! Y. ^* s: d( @: \ showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
5 y9 _$ D; W( L, g/ ] } else {
8 k" W: {6 F: [1 b% J/ W/ I5 a $_G['forum_attach_filename'] = $attach['filename'];
: w4 z/ c- C5 ~ B: d* U showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));5 A( J. I w6 q6 M0 k
}/ S3 X5 _. t/ D5 I+ O7 F; h' N4 [) u% B
}* n: }0 N+ q+ V- C' D
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
1 M: n1 D2 ~ t& F! b# S# p : Y$ a" G, m6 f! P找到1 o |+ U4 @2 A; J! p+ K# U8 r0 n
2 o4 h( n. n( _& N" z
<!--{if !$attach['price'] || $attach['payed']}-->
7 R+ Y& p n9 V. N <div id="attach_$attach[aid]" class="box attach mbn" >
" m5 z4 |$ { ~7 l: L <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->! a5 b/ Y2 g4 j7 n1 p
$attach[attachicon]3 ^8 ], S, G7 _7 b! D; R X
<!--{/if}-->
$ o( p }/ C$ g/ g <!--{if !$attach['price'] || $attach['payed']}-->* q' r2 P. }0 g! |/ \* b2 `
<a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
0 l, m6 j T) [: L _( d+ \ <!--{else}-->' W( a2 L! U. D* k
<a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
( {! h: Y% [8 a [9 B! i <!--{/if}-->
( l g: M5 S& g8 I l <em class="xg1">($attach[attachsize])</em>
) `( H* G& a t p <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}). g7 ?% E! I) e; l2 P
</em>
1 m7 \' | g: m% c6 B/ M <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->2 q$ F+ X& G8 Z. L8 g
</div>4 J) e& c- L9 a6 U( g$ O, Q
<!--{/if}--> 复制代码 改为:
8 D/ r- Q; [- T- S: A
8 R! y0 {- t. W <div id="attach_$attach[aid]" class="box attach mbn" >
. D4 V- V% B/ [/ } <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->9 D3 j/ V5 V; g' V
$attach[attachicon]! D6 \! Q/ U5 z
<!--{/if}-->
( E! P4 L; ?9 c <!--{if !$attach['price'] || $attach['payed']}-->6 j5 |. O# A1 [6 j6 B& \' ]
<a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
0 h- q$ E: w- I9 R' D2 t2 ] <!--{else}-->- Y* Z7 b+ I$ Y$ J# q' L2 ]* Z
<a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
4 D# z% C; J# s* B% m <!--{/if}-->
1 ?( Q7 R" B6 f/ H; y <em class="xg1">($attach[attachsize])</em>" t2 `: n. _1 u/ D
<em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
- v7 u6 P1 Y$ y- K3 _5 ~ </em>
( Z* m2 d# a8 T. ]8 ?: I <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->% u+ Z3 }, q# }' l. w9 L
</div> 复制代码 GBK格式需要转码 2 W8 W! Z8 i' C5 o! K$ ^# c
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
; n/ c8 F* r! G9 t: h2 n m [sell=1]链接:
https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
( z" \/ c. H9 j0 r9 O/ E# I 提取码:8wg1
& W0 C7 D" b% [2 u& t' q 复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
直接复制到网站根目录即可
7 Z2 X2 G) s- g3 x