手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 5 X4 P; S- w5 {2 m
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
3 G. }3 Z+ `2 F* }9 Z) M$ ~, \% G
' {; Q# v" `# h3 |$ R/ W修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):: A, U7 d; n T/ |
打开:/upload/source/language/lang_message.php4 q3 s/ k! }0 @
找到& x1 w% \2 ^. i) S x
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
! E: ]! {3 h: n( k- 'attachment_mobile_buy' => '附件购买成功',
复制代码 4 H* q5 }& c1 d5 W
打开:/upload/source/module/forum/forum_misc.php
, \) B2 d9 o9 |+ Z q1 n找到 - <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>
复制代码改为: ! z* c7 E6 Z, X. B
- if(defined('IN_MOBILE')) {
$ \/ b, Y1 F- {- M - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);+ f9 K! ^3 K- e
- }else{! M. Y3 M0 ]. v, r a
- if(count($aids) > 1) {
5 y' S& b- o) x$ f8 K - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
$ L7 [$ r! H4 ] - } else {
% [5 i# Z( b% t4 T5 I - $_G['forum_attach_filename'] = $attach['filename'];
/ Y! F; Q! ?+ L. l3 ?6 g - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
1 ?9 f: Z" s1 w, r - }
( t2 c9 n: X X/ G. K- m1 ]0 ~ - }& {/ H9 q6 b$ `. n, ^" E
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm* W9 d% o1 \# P& E c% A& ~6 Q7 c
: Y$ a" G, m6 f! P找到
5 `' T. O: w0 N, x& I4 J
; o$ d# R( B F- <!--{if !$attach['price'] || $attach['payed']}-->& Q- l1 Q% t( c
- <div id="attach_$attach[aid]" class="box attach mbn" >8 f9 Y3 [" w7 N+ O; \* t
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->; y" F' w$ G* F& G* R; A
- $attach[attachicon]( A7 F3 d% [* H I2 ` N( N
- <!--{/if}-->. G' w- N' a# b- G/ U& s
- <!--{if !$attach['price'] || $attach['payed']}-->
- `$ v/ D6 X* t) h - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
* l$ K7 J+ ?) x% | - <!--{else}-->
- F( o4 j; r) Q/ _) s% K: [% Y - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
6 p) |% r* C0 I& c B - <!--{/if}--># q3 ~1 K4 Y8 P0 q* C* Q* J7 p% Z
- <em class="xg1">($attach[attachsize])</em>$ f ?; _$ u( U
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
# u. d+ H6 f( m4 T! s - </em>7 ]/ }1 X: ^& a, t3 z5 F
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
' ~8 A; q4 b3 Y, q" v8 b# R - </div>
8 D5 G. T$ _ p( ]* [: |' { - <!--{/if}-->
复制代码 改为:
$ r) }4 T8 d8 T) J0 m; a B1 Y
5 s5 {8 ^- z ~2 e% Q# H; Z% ?" p- <div id="attach_$attach[aid]" class="box attach mbn" >6 D$ Y! v9 s) f# g& k1 q& H
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->! ? J1 E4 P3 S+ y; p6 m& U
- $attach[attachicon]$ r i$ D8 _ C: C3 ?
- <!--{/if}-->* c7 N. l6 a* s5 P% O6 Q
- <!--{if !$attach['price'] || $attach['payed']}-->6 p4 Q: |/ R. _+ A8 F- ?5 ]
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>8 W P) }" X: A0 x( W
- <!--{else}-->$ p# O( j0 j5 S3 _
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>9 W: m7 Q8 V5 a- j; t$ T
- <!--{/if}-->
* Q! G/ d/ z. z3 ~% ` - <em class="xg1">($attach[attachsize])</em>
3 w B3 z! A' t& }4 R - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
, ^+ |( ?' ^% w% H) ~# C - </em>
* {. d9 ` U1 D- J4 x8 K1 Y4 U* F - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}--># _. I# x a. G+ C$ h O
- </div>
复制代码 GBK格式需要转码
/ ^$ J2 T- E# w2 b! {然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可2 b* S" i5 |1 G
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA . e' m: ]; q' h& f; e; A
提取码:8wg1
B3 z- }4 d5 D9 C3 w% W* z/ q复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 ) ~# l7 H4 K( a# z$ |/ N7 j
|
|