我们打开帖子如果帖子里面有图片,鼠标移到图片上时弹出“下载附件”并保留“设为封面”等提示,有时候觉得看到很烦。那么下面我们来给大家说下如何去掉discuz! X3.2帖子图片弹出“下载附件”并保留“设为封面”等的方法!,修改前如下图:
用编辑器打开template/default/forum/discuzcode.htm文件
修改第258行,源码如下:
[color=rgb(51, 102, 153) !important]复制代码
修改为:
- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach[aid]" aid="$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{else}{$attach[url]}$attachthumb{/if}" inpost="1"{if $_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />
[color=rgb(51, 102, 153) !important]复制代码
修改第260行,源码如下:
- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" aid="$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"{if $_GET['from'] != 'preview'}{/if} />
[color=rgb(51, 102, 153) !important]复制代码
修改为:
- <img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach[aid]" aid="$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"{if $_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />
[color=rgb(51, 102, 153) !important]复制代码
删除第267行,源码如下:
- <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode¬humb=yes" target="_blank">{lang download}</a>
[color=rgb(51, 102, 153) !important]复制代码
修改后,如果后台->版块->编辑->扩展设置,没有开启图片列表模式,则鼠标移动到图片上时不会有任何提示。如果开启了图片列表模式,则鼠标移动到图片上时会显示“设为封面”。
如果任何时候鼠标移动到图片上时都不想有提示,只需删除258和260行中的即可
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
[color=rgb(51, 102, 153) !important]复制代码
如果商品贴等其他页面方法也基本类似,需要在该文件找到对应代码删除即可。欢迎大家补充修正。
|