手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
2 E9 P J; ?( ^7 [, ]' M这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。+ j: c- k! o; F6 y' n, M
; x0 |, O2 a0 {4 c" `+ \/ c1 n修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):% y7 U# ?. w8 f6 p3 B/ |) W
打开:/upload/source/language/lang_message.php
+ c; f+ M6 B3 ~5 D1 [找到
1 b! {+ _. o0 v }# |9 ?% \! w- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
. S T0 _8 V- w9 s+ ~- 'attachment_mobile_buy' => '附件购买成功',
复制代码
" {' }) ]4 A4 ]' Q4 A- o* ^( i+ W4 n 打开:/upload/source/module/forum/forum_misc.php, l% T( w1 J% I/ S* 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>
复制代码改为: ' ?4 |6 w9 y8 q% ?' ?+ f t
- if(defined('IN_MOBILE')) {
X+ d% _+ |3 I @0 l, h - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);7 G* k4 P! Z; }$ S* E4 Z
- }else{' [2 @. Z' Z2 ?$ P$ V) K* A0 \
- if(count($aids) > 1) {
% u( l; J6 ]# Y5 g/ M - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);! a. x, b B( F7 m0 Z! |
- } else {: c0 H* b+ u7 W/ Y4 G& B5 e1 c
- $_G['forum_attach_filename'] = $attach['filename'];
+ y. z( ]. }% m; o" g" d) N7 T+ s9 {! Z - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));. ^4 a8 q+ D9 |3 O
- }- Y+ A3 J, Q& G7 m
- }1 Y p) l$ I q; e2 m9 v' |
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
, d5 L$ _' ?# h% c2 G& z: Y$ a" G, m6 f! P找到
" r/ G4 n3 `/ ^0 m9 k* n# K$ ~, K5 z. z1 _/ x
- <!--{if !$attach['price'] || $attach['payed']}-->
) S' Z: H- S+ a8 c- z2 I - <div id="attach_$attach[aid]" class="box attach mbn" >) e1 P: S, C! Q! G
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
9 o3 U5 O K; `$ } - $attach[attachicon]+ T9 k9 |0 p4 K+ Y, \- h
- <!--{/if}-->- c% @& c. t( R, X, z! e D R% E
- <!--{if !$attach['price'] || $attach['payed']}-->1 X9 _6 e4 _2 P$ X7 P6 g
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
4 x# Y+ A0 v3 }; K2 i9 G - <!--{else}-->
$ P+ h. Q# ]: f - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
9 I5 _& _3 |. M0 m - <!--{/if}-->
% b( f" K6 E; N0 K6 C - <em class="xg1">($attach[attachsize])</em>
1 c4 r8 r4 a$ ]$ A( U - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
. s8 J' r) x$ r/ w. T5 i- \ - </em>8 Y1 M" m9 x5 ?8 \3 q! i" G6 {
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
; I" h- d* [ [/ \2 ]" U - </div>
% ?7 z- E* [3 T# D |0 b. V( c. z - <!--{/if}-->
复制代码 改为:
* U% H7 \& `# r
7 ]) p3 [" G. S5 z y( T* r- I- <div id="attach_$attach[aid]" class="box attach mbn" >6 l) E- o2 A, ~
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
- E( W y3 M) t - $attach[attachicon]2 q% p0 z5 W& E. Z, s8 J1 B
- <!--{/if}-->0 s! ?+ w" H+ h+ \
- <!--{if !$attach['price'] || $attach['payed']}--># P1 x: g8 j6 K0 w7 t. { g7 t/ v* V3 [
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
8 l+ O& [* k' j2 [6 c: m - <!--{else}-->( L2 m" Y. [: m; U9 w W5 ?
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a> C7 Q7 E4 G; X# |( v4 N
- <!--{/if}-->2 m! e( h. s: k1 [
- <em class="xg1">($attach[attachsize])</em>
6 k0 O1 p7 O. @ - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
" H% D; b9 w. `) t6 Y) G5 N - </em>
, {( I+ m. J" l& x5 t2 X' h - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->, C) J& f4 ]+ Y6 D- ]
- </div>
复制代码 GBK格式需要转码
0 w3 Q0 t/ q: I- M然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
. F8 K, \% ]8 i; V- E8 Z3 e4 d[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA ' b: Y7 F1 v) A$ J. E% [
提取码:8wg1 6 R5 z/ y7 k- A
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 / J2 ^; q h, w& Z4 M: R
|
|