夜间模式
🌓黑暗模式

 找回密码
 立即注册
搜索
热搜: discuz sclub 夜读
查看: 1293|回复: 0

Discuz 去掉帖子图片弹出“下载附件”和“设为封面”的提示

[复制链接]
  • TA的每日心情
    擦汗
    2023-7-12 20:55
  • 签到天数: 8 天

    连续签到: 8 天

    [LV.3]偶尔看看II

    86

    主题

    3

    回帖

    2298

    积分

    管理员

    积分
    2298

    活跃会员热心会员灌水之王突出贡献

    发表于 2022-3-27 16:00:16 | 显示全部楼层 |阅读模式

    1、打开template→default→forum→discuzcode.htm模板文件,查找:

    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} />
    复制代码


    修改为:

    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'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />
    复制代码


    2、继续查找:

    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} />
    复制代码


    修改为:

    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'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if}{/if} />
    复制代码


    3、最后查找:

    1. <a href="forum.php?mod=attachment{$is_archive}&aid=$aidencode&#172;humb=yes" target="_blank">{lang download}</a>
    复制代码


    把代码删除。

    4、如果板块开启图片列表模式,鼠标移动到图片上时会还显示“设为封面”。如果任何时候鼠标移动到图片上时都不想再有提示,查找:

    1. onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
    复制代码


    有两处,把代码删除即可。




    上一篇:Discuz 主题的域名简化
    下一篇:Discuz 解决后台管理无法登入 点击登录直接刷新
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    返回顶部 返回列表
    正在加载中……