【原创】教您如何让上传的帖子图片自动加上帖子标题,让搜索引擎读取图片内容说明-Discuz教程下载

【原创】教您如何让上传的帖子图片自动加上帖子标题,让搜索引擎读取图片内容说明

开通本站Svip会员,全站资源免费下
【原创】教您如何让上传的帖子图片自动加上帖子标题,让搜索引擎读取图片内容说明

修改前:
2.png

修改后:
3.png

1、进入网站根目录——template——default 或当前模板——forum找到Discuzcode文件
2、打开discuzcode文件搜索代码
  1.   <!--{if $_G['setting']['thumbstatus'] && $attach['thumb']}-->
  2.   <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} />
  3.   <!--{else}-->
  4.   <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} />
复制代码
3、将代码修改为
亲爱的游客您好,请 登录 后进行 回复


相关教程
【原创】修改DZ门户文章默认字体大小及颜色。
【原创】教你如何将DZ门户文章图片自动居中且自动加上标题为图片alt标签、title标签
【原创】如何给DZ门户文章内容页的标题添加当前文章链接
【原创】教您如何修改DZ论坛帖子的图片自动居中,无需自行设置居中
【原创】教您如何让上传的帖子图片自动加上帖子标题,让搜索引擎读取图片内容说明
【原创】手把手教您如何删除鼠标指向图片出现的上传,下载附件等表框


全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部