罗码网络discuz插件模板教程微信小程序安卓电脑软件htmlphp源码下载

罗码gitluo

 找回密码
 立即注册

QQ登录

只需一步,快速开始

微信登录

微信扫一扫,快速登录

手机动态码快速登录

手机号快速注册登录

搜索
开启左侧

[DZ教程] discuz3.4 手机版收费附件不显示的bug修复

[复制链接]
罗码男神 实名认证 官方 发表于 2019-4-16 23:21:16 | 显示全部楼层 |阅读模式
手机触屏版,收费附件,用户未登录时可以看到附件并有“登录后可见”的字样,但是等到登陆后却踪迹全无。有些站长反馈说在PC端购买过这个附件的,在手机端才能显示附件。0 S: D) x" G# @, j7 a' B
这样导致手机端的附件平白无故的消失了~ 应该算是一个比较大的功能上的bug,由于不影响安全,所以官方并未急于修复。0 }& `$ F; R" c" U' ]

, D: U, [( G: M修复起来倒是不很复杂,过程如下(如果懒得了解,可以直接拉到底部,下载懒人包,覆盖到根目录即可):
! n1 @& u; r& y7 o打开:/upload/source/language/lang_message.php
0 X% U; v0 p, s2 Y) \8 H1 }3 t0 z$ u找到  M/ W& z5 R8 V" ?
  1. 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码
改为:
3 u8 R4 L, j: z6 k
  1. 'attachment_mobile_buy' => '附件购买成功',
复制代码

. m& {3 l3 `/ U: _/ W 打开:/upload/source/module/forum/forum_misc.php5 u4 Q8 G& e4 {
找到
  1. <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>
复制代码
改为:
) u" p7 V& ]: Z7 m0 e+ }
  1. if(defined('IN_MOBILE')) {
    $ D$ Y0 h# ~6 _9 T8 U
  2.                         showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
    ) S0 \, ~6 c. R1 k6 N6 t- i
  3.                 }else{( ?$ U7 m5 f& P, l
  4.                         if(count($aids) > 1) {: B: R1 l5 Y6 v6 s
  5.                                showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);* h* o& W( U3 u# V. q' M
  6.                        } else {
    $ Q0 Q2 W# T; Y
  7.                                $_G['forum_attach_filename'] = $attach['filename'];
    ' m  v0 T# v6 k  O* i/ _3 ]
  8.                                 showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
    : D) v0 u# h! K: q% d
  9.                         }$ L. l; D; _1 z4 P  r$ |
  10.                 }2 g. b5 [# Z" M3 k3 y
复制代码
打开:/upload/template/default/touch/forum/discuzcode.htm5 k) P, k/ g1 v0 o
: Y$ a" G, m6 f! P找到
6 V' V. V2 P* B
7 [. b5 L9 O) ^! U2 b, m) S, N# J1 y
  1. <!--{if !$attach['price'] || $attach['payed']}-->! k2 U+ q# H# o$ I! J; R1 u* `- \. z1 c
  2.                 <div id="attach_$attach[aid]" class="box attach mbn" >
    % O5 f& M8 j5 K
  3.                        <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
    $ ]) z* A! j) S( F4 f
  4.                         $attach[attachicon]
    - ~" r/ g2 D$ z* y. {4 V* }
  5.                        <!--{/if}-->( |$ @! S8 F$ F4 t0 N, \
  6.                        <!--{if !$attach['price'] || $attach['payed']}-->1 N2 h' f- O: d7 `3 M
  7.                                 <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
    ( w8 Q" a& m7 g
  8.                        <!--{else}-->
    7 A4 ]1 l! f% i5 _: i6 L8 y) X
  9.                                <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
    * |& ?& w( d$ g; _9 c
  10.                         <!--{/if}--># [1 X6 M, s* h( t: P: i  o
  11.                        <em class="xg1">($attach[attachsize])</em>
    ( p6 w% c: G- z
  12.                        <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
    ; T, z  H3 n8 a/ ]
  13.                        </em>
    1 J9 b$ L3 t7 q. J4 B3 l) j' k
  14.                        <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
    % Y* `6 K: T  S$ M! V) D& W
  15.                 </div>+ `* N! Q+ I+ E6 m
  16.                <!--{/if}-->
复制代码
改为:% Y7 A& @/ U; B! ~& M) V" H' ?
0 j8 a& Q4 ^. G4 L# ?) c) v
  1. <div id="attach_$attach[aid]" class="box attach mbn" >
    ) W' \+ w, W" b% M6 \# P6 V
  2. <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->4 l2 C8 @/ b  n& t0 J/ [) t0 @
  3. $attach[attachicon]
    - ^# }& f% R/ q* p# [" ]& L5 G
  4. <!--{/if}-->; w1 o9 v; s" \7 U. h; c% U
  5. <!--{if !$attach['price'] || $attach['payed']}-->
    0 Y# K5 T8 t2 L+ B' p
  6. <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
    1 s2 }% @: H/ x3 c0 S5 I6 C! {
  7. <!--{else}-->: g1 s2 ?- K( [  \2 a( C8 [
  8. <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
    , _% e4 w  S# |2 `' M* u4 K9 T6 N
  9. <!--{/if}-->/ n% K$ w- L( N; Y
  10. <em class="xg1">($attach[attachsize])</em>
    : k+ x5 w' I3 P6 N/ H* ^* b6 p
  11. <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
    3 Q# d5 p1 b) v% W3 N
  12. </em>
    % w: K+ P! }  [- J
  13. <!--{if !$attach['attachimg'] && $_G['getattachcredits']}-->{lang attachcredits}: $_G[getattachcredits]<!--{/if}-->
    * w  U6 f/ H- H0 K' i! M: Y
  14. </div>
复制代码
GBK格式需要转码1 C. V" R4 A9 t% v0 `
然后将下列附件attachpay.htm 复制到 template/default/touch/forum/ 即可
5 C$ g2 s+ h' B7 ?: m/ ^* T
[sell=1]链接:https://pan.baidu.com/s/1IK7xP9A0sVKvxIIB1qOYkA * `1 M: Z! X. w  X) K7 \3 K! f# T
提取码:8wg1 2 p0 }- r) r: j& t1 x/ g
复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
直接复制到网站根目录即可
[sell=1]链接:https://pan.baidu.com/s/1QOodnF-tAUo11jN-vsphUw 4 L% V8 p! [; M% z) q
提取码:w52u
' }% E" O/ Z3 H6 x3 w复制这段内容后打开百度网盘手机App,操作更方便哦[/sell]
: O0 i( |# `8 _" [3 u7 g% ~; E

想说又不敢说,说了又怕被拒绝,拒绝了又怕尴尬,就是这样的。内心很痛苦的那种。
jjj111 发表于 2019-6-12 00:47:24 | 显示全部楼层
我是个凑数的。。。

回复

使用道具 举报

bogewl 发表于 2019-6-16 00:17:16 | 显示全部楼层

回复

使用道具 举报

66666 发表于 2019-6-17 03:57:44 | 显示全部楼层
谢谢楼主,共同发展

回复

使用道具 举报

 shu1332725 发表于 2019-6-18 02:03:36 | 显示全部楼层
前排支持下

回复

使用道具 举报

foryun 发表于 2019-6-18 03:43:22 | 显示全部楼层
有竞争才有进步嘛

回复

使用道具 举报

123男神 发表于 2019-6-21 00:59:39 | 显示全部楼层
沙发!沙发!

回复

使用道具 举报

hgfhgf 发表于 2019-6-21 18:03:46 | 显示全部楼层
找到好贴不容易,我顶你了,谢了

回复

使用道具 举报

全村的希望 发表于 2019-6-22 23:24:35 | 显示全部楼层
支持一下

回复

使用道具 举报

666男神 发表于 2019-6-23 02:02:57 | 显示全部楼层

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 微信登录 手机动态码快速登录

本版积分规则

QQ|Archiver|手机版|小黑屋|罗码 ( 粤ICP备17073043号 )https://beian.miit.gov.cn/#/home

GMT+8, 2026-7-5 13:10 , Processed in 0.131201 second(s), 58 queries .

Powered by 罗码网络! X3.4

© 2001-2017

快速回复 返回顶部 返回列表