友声网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
开启左侧

Discuz! X3,去掉帖子图片弹出提示框的方法

[复制链接]
admin 发表于 2018-7-6 22:11 | 显示全部楼层 |阅读模式
访问帖子取消鼠标移到图片上时弹出“下载附件”并保留“设为封面”的提示修改前如下图:


方法一:
用编辑器打开template/default/forum/discuzcode.htm文件
修改第258行,源码如下:
  1. <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" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G[setting][showexif]}')" 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"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />
复制代码

修改为:
游客,如果您要查看本帖隐藏内容请回复

修改第260行,源码如下:
  1. <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&#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"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />
复制代码

修改为:
游客,如果您要查看本帖隐藏内容请回复

删除第267行,源码如下:
游客,如果您要查看本帖隐藏内容请回复

修改后,如果后台->版块->编辑->扩展设置,没有开启图片列表模式,则鼠标移动到图片上时不会有任何提示。
如下图:
未开启图片列表模式:


开启图片列表模式:(多一个设为封面功能)


方法二:
如果任何时候鼠标移动到图片上时都不想有提示(开启开启图片列表模式也不想有),只需删除258和260行中的:
游客,如果您要查看本帖隐藏内容请回复


本站使用 :
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

x
卡卡北 发表于 2023-2-23 12:03 | 显示全部楼层
Discuz! X3.4 R20230210,依旧有效!

RSS|无图版|手机版|友声网 ( 鲁ICP备15020090号-1 )|网站地图 | 点击这里给我发消息 |

GMT+8, 2024-4-20 22:44 , Processed in 0.148239 second(s), 7 queries , MemCache On.

Powered by Discuz! X

© ys166.com

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