DZX3 X2.5去掉图片附件 图片名称(非alt描述)和下载次数

来自:互联网
时间:2018-08-27
阅读:

涉及文件:templatedefaultforumdiscuzcode.htm

X3的最新修改方法:

查找:

<p><strong>$attach[filename]</strong> <em class="xg1">($attach[attachsize], {lang downloads}: $attach[downloads])</em></p>

将其删除或者注释掉

查找:

<p class="xg1 y">$attach[dateline] {lang upload}</p>

将其删除或者注释掉(这里你还可以改成其他的样式,也会很好看)

X2.5/X3的方法(这个方法能保证删除这些信息之后还能人工设置封面):

1.查找:

<div class="tip tip_4 AImg_tip" id="aimg_$attach[aid]_menu" style="position: absolute; display: none">

X3 20121101版本查找:

<div class="tip tip_4 aimg_tip" id="aimg_$attach[aid]_menu" style="position: absolute; display: none" disautofocus="true">

修改为:

<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">

2.查找:

<div class="tip_c xs0">
<div class="y">$attach[dateline] {lang upload}</div>
<a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode¬humb=yes" title="$attach[filename] {lang downloads}:$attach[downloads]" target="_blank"><strong>{lang download}</strong> <span class="xs0">($attach[attachsize])</span></a>
<!--{if $attach[description]}--><br />$attach[description]<!--{/if}-->
<!--{if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}-->

删除中间几行,效果如下:

<div class="tip_c xs0">
<!--{if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}-->

3.查找:

<br /><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 />

针对X2和X2.5的,删除:

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¬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'})" />
                        <!--{else}-->

改成:

<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¬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]"  />
                        <!--{else}-->

2.查找:

<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¬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'})" />

改成:

<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¬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]"  />
返回顶部
顶部