实现dz3论坛全站图片alt属性,引爆SEO关键字排名!
百度搜索引擎优化指南中明确了一个网的图片alt是很重要的一部分,做好图片的seo关键字alt属性是至关重要的!之前发步过 请务必查看!
本贴简单的教您实现全站附件图片alt属性!设置你的seo关键字,引爆SEO优化排名!
首先请大家打开/template/default/forum/discuzcode.htm
查找如下代码:
<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach" aid="$attach" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G}')" zoomfile="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach}$attach{/if}" file="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach}$attachthumb{/if}" inpost="1"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />添加代码:
<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} style="cursor:pointer" id="aimg_$attach" aid="$attach" src="{STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G}')" zoomfile="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach}$attach{/if}" file="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode{else}{$attach}$attachthumb{/if}" inpost="1"{if $_GET['from'] != 'preview'} alt="$attach" title="$attach" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />就是在里面添加了代码:
alt="$attach" title="$attach"再查找:
<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach" aid="$attach" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach}$attach{/if}" file="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach}$attach{/if}" $widthcode id="aimg_$attach" inpost="1"{if $_GET['from'] != 'preview'} onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />修改为:
<img{if $attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']} class="attprice"{/if} id="aimg_$attach" aid="$attach" src="{STATICURL}image/common/none.gif" zoomfile="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes¬humb=yes{else}{$attach}$attach{/if}" file="{if $attach}forum.php?mod=attachment{$is_archive}&aid=$aidencode&noupdate=yes{else}{$attach}$attach{/if}" $widthcode id="aimg_$attach" inpost="1"{if $_GET['from'] != 'preview'} alt="$attach" title="$attach" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"{/if} />这样就好了。。
很简单吧!!
觉得好请给个回复吧!
注明:本教程不提供技术支持,修改前请保存原文件,出现错误本人不承担责任。
页:
[1]