手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 # V' Z( y/ O: A6 W, k% ~* t
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
+ `. O# t: u, \; n6 ?+ Q
$ {3 |. m4 Q1 {, }4 }; u6 c修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):- }$ [+ o& T. z% P/ g# k. n
打开:/upload/source/language/lang_message.php
2 f( Y* Q) }$ k* n找到1 @# d- F. r N$ D: G# ?! r. G
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:& P) N) B+ u7 v- v
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 X$ K$ x2 n5 `' O
打开:/upload/source/module/forum/forum_misc.php
- }" d; e8 Y$ x3 W \找到 - <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 s- C( K; X! z! y8 J+ f e3 a
- if(defined('IN_MOBILE')) {/ V; K8 r+ Y3 e
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
4 g& u3 I" g3 Z" Q, y - }else{
" P! \3 H: C, W9 s1 Z - if(count($aids) > 1) {' p$ q1 v, l2 p6 Q
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);. `# ^) i0 `- d: Z* |
- } else {
0 ?) l/ ~, X# ^% t8 v - $_G['forum_attach_filename'] = $attach['filename'];
% U; u7 ^0 f0 h; U! y$ ]) T1 Q2 H - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));& z9 k: t8 C/ B9 J) s8 P
- }
/ M- Z3 } f" q6 g/ G - }
1 R1 L' t" v4 b
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm" Z' z& k' J! }7 F5 Q4 E4 f8 h
: Y$ a" G, m6 f! P找到
1 k& n$ O/ n6 c3 E+ a# t5 d6 f |" g) ~
- <!--{if !$attach['price'] || $attach['payed']}-->
, ?# O n& P* D7 m - <div id="attach_$attach[aid]" class="box attach mbn" >
8 K. Z1 s$ c% `9 T( p& G - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
% U7 X; q/ Y5 ^/ m H - $attach[attachicon]7 c% G" g1 F4 c" ~7 v$ w( q
- <!--{/if}-->
5 a [) @$ L4 \4 ~ [7 ^, f2 L9 W - <!--{if !$attach['price'] || $attach['payed']}-->6 }/ i; U2 w2 \; e8 N
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>- _ n6 A' i% m
- <!--{else}-->8 I8 `+ s4 ]6 h8 N: L) T
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
( V* H% u: V; ]; F - <!--{/if}-->
( T1 e% v5 p9 N+ v9 U - <em class="xg1">($attach[attachsize])</em>) l5 i0 }" ~/ |: [2 l
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
: L4 E) B5 W: z3 w7 j - </em>( d+ P) _7 ]8 h; ?4 O
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->8 ^2 C8 S6 M) R5 W' ` _' P, t* @
- </div>8 F6 a" W" A8 k; e% J9 U
- <!--{/if}-->
复制代码 改为:6 l i2 w5 \4 V+ B. M9 H
; f! h5 @+ W8 n% U/ V! n
- <div id="attach_$attach[aid]" class="box attach mbn" >% t; u" ?) x b! Y
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->) q9 I2 R! k9 @$ ?
- $attach[attachicon]
% q b! V X4 u* r9 t# `% _ - <!--{/if}-->
4 y+ S0 R* R5 O2 U7 z - <!--{if !$attach['price'] || $attach['payed']}-->
4 O. \, \2 K% R - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>: X0 s" y( G& d' h" ]
- <!--{else}-->
7 ^; `, X9 m% m; N& {8 C& H4 C) ? - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>5 v& |& x' j9 J
- <!--{/if}-->
. P# j3 v2 ?# S# m/ k$ Q" a0 W - <em class="xg1">($attach[attachsize])</em>
z2 S3 Z- e, {. K. m) c - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}) t3 e3 K) P$ l0 ?
- </em>
& P S U5 O7 s) G# p - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->9 w9 ]3 ^& s( N' C% l, @) Q
- </div>
复制代码 GBK格式需要转码
0 t- i% l' d$ R. ~! O0 |然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可) M6 e3 ]: W9 ^, L9 J
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA $ R7 b9 @( P% w5 U R- ^
提取码:8wg1 1 z7 a1 C1 v, Y3 j$ d" [: R/ e+ @
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 + | |( U4 M; @. O) q, O
|
|