手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
( j2 P, F0 J8 X$ P$ b这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
) T. s0 g. V; f, o8 S2 I/ R
" H$ _# o/ w6 T# D! ^8 g& w" R% x修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):% ?/ r0 k# c+ W W& V! Y2 b
打开:/upload/source/language/lang_message.php( R6 o- V1 D$ a5 R
找到
1 c, _# ~; c# `- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
- v3 T% N, t0 Y7 C6 k- 'attachment_mobile_buy' => '附件购买成功',
复制代码
% \3 d+ j0 q5 a# Y 打开:/upload/source/module/forum/forum_misc.php
2 ]% Y, i* q! f找到 - <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>
复制代码改为:
0 ~/ i1 I# V2 n3 A4 q' F- if(defined('IN_MOBILE')) {
8 C5 P6 d' u6 N - showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
9 ?: B; { }, G' C! i- M' N - }else{
0 h `* J1 m4 _% t - if(count($aids) > 1) {6 ~9 k1 b5 _+ N5 a
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);% G# y' ?1 N$ `0 |! T8 p1 q' K
- } else {
8 e7 Z& D8 Q5 n+ h& s - $_G['forum_attach_filename'] = $attach['filename'];# w) ?+ c& `% T% U
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
- n) ~9 y6 }& A9 |4 F6 b - }. I z* g# ~" S! ~) c
- }
/ H8 c8 f, M# ]: O$ \
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm# z. v7 [) u: x+ O9 H' I# {5 c
: Y$ a" G, m6 f! P找到+ o0 r4 `7 p _/ @
5 A+ U; _' E7 r( I
- <!--{if !$attach['price'] || $attach['payed']}-->
( l# P/ A: w. o+ ?) ^% a0 ] - <div id="attach_$attach[aid]" class="box attach mbn" >5 r+ `, j" A8 W( G( e, G
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
+ i# s$ g: A$ S; R+ s5 f4 Q" { - $attach[attachicon]
4 `' B. ]0 p2 W( r - <!--{/if}--># w* d1 o. b1 p& r- S4 J
- <!--{if !$attach['price'] || $attach['payed']}-->9 C6 k! l8 k8 l- r' _2 M; f0 X
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
% ]6 m0 n0 y4 `8 }( o7 t - <!--{else}-->* ~0 E# x, K% H, B8 W/ V J& y
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
* p/ G" h- e& b+ y - <!--{/if}--> M: K+ i5 V; u4 y" w( P4 ~
- <em class="xg1">($attach[attachsize])</em>) L& @3 [% s/ {4 R6 [0 J7 f
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})3 f& T# P. y7 k' d: C( l" m+ c8 A6 Z
- </em>6 L J! f. [, i8 y5 M
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
5 `7 l# u# A8 j - </div>
) ~. J- p2 [! G+ A( i - <!--{/if}-->
复制代码 改为: q+ y) {4 p$ N& g- L. F* B6 l
4 e; w2 F9 W0 L) k9 [
- <div id="attach_$attach[aid]" class="box attach mbn" >
1 k# ` X) f& G! M - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->/ `' s2 P2 X/ |0 P9 [
- $attach[attachicon]# s/ l! {6 J3 L8 f
- <!--{/if}-->
& u# }. I. V; x3 U: r4 B; ~# _9 { - <!--{if !$attach['price'] || $attach['payed']}-->
9 i ^0 a x' B - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>6 f3 j4 l" S" y" c: D I, A
- <!--{else}-->" S0 W9 b# V0 M8 r8 |
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
" U1 c0 z F# J+ {7 F - <!--{/if}-->
& n' D' C/ _# j- w, P( b - <em class="xg1">($attach[attachsize])</em>$ d% x4 g6 W+ _7 w/ p3 ~4 e8 z' I
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})6 {: h4 V; l- `9 B7 E
- </em>* J' c5 X1 @5 d3 F$ ]6 k
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
X6 w( G5 f+ e0 V# j3 A - </div>
复制代码 GBK格式需要转码
1 }3 h0 a" y4 c0 Z3 @! F- r然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可6 L' P0 P. m" U+ k, T9 [! X
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA ( ~+ q( b' P1 j& u! m v8 [8 z
提取码:8wg1
8 s& S. F' g* {. y: L0 O复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
1 E, M# u& Q: Z9 Z
|
|