| | |
| 手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。 % x) C' Z5 F, {( `3 I3 y
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
& ?5 o6 `2 w+ a* p* n+ X4 F+ ^
* W6 t- b0 S7 c9 {) O9 p修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
N) R4 b+ T. J打开:/upload/source/language/lang_message.php U8 x. Z7 n6 \* W0 [8 o
找到4 w1 L* j6 H) J( X
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:' w$ ^: _9 ^1 a2 _% \2 z
- 'attachment_mobile_buy' => '附件购买成功',
复制代码
, h/ k' M! {: k, P' Q% G( B: D 打开:/upload/source/module/forum/forum_misc.php$ y1 n. F' R' h5 R
找到 - <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>
复制代码改为: 6 x% N& P, e* N3 S
- if(defined('IN_MOBILE')) {# [2 J+ ]) [; l) @
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
" b5 W, o8 y" d' \5 a - }else{
* Z& w* N# ^% T+ y9 d; \; ~9 ]: U' x - if(count($aids) > 1) {
! L! ?9 U" T8 G; L! W - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
3 u! e3 w1 I# F4 ]: F" }# T/ X/ } V9 a - } else {' h; P4 {# E+ ^4 V* ? k* o
- $_G['forum_attach_filename'] = $attach['filename'];9 P/ Y0 T7 a+ J0 v0 }
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));3 u$ T, w2 g @& V
- }
$ A7 V9 Z$ d' |1 y6 B) L# z - }
- R. |& `) o+ d$ L B
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm8 j) I5 | s* X
: Y$ a" G, m6 f! P找到( W& [5 T; g3 F8 ]% h5 H
$ j' O" L4 a3 y$ W; y5 y8 Y
- <!--{if !$attach['price'] || $attach['payed']}-->- p2 M+ y- ~. c7 `( K, w
- <div id="attach_$attach[aid]" class="box attach mbn" >
: _( i/ C+ j8 a g v - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->! H8 H9 j: X9 H. p6 f5 j
- $attach[attachicon]2 J8 n8 k0 g; `0 k) c+ h" X3 T
- <!--{/if}-->
9 V# i/ K$ E. j) p+ a - <!--{if !$attach['price'] || $attach['payed']}-->
2 i3 {1 F: Q- Q& K - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>3 v5 I+ z, [6 ~" |% o1 P- ^
- <!--{else}-->
6 f- }) ^9 M" |( u4 r o& q - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a> ?# z* j/ y( C7 Y; k
- <!--{/if}--># Y# j& P8 I4 e) F, S
- <em class="xg1">($attach[attachsize])</em>
9 A' |: I; M2 S) _2 P P - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload}), u; a4 G( O! u* H! n' x
- </em>
. Q2 y }7 P( R+ N& M" K - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->+ O# y4 ?. Q) W1 g- D
- </div>1 l* G1 Q; ^0 @, J
- <!--{/if}-->
复制代码 改为:5 |/ w, I: L$ }' h) N& u* S, k
4 g6 L5 D( F( [' O- <div id="attach_$attach[aid]" class="box attach mbn" >
5 m" k2 E' W4 K8 D - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->2 i; P: l! {+ P8 N( K5 S1 W
- $attach[attachicon]
4 r- w' s+ B3 o9 J' y% V8 Y2 C - <!--{/if}-->
4 E& `4 a# u- F3 e - <!--{if !$attach['price'] || $attach['payed']}-->
; a; I8 h' e [9 z f - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>' d5 W" M% y4 q+ b& E9 @ q$ M B6 q
- <!--{else}-->8 z% M- J1 |/ e9 U
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
' K R9 q2 f# K5 L - <!--{/if}-->( s* m/ f9 r# P
- <em class="xg1">($attach[attachsize])</em>
$ S5 t; W, j0 C" M6 L - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})- @ N4 X0 e/ d1 |4 {+ q! m
- </em>
( ?" G9 j k7 N- \) V2 a( E0 y - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
9 m0 N( C2 H# c# g - </div>
复制代码 GBK格式需要转码7 V8 ]; W5 i6 r& ?& H; V% t1 P4 w
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可1 \- D7 k+ P2 K$ Q# H: {) P' E
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
( `, j5 v" @ Z" C提取码:8wg1
" s4 `9 l# x5 ]( c1 h2 G! X复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
9 E2 E+ p# u: Q4 v+ H& {
| |
| | |