手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
6 v9 J$ M9 k. W: K. d 这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。 5 ?4 g: |; p! J" ]% X1 I, t# f
0 w$ V' t$ x/ P7 J } 修复起来倒是不很复杂,过程如下( 如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可 ):
- `$ z2 L# R6 g4 O2 i 打开:/upload/source/language/lang_message.php
. U, i# K5 b+ i# q# Z, H( T3 ^% L 找到
$ v% w: T1 C' u 'attachment_buyall' => '本帖所有附件购买成功 ', 复制代码 改为:
, Q& X2 ~1 [+ T i 'attachment_mobile_buy' => '附件购买成功', 复制代码 . \, M4 m& L/ X
打开:/upload/source/module/forum/forum_misc.php $ r, I% F& d1 e
找到
<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> 复制代码 改为:
! [$ m$ v4 ?( i
if(defined('IN_MOBILE')) {) _- h ` J8 A2 U/ ?) _
showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);/ k# H) n6 S& f" X7 Y4 e6 W+ I5 p
}else{5 Z* B# ~: B+ B' f
if(count($aids) > 1) { J' W3 j+ |5 m3 e
showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
9 H* q6 U3 ^3 Z+ w0 w4 Q+ J7 ] } else {
$ V5 w9 q, D) \( D $_G['forum_attach_filename'] = $attach['filename'];* g! g3 U R/ T; q& R
showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
7 w! h F9 @. q }/ U3 v/ c/ [7 O! e+ U: N9 ~+ v# w
}0 ]- `+ U- w3 t7 w. @& ?, i$ k
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm
8 O* m2 O" z/ o" |& \& L : Y$ a" G, m6 f! P找到
5 ^% \ g% e# ^ . {# V4 s" o0 ~! ^) q1 h( J
<!--{if !$attach['price'] || $attach['payed']}-->8 p0 R/ P0 c3 o6 _; P7 Z2 S
<div id="attach_$attach[aid]" class="box attach mbn" ># }: O% Q* K# W. k& \+ x, m1 {
<!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
2 a6 \1 u3 a3 J; T: R) ~# u0 Z( S $attach[attachicon]/ p" h9 I6 s6 i
<!--{/if}-->
' ~) L0 G H: w! F <!--{if !$attach['price'] || $attach['payed']}-->
4 ^* [3 h! d0 a <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
0 h& K: ?+ B3 s: q* a4 f8 M <!--{else}-->2 d5 ~ ?( u1 x! D0 z, h# `
<a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>1 R8 r# X$ q9 O* m, `: [; ^+ Q
<!--{/if}-->
9 X5 [! d6 Q* A4 s) m <em class="xg1">($attach[attachsize])</em>* u8 ]# a# {: d* z7 U' }9 @
<em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
! {, F' G+ w1 V3 a </em>
$ ]- w9 K4 C! z. k <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
# @7 ~. k- \6 @2 i. G </div>
( B$ j) I/ k: w2 `7 i2 [8 U <!--{/if}--> 复制代码 改为:
% B! T% A+ G) ]" V+ U& o# S# S1 _ 7 U c/ p2 j4 v8 e* \% E8 a N7 Y
<div id="attach_$attach[aid]" class="box attach mbn" >
3 l, Z8 V x% Q) N, E3 q <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->% R ?1 S) V/ G: V: t c) Z
$attach[attachicon]
2 |1 H0 `0 B4 E <!--{/if}-->
4 a+ s! g) }9 f- T <!--{if !$attach['price'] || $attach['payed']}-->
# m) \. g" T6 |' e <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
2 `, S* }, u6 { C <!--{else}-->
7 m$ ?3 ~4 Q* F2 |2 _" ]1 W' @ | <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>& [+ F: L8 I0 f& a N9 w" }+ ^, C
<!--{/if}-->' {/ s) m$ Y" I: c0 z- o
<em class="xg1">($attach[attachsize])</em>" m6 ^8 L1 j- U
<em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
5 V; u; C% \$ K6 W </em>
, n& R9 O& Z8 z. D1 r1 H <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
' @( H, o$ V) [4 I5 d1 J' | </div> 复制代码 GBK格式需要转码 3 \2 S; I, h! D. H& H, c
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可 * b1 D! ?8 A1 R0 }6 f% o
[sell=1]链接:
https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA
& K; y$ c0 J& p- x. ^6 X9 x 提取码:8wg1
* w0 B: O6 J9 P, I! i: w* T- ?
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
直接复制到网站根目录即可
5 w* o$ d& w2 H1 d