手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。
& b7 O% W* `% h N$ H3 o这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。
6 ?! R/ A/ t# d! M9 G1 @. A* ~1 N4 a/ r6 e: Y
修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
8 B9 \5 ^! N* Y& j. U: S+ c7 g打开:/upload/source/language/lang_message.php
6 v. M% N0 \( R& y( D) P找到# q, _3 N& k) ~! a4 {+ |
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码 改为:
$ l9 V) q5 I! C& j- 'attachment_mobile_buy' => '附件购买成功',
复制代码 3 r; O" a: c, N, _8 n& ]
打开:/upload/source/module/forum/forum_misc.php
& H$ J; H. c- ?. z找到 - <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 A6 \; Q+ g p: }" i- if(defined('IN_MOBILE')) {! y: c9 `7 G4 `- r5 `
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);; Y9 O9 ]: @8 @) m
- }else{/ T8 f5 R N0 D( |2 l9 B
- if(count($aids) > 1) {
' ]; Q3 n1 j- B5 O - showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);" {( ~. `4 w+ g$ X4 A: l0 Y- t0 r
- } else {, c N! W% k: w! p' Z/ ?& s
- $_G['forum_attach_filename'] = $attach['filename'];. {; M5 J6 I" G
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));: v$ z" G6 k" ]2 k
- }
* G9 h3 G9 {, n& K - }3 x8 f- R2 i* C. S* [
复制代码 打开:/upload/template/default/touch/forum/discuzcode.htm! O i; y' P6 I0 e
: Y$ a" G, m6 f! P找到
' d$ d0 U2 R& Y. V8 Z
& f" \0 f( n1 `) O" H- <!--{if !$attach['price'] || $attach['payed']}-->( n. M I* z$ x4 c
- <div id="attach_$attach[aid]" class="box attach mbn" >
8 ^7 U$ G( h) L+ @* I( L - <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->3 @/ }" C* o) l0 D7 `
- $attach[attachicon], n% x6 t& z" X% ~" ?( u
- <!--{/if}-->
l/ j0 ]& |9 v* G3 ^7 n$ C - <!--{if !$attach['price'] || $attach['payed']}-->
! b: w: S1 o# p$ S - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
9 ^8 B$ Z, a, e* y% H - <!--{else}-->
4 t' r! f, ~1 [% ~ R2 H4 U* ^: F - <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>7 p/ Q, L* e8 Q, g( R7 J* c1 f5 d
- <!--{/if}--> v' B: N$ b {% v' d+ ~# E2 p$ F
- <em class="xg1">($attach[attachsize])</em>: |* T! H6 X7 {9 @$ b6 n& I3 F l
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})7 A6 N8 c' a: y2 O- }% M! x. s" ^* w, T5 t
- </em>% x: n& [; @: ]. Y
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->& w" x- [5 u0 a; \# l& Y, Y9 I P( q m; ?
- </div>$ i; e2 U3 p; ^, _: L0 R- d: z
- <!--{/if}-->
复制代码 改为:
0 f, W9 I4 T3 v% e0 i) t" G) i& m/ o
- <div id="attach_$attach[aid]" class="box attach mbn" >$ `+ C ?8 {( G4 P1 `3 K
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->5 N; l; C8 `$ p# m' R# u! u3 V
- $attach[attachicon]
7 S/ ?9 ?' M2 X0 m! F% H - <!--{/if}-->: \' E7 e$ O+ n9 R3 }
- <!--{if !$attach['price'] || $attach['payed']}-->
2 w. X: g8 @3 s2 J - <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>, k- D# b6 g8 \ n* V
- <!--{else}--># I, ?/ t* h7 S0 a9 z8 N5 }
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>' A9 L: s, Y, D/ j/ V- l
- <!--{/if}-->
. h* M. C; h' s% E( ] - <em class="xg1">($attach[attachsize])</em>
U# @ U/ w- x# C; ^/ D, J+ _: d w - <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
8 _- b3 v/ G! f2 U' Z( t' y - </em>
; S( B. _; W2 I2 h0 ~- j2 _) J - <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
& T1 p, M% q0 X7 \9 Q - </div>
复制代码 GBK格式需要转码6 k8 h3 o3 k" o" i
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可' ~, q8 T3 k o! R! S8 w" ^
[sell=1]链接: https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA 1 Z$ E8 a! K# v! i7 T
提取码:8wg1 3 R) y) _" v4 S
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell] 直接复制到网站根目录即可
+ f9 ~# ?( I8 i* O3 H3 U
|
|