由于discuz!x3.4以下的版本不支持 手机版购买附件功能,特此修改兼容下
1.打开template/default/touch/forum/discuzcode.htm
搜索
- <!--{if !$attach['price'] || $attach['payed']}-->
- <div id="attach_$attach[aid]" class="box attach mbn" >
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
- $attach[attachicon]
- <!--{/if}-->
- <!--{if !$attach['price'] || $attach['payed']}-->
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
- <!--{else}-->
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
- <!--{/if}-->
- <em class="xg1">($attach[attachsize])</em>
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
- </em>
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
- </div>
- <!--{/if}-->
复制代码
修改为:
- <div id="attach_$attach[aid]" class="box attach mbn" >
- <!--{if $_G['setting']['mobile']['mobilesimpletype'] == 0}-->
- $attach[attachicon]
- <!--{/if}-->
- <!--{if !$attach['price'] || $attach['payed']}-->
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode" target="_blank">$attach[filename]</a>
- <!--{else}-->
- <a href="forum.php?mod=misc&action=attachpay&aid=$attach[aid]&tid=$attach[tid]" target="_blank">$attach[filename]</a>
- <!--{/if}-->
- <em class="xg1">($attach[attachsize])</em>
- <em class="xg1"><br />({lang downloads}: $attach[downloads], $attach[dateline] {lang upload})
- </em>
- <!--{if !$attach['attachimg'] && $_G['getattachcredits']}--><p>{lang attachcredits}: $_G[getattachcredits]</p><!--{/if}-->
- </div>
-
复制代码
2.打开source/language/lang_message.php
搜索:
- 'attachment_buyall' => '本帖所有附件购买成功 ',
复制代码
下面添加:
- 'attachment_mobile_buy' => '附件购买成功',
复制代码
3.打开source/module/forum/forum_misc.php
搜索:
- if(count($aids) > 1) {
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
- } else {
- $_G['forum_attach_filename'] = $attach['filename'];
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
- }
复制代码
修改为:
- if(defined('IN_MOBILE')) {
- showmessage('attachment_mobile_buy', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
- } else {
- if(count($aids) > 1) {
- showmessage('attachment_buyall', 'forum.php?mod=redirect&goto=findpost&ptid='.$attach['tid'].'&pid='.$attach['pid']);
- } else {
- $_G['forum_attach_filename'] = $attach['filename'];
- showmessage('attachment_buy', "forum.php?mod=attachment&aid=$aidencode", array('filename' => $_G['forum_attach_filename']), array('redirectmsg' => 1));
- }
- }
复制代码
上传一个文件 到 template/default/touch/forum/attachpay.htm
附件下载通道1:
attachpay.zip
(1.11 KB, 下载次数: 0)
附件下载通道2:云盘下载 提取码:KAii |