手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 2 C! F# B4 X4 U/ ?% d; f
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。/ \7 K* G1 |: b# B" f/ h# @
2 M8 G4 a) e! p# a
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
. w; W# l+ ]. b! Y y+ v7 `; @! I! a打开:/upload/source/language/lang_message.php
& S1 V( q, n/ @找到
- c) Z1 k; J4 w6 B9 K, e- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
2 K- r, E/ U- l2 |7 d* t- 'attachment_mobile_buy' => '附件购买成功',
复制代码 4 k6 Q' n1 d. C. i" i5 s
打开:/upload/source/module/forum/forum_misc.php
/ J+ O. n) Z9 V! d找到 - <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 ^ t5 \- T! t2 C. A+ n8 L7 q
- if(defined('IN_MOBILE')) {
: r2 S3 w% i0 W. C, i/ |! \6 y - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);+ L9 G x4 L; q, C* D
- }else{, V5 x+ u) x B N5 r
- if(count($aids) > 1) {
# n5 [0 \2 F0 _& J( y; x - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
. p: K# n* y5 S - } else {# |: T, h3 J' p
- $_G['forum_attach_filename'] = $attach['filename'];1 z6 d/ @! Q0 J( \+ Y* Q
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
% ]6 U; c+ r/ V# d3 Y( E) R - }0 r+ v0 ~' W: {# Q
- }# [3 V9 W2 m4 t' s. s: H( K
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm o/ H- M3 Y V! c0 M
: Y$ a" G, m6 f! P找到
. n! |6 }8 O3 v1 r C) E' e4 t F& t" n/ Y/ _
- <!--{if !$attach['price'] || $attach['payed']}-->
4 h) a$ L+ k9 _2 O R - <div id="attach_$attach[aid]" class="box attach mbn" >
& g& ]; ~8 I1 ` B9 d - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
0 A3 n# X: y5 v: w: r7 A. w3 i) }" ~& R - $attach[attachicon]
* C Y V9 J* Q' l" r2 @+ N - <!--{/if}-->
' ?' U( H l- K" ?% w# Y - <!--{if !$attach['price'] || $attach['payed']}-->
7 R% T' ~, J6 e* m9 ^4 V" b - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>: a$ e4 |# z( M2 I f! N; F
- <!--{else}-->
/ F; D) ~- m2 N - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
& \1 _5 I; u$ i" Y3 N - <!--{/if}-->
~) G6 c2 d7 ? - <em class="xg1">($attach[attachsize])</em>
) w$ P! z6 N3 @+ c! J" L4 b: F8 B - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})2 F% S# w; Z2 Z% B
- </em>! G' h6 B \. U2 S" O% G
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
% m7 z8 t) K- ^! O+ X9 F9 x2 V9 G - </div>
9 a: V, z8 s/ r0 h- f+ r; d. Q - <!--{/if}-->
复制代码 改为:
9 M/ X7 A& @; X. F' N- m/ [" @3 n7 D; [; _2 M
- <div id="attach_$attach[aid]" class="box attach mbn" >2 ], X8 t2 L% _4 O9 T6 Q
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
: _2 L8 ~1 w- j9 ~ - $attach[attachicon]
3 f, X9 g5 m k - <!--{/if}-->& U* c# G/ k }
- <!--{if !$attach['price'] || $attach['payed']}-->4 m K/ S! `3 t
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>$ s" R! Q/ w9 V9 H6 e1 O
- <!--{else}-->! @2 m9 c. j5 {3 q
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
& b8 z0 g. s9 `7 I8 P$ h - <!--{/if}-->! X: |4 n& L: C" c& j3 g5 M' [+ R
- <em class="xg1">($attach[attachsize])</em>0 N7 B$ _. D1 [' u
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})" h! H/ W6 b/ X9 N
- </em>
9 |) L0 H& S8 ^* e' p - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->. q: z) `. l. l) u
- </div>
复制代码 GBK格式需要转码2 |* ~1 H% ~4 Y7 W6 ]; i
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可3 k& s( \3 [0 j4 I2 u" ?- [
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
' ^# ^2 M: b8 _/ A" Z8 }' Q提取码:8wg1 ( \; K. T! L; p; k8 ?
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
1 R' p* m5 k7 m7 u
|
|