手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
- W8 U- ? m) T5 P* b2 E这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。3 j; L2 I! r) x
( L, X7 C, R" |) b( g# v* h! l修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
1 G1 J7 j. c$ R% A1 {+ S" l; D5 _. o打开:/upload/source/language/lang_message.php
5 R# e4 j: d$ R9 Y找到 }9 C2 e- N1 \) g
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:6 e; R% L0 X* Z5 i0 S1 `/ B
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 - P6 I' v( t$ U
打开:/upload/source/module/forum/forum_misc.php
2 l2 d- e8 c8 |* K找到 - <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 c' M4 ]/ f, n- if(defined('IN_MOBILE')) {5 E7 W6 i; z1 H
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
* x- l; K2 `" e& ^6 } - }else{
( F7 A/ H. B# k, L - if(count($aids) > 1) {, f% ]- i* | @- v- `: _
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);. w8 v8 |0 c; m
- } else {5 d) y* @0 {& g/ G/ R' }8 _7 M G
- $_G['forum_attach_filename'] = $attach['filename'];3 {0 i% Y0 R, `4 q6 v
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
3 e# ^) e. w+ } - }4 p2 ^$ v& F7 m3 j: u6 D
- }8 m+ b" Q. A! J& A
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
4 F @8 @6 {. `$ v( m( v: Y$ a" G, m6 f! P找到+ b1 s# V/ v6 y1 X) F
6 f+ Z1 `# {! |- <!--{if !$attach['price'] || $attach['payed']}-->( A7 ~6 v8 c" S! G
- <div id="attach_$attach[aid]" class="box attach mbn" >/ L7 Q" A1 p9 ]
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->& n3 Q" i# K' T1 _' T: g
- $attach[attachicon]
@/ Q7 P, S2 S& T& c - <!--{/if}-->
! L7 I8 H: I' x9 R k - <!--{if !$attach['price'] || $attach['payed']}-->$ { D% ?& `) I7 s. n$ b4 @) f: y
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>' u& j- P* h- q: d
- <!--{else}-->
/ _" N4 v( D5 p- ]2 A h! E+ d - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>+ K* q; G( W! e! m& {5 u
- <!--{/if}-->! P& X5 T- D# [
- <em class="xg1">($attach[attachsize])</em>0 \/ z7 i) L9 h1 b# J
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})" n4 A1 x: O' c- {1 w6 g
- </em>5 ~: U3 `& S- x# g/ w- H
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->* B, J( |+ q( j. x! b
- </div>( C( ~+ K) f/ _' o
- <!--{/if}-->
复制代码 改为:; B0 F, ?6 t' V, V( I' ^6 y
, p8 z8 a3 C$ u$ Y+ P; J% u) `- <div id="attach_$attach[aid]" class="box attach mbn" >
+ c+ B1 c- _& V" Q) Y - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
* i7 K8 m' u3 p( z: [7 L - $attach[attachicon]% Q: o* m( T( `- q( h4 C
- <!--{/if}-->
3 v. T# P5 B' n% t" d9 G - <!--{if !$attach['price'] || $attach['payed']}-->; b$ r) A n: w4 @! x
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>" o0 _* }: X4 g" G, x5 f5 w
- <!--{else}-->
7 U4 c, F! d5 u - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>. O4 `' b! D3 g' h, s5 I' m& _5 A
- <!--{/if}-->5 k7 ~/ @! H( }3 m/ L9 I2 X
- <em class="xg1">($attach[attachsize])</em>9 x/ ^- x: }6 f& @$ u
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
4 h5 v- c U7 b - </em>
/ @2 g1 u: Q W" d& g, S. ? - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
' |4 m$ V% T! n; i- c5 R - </div>
复制代码 GBK格式需要转码. z! w- H' x' Z1 H3 m L
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可+ U+ i# A2 Z, y0 i* Z
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA 6 Z1 A" N5 _% C; Z8 V0 ?
提取码:8wg1
' H( D) H8 b! S复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
0 Q; C& I/ J& @ T4 }, y7 }
|
|