Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] 附件下载去弹出积分扣除提示+新页面下载【非常多人都需要的】

[复制链接]
KV2005AAA 发表于 2010-4-19 19:18:14 | 显示全部楼层 |阅读模式
插件发布
插件名称: 附件下载去弹出积分扣除提示+新页面下载【非常多人都需要的】
插件来源:
适用版本: Discuz! 7.2
语言编码: GBK简体 
最后更新时间:
插件作者: me
插件简介: http://www.kasperskybuy.com/
非常多人都需要的,找了老半天,数量很多,大同小异,都存在严重问题,找的实在太辛苦了

这些插件也存在严重的问题

https://discuz.dismall.com/viewthread.php?tid=1535708
这个弹出的积分扣除提示,在某些浏览器之下需要重复点很多次才可以

https://discuz.dismall.com/viewthread.php?tid=1616170
这个down.htm里面的代码存在问题

所以综合了它们的优缺点修改完成,直接点附件不弹出积分扣除提示,新页面点即可下载

教大家方法


打开attachment.php
查找:
$redirectcredit = TRUE;
在下一行添加:
$attachcredits .= $extcredits[$creditid]['title'].' '.abs($v).' '.$extcredits[$creditid]['unit'].' ';



查找:
dheader('location: misc.php?action=attachcredit&aid='.$attach['aid'].'&formhash='.FORMHASH);
替换为:
include template('down');

关闭保存文件。


打开/templates/default/discuzcode.htm

查找:
{if !$attach['attachimg'] && $GLOBALS[attachcredits]}{/if}
以及
{if $GLOBALS[attachcredits]}{/if}
都删除。


新建一个文件,命名为down.htm

{subtemplate header}
<div id="wrap" class="wrap s_clear"><div class="main"><div class="content nofloat">
  <div class="fcontent alert_win">
   <h3 class="float_ctrl"><em>$bbname {lang board_message}</em></h3>
   <hr class="shadowline" />
   <div class="postbox"><div class="alert_info">
    <p class="alert_btnleft">下载一次将扣除一个金币, <a href="tg.php" target="_blank"><font color=000000>点此查看您的金币数</font></a></p>
    <p class="alert_btnleft">您也可以先查看或参与对该资料的讨论,  <a href="viewthread.php?tid=$attach['tid']" target="_blank"><font color="000000">点此进入</font></a></p>
    <p class="alert_btnleft">文件名称: <b> $attach['filename']</b></p>
   </div>
<p class="alert_btnleft">
此处可加上你的广告代码!!
</p>
  <p class="alert_btnleft">下载次数: $attach['downloads']</p>
  <p class="alert_btnleft"><a href="misc.php?action=attachcredit&aid=$attach['aid']&formhash={FORMHASH}" target="_blank"><font color="000000">点此下载</font></a></p>
  </div>
</div>  
</div></div></div>

{subtemplate footer}


上传到 templates/default/  

完成





滚骨碌 发表于 2010-4-19 23:10:31 | 显示全部楼层
回复

使用道具 举报

个性马甲 发表于 2010-4-19 23:11:32 | 显示全部楼层
回复

使用道具 举报

玮玮来啦 发表于 2010-4-27 13:29:04 | 显示全部楼层
楼主最好来个图,更为直观的可以看到效果,另外咨询一下楼主,Google Adsens的广告代码可以添加吗?
回复

使用道具 举报

shire2008 发表于 2010-9-2 23:56:23 | 显示全部楼层
大家可以看看我的
回复

使用道具 举报

hldjxhf 发表于 2010-9-4 13:53:29 | 显示全部楼层
回复

使用道具 举报

zz26418264 发表于 2012-1-14 13:45:55 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

c9c9gua 发表于 2012-1-14 14:40:16 | 显示全部楼层
这个可以有。      
回复

使用道具 举报

abcnic 发表于 2012-1-14 15:01:57 | 显示全部楼层
看看呢 呵呵
回复

使用道具 举报

请叫我天天 发表于 2012-1-14 15:19:01 | 显示全部楼层
支持一个~

印象网社区,全球最大中文论坛
http://bbs.yinxiangzg.cn/sittemap.php
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-18 18:01 , Processed in 0.122028 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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