手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
; X' S( K- u r2 \' m" e这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。0 q8 P' w* m' C2 V
' k7 [6 J7 V9 @" n- R" h
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
3 v+ a% H4 l) x" d. G. _: U+ U打开:/upload/source/language/lang_message.php* K4 E4 W8 X; {) W' W
找到" }, O: k+ t' ?" n' F
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:, k5 v1 [% ?) M6 H5 D5 m
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 : T& [# ?9 R: m$ i0 F$ G
打开:/upload/source/module/forum/forum_misc.php+ ?; d6 P( q2 X/ g. b5 @1 W+ ]
找到 - <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>
复制代码改为: 1 q) M" a& T F1 M" ^ y, h$ O
- if(defined('IN_MOBILE')) {
3 E; N6 b" I. t4 x# Q2 M' c/ D& { - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);/ a( j0 ], u! H$ y9 p, s+ I
- }else{, F4 ~. p( ^ W: b& e) [% T6 Q' O
- if(count($aids) > 1) {; p1 {6 X0 Q% ^% n. s! l# [
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);: y4 V: Y h! b' Z8 B! F) d
- } else {
, ]9 E d# R* a: [6 T) o - $_G['forum_attach_filename'] = $attach['filename']; k& X3 w2 Q3 @4 O% }2 ^
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
- h# \* p$ \5 j) s" Z5 q3 J$ v; D - }
! A! q3 w* t9 q$ ~ - }. p% R- q; J- u0 H+ @" j4 c* o
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
& k5 J8 m7 y+ l( s2 y- Q' ]# E: Y$ a" G, m6 f! P找到
# E4 I, |3 ^- I5 A% k/ p
3 H7 x H' K: P+ {- <!--{if !$attach['price'] || $attach['payed']}-->
( e3 Y( n, B! q - <div id="attach_$attach[aid]" class="box attach mbn" >
0 b6 @! t) s+ L9 Z, J - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
$ M; ]* w7 M8 d4 P d% D3 e. V - $attach[attachicon]! T# D o7 h! l# K5 E- h; l
- <!--{/if}-->5 _2 c& z3 |. d4 V% k" }/ k
- <!--{if !$attach['price'] || $attach['payed']}-->1 W4 g: A3 n" T: g) R, A
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>/ G8 r- M" L8 ^" A, O' t5 a
- <!--{else}-->7 t4 A, [' R+ I" K- V4 U- O. E
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>, {$ c% g1 W9 O, y: K: }
- <!--{/if}-->
& b6 h t8 G+ v! N6 F; I! U - <em class="xg1">($attach[attachsize])</em>
! v: c# ~% y6 y* K, I - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
, q5 q- }& @' S! f - </em>
! X0 E1 U2 @( h" Z" i' N2 v! \ - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}--> h1 e9 b/ N' D: A" t: l. I. q
- </div>' X T% _: r3 Q/ ], g0 H0 w' w* ~
- <!--{/if}-->
复制代码 改为:% J9 @) ^3 Z) J) k0 k- i9 T7 P
# b) p$ Z6 z1 Q g, p" ~. I9 a
- <div id="attach_$attach[aid]" class="box attach mbn" >
5 G" e& S5 ]" h0 t - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->3 s; E% y/ Q6 y
- $attach[attachicon]
/ B ~+ X5 H( P f' Q0 ?1 b - <!--{/if}-->
! P3 E1 J# d) z2 @! Q - <!--{if !$attach['price'] || $attach['payed']}-->5 Q9 ]" p' l* c9 n+ x" V* j
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>( |4 ] I3 ^/ \. J8 b- I7 F
- <!--{else}--> G9 ^1 e7 f/ Z y- K8 k$ c
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
# K& n7 J; H+ G; P8 b - <!--{/if}-->8 g) R, Z5 E( @7 X8 t
- <em class="xg1">($attach[attachsize])</em>) U% _2 c$ o. B. J9 c
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}): m, ~! y& ^, R1 K! k
- </em>
& |5 x: x. K1 W; u8 B - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->! r8 n; i7 u, Z/ G# m# p9 `
- </div>
复制代码 GBK格式需要转码# \( k8 j% y |$ w3 H9 \' ?
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
2 h5 \- I3 v. j W[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA / e/ Q1 {1 ]4 a; T% g5 V
提取码:8wg1 . C4 d1 @% H7 V& s6 {
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 K4 t! n4 ]/ a4 y. z
|
|