 | |  |
 | 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 3 k2 C9 c9 t& [: x3 V' e* O
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
$ x. @) Z8 M5 E. O% O+ U2 O' l" s7 L+ t7 x
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):& j/ D% @/ M) b9 Q
打开:/upload/source/language/lang_message.php/ Q5 ^- A* @. @: S/ @& h: ]1 ]9 ?
找到
) |( r) L7 ~9 C: U2 n7 p6 u4 j- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:: B1 q5 X: `# ^, c1 V
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 7 @2 Z1 ^3 J9 w! u6 O( [& V( q
打开:/upload/source/module/forum/forum_misc.php
. x$ @/ f8 }# P找到 - <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 t, y3 M. ]/ d1 ^ p0 i- if(defined('IN_MOBILE')) {* _5 K7 ?! P9 M0 ?" S% I9 K
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
; J$ Z* p; k+ d& M9 c - }else{
$ w: H1 T) Y' A5 y) G6 p8 @1 X D - if(count($aids) > 1) {
2 h0 z! [3 F) `; I, i; s - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);: a2 v0 k' q4 O1 O
- } else {
6 ^0 t1 E2 ~ G4 p9 W - $_G['forum_attach_filename'] = $attach['filename'];
- b# N# u* H( e& g* `% h - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
" k8 K. O6 O$ _3 L$ y% W - }
' g5 }7 {3 e5 u+ m4 g* ^+ R% x' | - }
" j; @1 b+ B3 X7 E' p2 E+ L
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm9 \& b5 I, ?% ^. Y4 z: j/ X/ l
: Y$ a" G, m6 f! P找到- F) L" G& u# I H
, e/ N3 x/ h" o; x- _. D
- <!--{if !$attach['price'] || $attach['payed']}-->' b+ l: |* Q v( \" O
- <div id="attach_$attach[aid]" class="box attach mbn" >
$ X& Q' J3 |/ |4 E - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->: ?, s# g8 t! Q3 D
- $attach[attachicon]* B- I. y" G" ]7 V" T/ V9 h
- <!--{/if}-->
$ Y& m: F- f9 O& g! j - <!--{if !$attach['price'] || $attach['payed']}-->
" V+ Z( b1 q8 r2 G4 t0 A - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>6 T" z8 E* Z0 }1 b2 U. e
- <!--{else}-->
) g. {1 D3 ^8 i0 w - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
) k8 Q6 g! |' ]& x5 k. D: O! G - <!--{/if}-->
- H2 k, | T" r8 d6 L - <em class="xg1">($attach[attachsize])</em>3 i+ E6 v( D% }* _! k# v- }0 M
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
& t B3 ]) C! ^2 e8 | - </em>
: z7 H- d9 s- |7 S. N% Z; L - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->4 `( w5 g- e& W/ N2 I* l! `9 ^: A7 j: _
- </div>. j9 G4 K* H; Y
- <!--{/if}-->
复制代码 改为:
" Z6 Z8 w) m2 I* i# c) C8 {; ? D9 _& ~7 @1 [
- <div id="attach_$attach[aid]" class="box attach mbn" >3 n2 m: X I: b
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
0 G P8 Z. c! i9 [3 n - $attach[attachicon]
% O* {; I/ L1 t* [ - <!--{/if}-->
6 V# `! O$ v( h! S6 d - <!--{if !$attach['price'] || $attach['payed']}-->
$ }3 g, O8 v) |' A - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
3 c7 @/ u; D) |: k9 i. I - <!--{else}-->
/ _+ g. }5 q7 Q) i, ` - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
* m& h7 @. O7 ~' U$ d+ K' c$ q4 p - <!--{/if}-->: G3 A3 L! m7 x7 A: q# u
- <em class="xg1">($attach[attachsize])</em>
" A0 |; d5 U% z# | - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}) a8 \; N* R0 C
- </em>
, |5 Z. A1 D7 @" o6 H3 S" q - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->/ J+ f/ i% O5 U8 z5 A( n6 H
- </div>
复制代码 GBK格式需要转码
6 b5 t1 B) ?4 T5 v: z7 _* M, L+ U+ X, e然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
0 B1 ?$ m- [# ~) a e[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA + E6 C" Y, C, P7 W0 u9 Z- `" v
提取码:8wg1 " t% O( s9 @, G+ z7 \2 |
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 7 F& `1 a) p( e' }
| |
 | |  |