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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] 去掉附件下载提示 X2.0 X2.5 X3 X3.1 20150603已更新

  [复制链接]
babyfacer 发表于 2012-5-10 15:51:40 | 显示全部楼层 |阅读模式
本帖最后由 babyfacer 于 2015-6-3 15:12 编辑

这个很烦人呀,干掉他

【教程】DZX3 X2.5去掉图片附件 图片名称(非alt描述)和下载次数
https://discuz.dismall.com/thread-3466261-1-1.html

【版主勿删,其他版块不方便发教程】



演示地址:http://www.chinagirlol.cc/forum-66-1.html

20150603更新(真的X3和X3.1):

\template\***\forum\discuzcode.htm
删除以下代码:
游客,如果您要查看本帖隐藏内容请回复


之前的方法都是针对X2.0的 有一个弊端,完全删除了附件的所有提示,这样,会导致无法正常使用 设为封面 功能。2012 0529 在cr180大佬的帮助下,有了针对X2.5的修改方法,当然,如果你觉得那个 设为封面 功能 可要可不要的话,也可以用下面的第二种方法

花了一晚上才弄出来的,别只看帖不回帖呀。多多支持一下呗

同时帮cr180大佬宣传一下,超级站长,非常棒的工具,建站必备


Discuz超级管家 V2.0激进版 云采集/云专题/云排版/超级伪静态/超级重定向
https://discuz.dismall.com/thread-2763167-1-1.html



修改方法【下面提供了懒人包,针对X2.5的(到目前为止的X2.5的各个版本都可以)】:
  1. \template\default\forum\discuzcode.htm
复制代码
第一种:

第一处:

查找:
  1. <div class="tip tip_4 aimg_tip" id="aimg_$attach[aid]_menu" style="position: absolute; display: none">
复制代码
20121101版本的话查找:
  1. <div class="tip tip_4 aimg_tip" id="aimg_$attach[aid]_menu" style="position: absolute; display: none" disautofocus="true">
复制代码
修改为:
  1. <div {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}class="tip tip_4 aimg_tip" id="aimg_$attach[aid]_menu" {/if}style="position: absolute; display: none">
复制代码
第二处:

查找:
  1.        <div class="tip_c xs0">
  2.                                         <div class="y">$attach[dateline] {lang upload}</div>
  3.                                         <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode&#172;humb=yes" title="$attach[filename] {lang downloads}:$attach[downloads]" target="_blank"><strong>{lang download}</strong> <span class="xs0">($attach[attachsize])</span></a>
  4.                                         <!--{if $attach[description]}-->
  5. $attach[description]<!--{/if}-->
  6.                                         <!--{if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}-->
复制代码
修改为(去掉了中间几行):
  1.     <div class="tip_c xs0">
  2.                                         <!--{if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}-->
复制代码
第三处:

查找:


  1. <a href="forum.php?mod=ajax&action=setthreadcover&aid=$attach[aid]&fid=$_G[fid]" onclick="showWindow('setcover{$attach[aid]}', this.href)">{lang set_cover}</a>
复制代码
修改为(去掉前面的<br />):
  1. <a href="forum.php?mod=ajax&action=setthreadcover&aid=$attach[aid]&fid=$_G[fid]" onclick="showWindow('setcover{$attach[aid]}', this.href)">{lang set_cover}</a>
复制代码
第二种:

X2-X2.5修改方法:  删除:一共2个位置
  1. onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
复制代码
查找:
  1.     <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'))" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&#172;humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach[url]}$attachthumb{/if}" inpost="1" alt="$attach[imgalt]" title="$attach[imgalt]" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" />
  2.                         <!--{else}-->
复制代码
改成:
  1.     <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'))" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&#172;humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach[url]}$attachthumb{/if}" inpost="1" alt="$attach[imgalt]" title="$attach[imgalt]"  />
  2.                         <!--{else}-->
复制代码
查找:
  1. <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&#172;humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach[url]}$attach[attachment]{/if}" $widthcode id="aimg_$attach[aid]" inpost="1" alt="$attach[imgalt]" title="$attach[imgalt]" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" />
复制代码
改成:
  1.     <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&#172;humb=yes{else}{$attach[url]}$attach[attachment]{/if}" file="{if $attach[refcheck]}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach[url]}$attach[attachment]{/if}" $widthcode id="aimg_$attach[aid]" inpost="1" alt="$attach[imgalt]" title="$attach[imgalt]"  />
复制代码
之所以收费,完全是为了挣钱升级,我是守财奴,娃哈哈。其实建议你自己改,真的很EASY的
游客,如果您要查看本帖隐藏内容请回复


其他教程:

真正正确的官方主帖下方的“更多”分享按钮 修改方法 支持DZX2 X2.5
https://discuz.dismall.com/thread-2481632-1-1.html

linux,IIS,WIN主机,虚拟主机,Nginx主机DZX2.5 X2伪静态规则文件下载 教程
https://discuz.dismall.com/thread-2489176-1-1.html


【ChinaGirl】仿19楼 帖内游客注册提醒/QQ/新浪微博账号登陆 For 7.2/X2/X2.5
https://discuz.dismall.com/thread-2617671-1-1.html


DZX2.0~DZX2.5友情链接横排显示,图片带描述文字友情链接横排显示
https://discuz.dismall.com/thread-2668687-1-1.html


【DZ教程之备份数据】利用帝国备份王备份数据库,搬家教程
https://discuz.dismall.com/thread-2743633-1-1.html









本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

评分

3

查看全部评分

 楼主| babyfacer 发表于 2012-5-10 15:55:12 | 显示全部楼层
没人支持我,我自己来
回复

使用道具 举报

亳州类 发表于 2012-5-10 17:22:51 | 显示全部楼层
我来支持了
回复

使用道具 举报

 楼主| babyfacer 发表于 2012-5-10 17:28:11 | 显示全部楼层
亳州类 发表于 2012-5-10 17:22
我来支持了

谢谢啦
回复

使用道具 举报

hi.boyfriend 发表于 2012-5-10 17:44:29 | 显示全部楼层
这个挺烦的..!!
回复

使用道具 举报

蜡笔小丸子 发表于 2012-5-11 08:06:04 | 显示全部楼层
好东西要顶起来,嘿嘿。
回复

使用道具 举报

落水有情 发表于 2012-5-11 08:07:40 | 显示全部楼层
謝謝,希望以後多些
回复

使用道具 举报

 楼主| babyfacer 发表于 2012-5-11 09:19:04 | 显示全部楼层
蜡笔小丸子 发表于 2012-5-11 08:06
好东西要顶起来,嘿嘿。

谢谢啦
回复

使用道具 举报

aliasjian 发表于 2012-5-11 09:33:31 | 显示全部楼层
感谢分享,楼主的站点很好,推荐去看看
回复

使用道具 举报

hostbrian 发表于 2012-5-11 09:45:46 | 显示全部楼层
不错 支持!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 05:46 , Processed in 0.375051 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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