 | |  |
 | 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 8 S. U& b5 H0 W7 t- J" A: i/ S
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。/ W+ J" @; b; d, ~1 [" r
4 H- {+ S1 N7 c2 S v修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
9 v* g8 T) q" c打开:/upload/source/language/lang_message.php$ j }/ u1 b: q% Q- Y" e1 ?, g
找到- K$ ~. J1 d+ {& l* @% J' P4 l
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:6 o% w/ b. Q/ e- C) V3 c
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 : L3 X( ]4 M% N2 ^+ D: L/ s7 ]
打开:/upload/source/module/forum/forum_misc.php
3 y' |6 d) a6 f* Y9 f" z找到 - <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>
复制代码改为:
# [# b5 s6 o* f4 X, I* @) a- if(defined('IN_MOBILE')) {" k! ~& j" n7 l1 C, n5 E
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
3 h. O3 A; N; @3 y( G - }else{
0 L8 C0 Q' K! i - if(count($aids) > 1) {; Y9 e9 O5 ~) ^. N) q1 X/ j
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
/ J* S3 u8 |5 I8 x# u, p0 {; q - } else {
' D$ x; r. q. ?8 Y - $_G['forum_attach_filename'] = $attach['filename'];
8 W: `/ Z& E" T2 _. l- w8 R) z: |$ ~ - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
& k4 ^$ E% H7 j1 L1 g, w - }# I: l0 F, X P; P* c) q5 R: b
- }1 i; O+ t r1 p+ {- a
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm( j6 ~/ i# t6 H; Z+ t2 V7 \
: Y$ a" G, m6 f! P找到5 f9 j# p) e8 K+ N9 l! q3 h
; B" g2 A: X, r0 S3 D& \- <!--{if !$attach['price'] || $attach['payed']}-->6 \- Z# h% d2 s0 g9 ?
- <div id="attach_$attach[aid]" class="box attach mbn" >6 i: J$ e# q- L+ Y' s2 G: h
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->2 n' e4 o2 p( _
- $attach[attachicon]! _* z9 b1 q# F. w" k
- <!--{/if}-->$ e$ o }8 ?7 S7 R" m1 @
- <!--{if !$attach['price'] || $attach['payed']}-->
' E+ F. z0 `4 Z% j* J L - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>% n) r* A* Y9 G+ D
- <!--{else}-->
, f# g1 [- T; L6 H# `( m - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
- V& [" ?/ q- k3 ]$ A; F! j - <!--{/if}-->
( w. Q: I" f' Z$ j! z, w - <em class="xg1">($attach[attachsize])</em>
, j6 f c: m9 ]4 r - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
( b. j' q, u, r, J( r4 g - </em>9 u* i' j( J% i8 a$ s
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
: w9 z, I% L* z% j$ ^% G' v# a - </div>
9 ]2 v+ e# l- k# v6 x( m7 h' ^. ? - <!--{/if}-->
复制代码 改为:! p! L' `5 O" o% c. @
0 h5 f2 b* A" t' T8 m( ^6 E# O
- <div id="attach_$attach[aid]" class="box attach mbn" >, j) i5 e) M ]
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}--> v J8 y, ?1 J
- $attach[attachicon]
- f6 U" H. ^4 `7 V: }5 I - <!--{/if}-->
( ~# L" Y, S: p - <!--{if !$attach['price'] || $attach['payed']}-->
3 n4 J3 w. [$ M; _2 ~ - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
& t+ D4 J. N# G& ^ - <!--{else}-->
4 ?6 X7 T( M+ H: t8 L' [ - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
, {" L B) [, R - <!--{/if}-->+ R3 Z. I5 D0 J6 E8 ^, Z+ \
- <em class="xg1">($attach[attachsize])</em> Y c& N+ ], i
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})& e( S' z9 A* J; J; V* L
- </em>: x @; r! e2 ~' B& W, W
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
6 M6 R2 C4 m. K2 |$ i! x - </div>
复制代码 GBK格式需要转码, w. U5 `& a5 u3 H- j9 B
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
; c* H& s" g, T+ t }8 G p7 }[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA " X2 T! c1 [: ~3 f
提取码:8wg1
* w# a. i( x4 R9 M/ K) Y复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 8 h; n# f& ]4 f2 J3 A
| |
 | |  |