技术控 发表于 2024-6-19 10:05:11

X3.5帖子中的图片,鼠标指到图片时提醒“下载附件”,如何去掉这个提示.ans

X3.5帖子中插入的图片,当鼠标经过指到图片时,提醒“下载附件”以及上传时间等,如何去除文字提醒?如下图所示:





X3.4版本是修改template/default/forum/discuzcode.htm文件,查找第258行,源代码如下:
<font size=&quot;3&quot;><img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class=&quot;attprice&quot;{/if} style=&quot;cursor:pointer&quot; id=&quot;aimg_$attach&quot; aid=&quot;$attach&quot; src=&quot;{STATICURL}image/common/none.gif&quot; onclick=&quot;zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G}')&quot; zoomfile=&quot;{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&nothumb=yes{else}{$attach}$attach{/if}&quot; file=&quot;{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach}$attachthumb{/if}&quot; inpost=&quot;1&quot;{if $_GET['from'] != 'preview'} onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if} /></font>
将上述代码最后一句
<font size=&quot;3&quot;>$_GET['from'] != 'preview'} onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if} /></font>
修改为:
<font size=&quot;3&quot;>$_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if}{/if} /></font>
以及修改第260行,源代码如下:
<font size=&quot;3&quot;><img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class=&quot;attprice&quot;{/if} id=&quot;aimg_$attach&quot; aid=&quot;$attach&quot; src=&quot;{STATICURL}image/common/none.gif&quot; zoomfile=&quot;{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes&nothumb=yes{else}{$attach}$attach{/if}&quot; file=&quot;{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach}$attach{/if}&quot; $widthcode id=&quot;aimg_$attach&quot; inpost=&quot;1&quot;{if $_GET['from'] != 'preview'} onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if} /></font>
最后一句代码:
<font size=&quot;3&quot;>$widthcode id=&quot;aimg_$attach&quot; inpost=&quot;1&quot;{if $_GET['from'] != 'preview'} onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if} /></font>
修改为:
<font size=&quot;3&quot;>$widthcode id=&quot;aimg_$attach&quot; inpost=&quot;1&quot;{if $_GET['from'] != 'preview'} {if $firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])}onmouseover=&quot;showMenu({'ctrlid':this.id,'pos':'12'})&quot;{/if}{/if} /></font>
并删除第267行源代码,如下:
<font size=&quot;3&quot;><a href=&quot;forum.php?mod=attachment{$is_archive}&aid=$aidencode&nothumb=yes&quot; target=&quot;_blank&quot;>{lang download}</a></font>


如果有第三方模板,在模板里找到该文件,同样的操作,就可以去掉“下载附件”字样。


X3.5这个文件看了,代码有点差异,不知道如何修改才能删除“下载附件”提醒,求指教!

来源:https://www.dismall.com/thread-22587-1-1.html
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: X3.5帖子中的图片,鼠标指到图片时提醒“下载附件”,如何去掉这个提示.ans