手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
, J( c4 M. G3 j8 a h, y) t$ |这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
; b) ~+ G3 H( \ n: i$ r; B# Z: w4 q. i; y+ U
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):" x/ z8 H4 z f. P
打开:/upload/source/language/lang_message.php6 T/ O/ Y# O( g2 Z3 R
找到* z6 N% K2 d7 Q, X- X2 G
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
4 j+ M) T' Q0 ]* t# z0 q% V9 ^- Y* q- 'attachment_mobile_buy' => '附件购买成功',
复制代码
% d7 N1 P7 ~7 W: d$ f 打开:/upload/source/module/forum/forum_misc.php
4 d0 ]* L9 w3 {$ `" U( 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>
复制代码改为: ( ?1 }/ L `2 b+ a8 d% D
- if(defined('IN_MOBILE')) {- J# ?# r8 G3 R3 w2 U
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);; e" K8 x5 O8 J& M2 E
- }else{
* \0 x* H5 I h: c6 i& w, N - if(count($aids) > 1) {
/ Q0 U9 x- \' e: @3 j% u5 W - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
; `* k$ K" H: h8 F& R - } else {
7 p* }# n( H: f3 K - $_G['forum_attach_filename'] = $attach['filename'];- i1 t, j0 C% E
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));* ?- q c, I: J$ O
- }
9 p. Q Y1 t% u: N" ~( o! Y) u - }# Q# I& s: K! a6 g; P' n5 t
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm3 Y$ F9 j5 N- f7 x0 P
: Y$ a" G, m6 f! P找到
& n5 w% c/ n* ?' X& x+ i& i
) i& W; K, N/ Q9 ?7 z6 n- <!--{if !$attach['price'] || $attach['payed']}-->$ q& a% i/ ` s" X& ]# [
- <div id="attach_$attach[aid]" class="box attach mbn" ># _5 p3 w# T3 Z" P/ i
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
# r* [1 p. p7 [/ J0 O- Z1 Q* Z. U - $attach[attachicon]* s1 k+ Y% R9 G! U! t: V; i
- <!--{/if}-->
4 q, v8 u. u* V! G - <!--{if !$attach['price'] || $attach['payed']}-->4 \/ C, o% F* {, J8 K5 x' n
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
% B% v# _1 u/ Y7 E - <!--{else}-->5 F5 o$ I W) H+ s/ l. V& U6 r
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
6 ?9 I' g5 w* E; h& u5 M" L - <!--{/if}-->
1 v5 D3 n/ @) v, I+ g/ M! @. x - <em class="xg1">($attach[attachsize])</em>
) C0 ]# ^$ O5 B' ? - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
: V1 N; G; L% P0 M$ B - </em>
, y; ]( k e8 R+ r - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->2 r% V5 c9 r4 {9 M' E
- </div>
: q* _0 C" m# B1 x5 J- y1 }. s3 ]4 u - <!--{/if}-->
复制代码 改为:
& z. J P" {1 t3 i/ M& x4 y* O" |9 T) M% M! s8 O+ X
- <div id="attach_$attach[aid]" class="box attach mbn" >& B$ s1 h" A8 j, S2 d$ c* Z: Y
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
4 E# m2 T S H% [/ T - $attach[attachicon]
# h- L4 W Q! c8 q4 t - <!--{/if}-->
( M, |! B- `+ y' i- [: ?" ~ - <!--{if !$attach['price'] || $attach['payed']}-->
I8 N8 x, r; z2 } - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>1 Y7 O& ]3 W+ J/ v- i6 j. e
- <!--{else}-->) V" `" S& h' C/ B9 n2 M6 [
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>" o, r% T0 m! K' D4 O. V: z M
- <!--{/if}-->
, ~2 q9 j) ?% {4 W, z$ ^, F - <em class="xg1">($attach[attachsize])</em>
! u5 W3 T' H& K; c2 K% C - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}): `. [& B3 B: s! b3 ~# a. H
- </em>
( E0 S/ f# _# P9 u- O7 ^# P+ L: @ - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->( z; \( ~' o" G$ M
- </div>
复制代码 GBK格式需要转码8 \' P F# u/ |5 ~
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可! p* s. o) D+ U, c4 G
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA 5 ~, m& M( H* @
提取码:8wg1 ' e8 `! L- S: p7 K2 W" D
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可 + e/ x- [$ O; \
|
|