手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
7 E# |$ O8 w+ b0 f3 ~1 ^这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。7 ]2 t2 ~- X* Z. z7 h" v
, i( `2 m* G; J% ~0 @修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
& [+ g6 q) s6 q" C/ x2 V" ~打开:/upload/source/language/lang_message.php# f$ d9 K: b7 |1 {
找到
9 a3 z% d. ~4 P+ n) p- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
9 o6 A* [( ~( G2 a* d/ c- 'attachment_mobile_buy' => '附件购买成功',
复制代码
/ ?, a, R. \! ?; r: V 打开:/upload/source/module/forum/forum_misc.php
% P' r7 S8 t) k 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>
复制代码改为:
0 C/ ] h1 L( |, O% u- `# i- if(defined('IN_MOBILE')) {
9 J3 N& A6 T" G2 v4 w3 c - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
8 Z, O9 L. ]( @' G5 z - }else{: `3 y" Q. D4 b [0 L
- if(count($aids) > 1) {
. J5 ^' [/ ^# e) E% ` - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);2 f0 `9 j$ L/ t0 X1 Q- R
- } else {4 {2 w, b1 `5 A* k; Q
- $_G['forum_attach_filename'] = $attach['filename'];# F% q! v& a) P: |
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
& C" ~$ o/ k- `1 c1 O: L: D6 M$ U - }% |: ?; m! z, z: P6 r
- }
* c; h( |* x. h
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
5 S1 s' _ h4 V8 m: Y$ a" G, m6 f! P找到! S2 T8 M) W, [. E4 m, d( T
6 I$ h1 t4 H+ v; D* q- <!--{if !$attach['price'] || $attach['payed']}-->
( v+ k9 |- m- `$ E X - <div id="attach_$attach[aid]" class="box attach mbn" >2 @" A" E( M9 h! f% P6 B0 m
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->/ F- H# f: e3 ?% F1 O) n R
- $attach[attachicon]3 a! E5 k1 x( s9 K6 y, m* ?
- <!--{/if}-->
. T% u: U* |" m. y/ R! r# B0 S - <!--{if !$attach['price'] || $attach['payed']}-->% N. h8 I+ m0 a3 ?! b& ` U
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>: @! @3 ]# v7 s8 k$ J9 E
- <!--{else}-->
1 {1 G$ s6 S& t8 N `3 p8 [4 X - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>8 f& U7 ?5 @( ^6 t2 o5 ^$ T
- <!--{/if}-->. Q8 f3 B9 d& F* Q& j
- <em class="xg1">($attach[attachsize])</em>6 m+ D' `: K1 e$ ~
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}): z, V* G' |! h, o, s
- </em>
* L, R) ]1 l6 _5 _ - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->. ~1 x* {, H( p3 u' w
- </div>3 l9 P; F: @. l
- <!--{/if}-->
复制代码 改为:
9 I& q# }$ V6 p; w4 B' n( h
* \7 k' m; x, A7 \# Z/ A$ }. f- <div id="attach_$attach[aid]" class="box attach mbn" >6 w. e& m" o" P
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
8 J; r2 Y( u0 |( S - $attach[attachicon]
- O: B5 E0 _7 u3 u - <!--{/if}-->( t& f8 F. t9 a# E% b
- <!--{if !$attach['price'] || $attach['payed']}-->! l! b8 @% O# ^2 v
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>' a0 E$ C5 @$ M0 m
- <!--{else}-->% @# D/ q4 \" f% f' y
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
8 ]3 F: i7 W; m; k& E( }6 e% z - <!--{/if}-->
5 `; m2 ^1 ^; q - <em class="xg1">($attach[attachsize])</em>
F& L3 R: C- R9 [ - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})8 V2 y, E7 [* s A" y& D
- </em>+ O2 B, l0 T0 n) W
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->" L' {+ k) y9 Y) I8 Q. G3 V
- </div>
复制代码 GBK格式需要转码% S0 n+ y( ^ B9 X5 B8 H' m' R
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
6 b# \, h0 b q2 c: R( C[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA % @. s) S( {& V- l* \
提取码:8wg1 ( x8 h) E* ], w3 ?- [7 e8 F5 l: O
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
% N; V; B, N n# h8 ~ Y4 s
|
|