手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
+ H5 ^) b' W: V! K这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。; ^% s' G1 L' H% q. @; \; _/ `; v; \
% d/ h) o3 p/ b5 S修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
3 ^! x2 U% y6 ]3 r; p% e打开:/upload/source/language/lang_message.php! C7 Y: J: `' A8 J5 W% J4 g! Q, l
找到9 s4 F1 F' I/ D
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:+ {1 o3 }- b& ~, X& n
- 'attachment_mobile_buy' => '附件购买成功',
复制代码 9 }+ \ H. J3 i7 W
打开:/upload/source/module/forum/forum_misc.php6 Q1 S: K- h) Q! v2 g5 g2 L
找到 - <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 a2 d0 `( o3 |7 v5 g5 g# [
- if(defined('IN_MOBILE')) {: u8 T% Q( X( W' i. Q
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);+ R/ L& k) Y- Y* ^' W
- }else{
8 U7 O' L8 ?2 Q: M u - if(count($aids) > 1) {
" M/ B3 |. _( _1 v4 }& W) a8 [ - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);7 S( v" \' G i0 J+ C
- } else {/ m8 _5 s- \6 [
- $_G['forum_attach_filename'] = $attach['filename'];
+ W. r" j4 ]$ N) y; e2 M# S - showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));' l' g/ a4 S" p- b& O- E( r
- }
V( ~0 P' ?2 y* N7 f - }! |3 ]% D, P% a5 f% z
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm9 k9 ]+ g7 g/ G L/ P b. X
: Y$ a" G, m6 f! P找到
9 a7 G9 Z( }( S3 D! a* n8 E) l
( w8 m2 U7 l/ a8 \- c/ P9 O- <!--{if !$attach['price'] || $attach['payed']}-->
: L$ s; i. p/ Z$ k - <div id="attach_$attach[aid]" class="box attach mbn" >8 C! y' i5 _3 K% i j
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
# [0 h, j/ x7 x/ ?: K - $attach[attachicon]
. \. J. @# {# b& L5 u! p. G - <!--{/if}-->/ }) d+ Q$ u! t9 d3 B
- <!--{if !$attach['price'] || $attach['payed']}-->
2 F- c3 G4 G2 _4 p' T" ` - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>9 ~% T' b( o7 d( g: j! T
- <!--{else}-->
5 q! d1 _# _/ ^" E; u/ z - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>4 K5 d7 t9 L3 |# E" h# i+ S
- <!--{/if}-->
% |$ g* b2 E2 j, A2 Z - <em class="xg1">($attach[attachsize])</em>) }3 z% m, Z- h3 }
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})4 C. v% X/ A5 |/ @& U
- </em>/ q3 N5 @2 ]; v o* @8 T
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
4 y6 X. O9 f; [9 D - </div>* h T1 M( T% D8 Z! m
- <!--{/if}-->
复制代码 改为:
8 [% r7 h( n. ]' c: l! Q; s& F
- <div id="attach_$attach[aid]" class="box attach mbn" >" d l# }! ^# M& g) E+ k
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->9 [7 v7 `/ i, _* X
- $attach[attachicon]
# R# Y, ]% k. |- E* a - <!--{/if}-->
5 i: D0 E# ]. x6 [0 P0 B( H - <!--{if !$attach['price'] || $attach['payed']}-->) U9 U* d# R* {+ b
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
9 S7 J) p" Z6 v& t, ?. E @ - <!--{else}-->- P; f6 B9 i/ n- M
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>$ E. g+ c. k! E8 b9 R8 Q2 u( D
- <!--{/if}-->
. n3 I& E5 v$ \7 d - <em class="xg1">($attach[attachsize])</em>
! M3 C& |) _: I - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})# n+ F$ @9 r: o
- </em>
- y* j6 a+ o5 ]# E- N5 l" [ - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
: s" M( R T( y0 U - </div>
复制代码 GBK格式需要转码
& R$ Z; z& ?9 d然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
" Z9 i" G1 Z0 b$ ^[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA / b% u: y! h! F2 j: A
提取码:8wg1 . G; X- U% o1 K3 I. z. O8 Y5 e4 y
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
/ v4 w( @6 [& E6 j5 t+ w
|
|