手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
1 o+ B7 t; }3 E3 q( F1 G5 V+ h+ x这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
- x3 e$ H; O L8 R! {4 C- C
$ {% t. U- j( y修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):: w4 e" K5 S |5 i+ n
打开:/upload/source/language/lang_message.php/ F( a0 b( W2 i" @+ m8 J3 h
找到8 L8 A( F2 P: v8 y, A% X5 }6 T
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:- E" ~ H7 z3 g/ d$ ? J
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 2 _& a% s# v$ s; }0 X- Q
打开:/upload/source/module/forum/forum_misc.php5 L7 w5 L+ V+ H; U& v
找到 - <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>
复制代码改为: : M$ a$ Z6 I/ x0 \4 t* G- I7 o
- if(defined('IN_MOBILE')) {+ E9 Q$ L8 u6 G7 I7 S
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
" X! ], \( s _2 r% e! y - }else{3 Q5 V8 W& Z4 p$ ?; J/ p
- if(count($aids) > 1) {9 N0 N9 O( P1 D: D
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);3 w! l; z, _# p8 ?/ m
- } else {
* J/ i+ O. x) U - $_G['forum_attach_filename'] = $attach['filename'];
9 L$ L' F1 ^2 |7 c) N - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
4 p, H7 F8 v y" `0 W- M - }
' J0 L5 O! h" c - }5 k( N0 ~7 l' N! P4 y$ W
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
4 }5 @+ }+ Q# V+ T! ~& ]: Y$ a" G, m6 f! P找到
/ Z. I4 z/ g0 D0 ]
! e" m* J% Y2 p4 M- <!--{if !$attach['price'] || $attach['payed']}-->
! W9 h/ A2 h7 K - <div id="attach_$attach[aid]" class="box attach mbn" >, k: J/ L2 ~% X! u" y D' L/ k
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->' `, K7 ^7 p; A3 Z, m9 Y( a; j
- $attach[attachicon]
8 B- f8 _/ F" \$ S" r' S/ ]3 G - <!--{/if}-->
; Y+ [, y" W, Q8 j' P/ \: Y - <!--{if !$attach['price'] || $attach['payed']}-->
( P& _$ j( I0 d3 ~$ [ E. e$ l - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>9 C# t, i% p& e4 E, {& F8 e6 u
- <!--{else}-->) O o' K- j- _8 D$ M
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>, \& [, o6 r. z1 d7 T/ S5 {+ C
- <!--{/if}-->1 b* {+ C2 R8 O2 }7 g
- <em class="xg1">($attach[attachsize])</em>. ^ k5 K+ o+ A
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})& T1 ^, E f0 E* \0 G
- </em>
: Y2 @+ ~& q) B/ n - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->& v# c5 A: N; x, _& z1 W+ y
- </div>
, e( S" @; ?8 Z) X" |! D - <!--{/if}-->
复制代码 改为:
5 b/ z0 j, E: l" N" w: T% ?6 U; l4 P4 A* Y( L7 w6 d1 Z' Q
- <div id="attach_$attach[aid]" class="box attach mbn" >4 ?* l, G* ~- L8 a# O# K/ }
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->0 q8 x% g( [, c1 l
- $attach[attachicon]
2 j$ @7 M- w% h+ ^' n! g5 _* V - <!--{/if}-->
8 z+ F- y9 A; w! V$ S9 l R1 ] - <!--{if !$attach['price'] || $attach['payed']}-->) F* U, p5 |) S) Q, Q" Y
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>- O1 Q4 b, E: Z5 y0 c
- <!--{else}-->
1 s% R3 O. ~! g2 T! T6 w- U: Y' z - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>% V* b3 y) n: m7 j- ~6 e
- <!--{/if}-->
) q0 v% h/ g2 P5 E - <em class="xg1">($attach[attachsize])</em>& z y2 ~8 s! R& W' {+ p- }2 N! K
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
6 E9 j7 x5 @. I1 o+ Q3 g - </em>
7 b; Z( ]8 g+ l. ]6 v \* h, e4 | - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->* D, Y, e% K7 V0 ^& o) z: \
- </div>
复制代码 GBK格式需要转码
, S( ~ ?, x7 z9 z; P: K然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可/ f1 }: s+ a# H0 S2 z3 X
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
2 ^6 {+ b1 s; B1 Q提取码:8wg1 # O* e0 ?! \% c9 _" P& |; `' ]# O8 x
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 ) H$ `' S4 d2 }+ ?8 g# T& l; S
|
|