zblog评论修改加锚文本方法-温州SEO技术博客       var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20626191-1']); _gaq.push(['_trackPageview']);(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNodeinsertBefore(ga, s); })();       温州SEO 温州企业网站建设 温州SEO建站 温州SEO基础 温州SEO工具 温州SEM营销 温州SEO杂记    当前位置:温州SEO >>温州SEO建站 > 正文           zblog评论修改加锚文本方法     看到别人博客评论可以使用锚文本,自己也想实现这样的方法,但默认的评论只显示网址而且还有跳转,让人不爽,不过今天终于解决了zblog评论的修改加锚文本的问题。虽然大家都说博客评论对排名作用越来越小,还加了rel="nofollow"不能带去权重,但有总比没有好,而且还有众多SEOER们热衷于评论,而评论加锚文本无疑能更好的带动博友评论的积极性。另zblog留言加锚文本方法和评论是通用的。

   核心方法:通过修改zblog评论模板实现。

   找到b_article_comment.html

   /THEMES/default/TEMPLATE/b_article_comment.html

   使用Dreamweaver打开,原内容如下

<div class="msgname" id="cmt<#article/comment/id#>"><span><#article/comment/count#> #</span><#article/comment/name#></div><div class="msgarticle">  <span class="Gravatar"><img src="http://www.gravatar.com/avatar/<"color: #0000ff"><#article/comment/url#></a></span>  <#article/comment/posttime#> <a href="#posttop" onclick="RevertComment('<#article/comment/id#>')">【REPLY】</a></div>

   红色所示是评论名称,蓝色所示是评论时所留的URL,搞清楚这两个重要概念就好办了,就可以从这里下手,是不是不用再向下说聪明的你已知道怎么修改了吧。

   方法:删除蓝色所示一行语句 <a href="<#article/comment/urlencoder#>" rel="nofollow" target="_blank"><#article/comment/url#></a>  这句

   重写代码  <a href="<#article/comment/url#>" rel="nofollow" target="_blank"><#article/comment/name#></a> 替换掉红色语句,这样就实现评论带锚文本了。

   修改完好的的代码为:

<div class="msgname" id="cmt<#article/comment/id#>"><span><#article/comment/count#> #</span><a href="<#article/comment/url#>" rel="nofollow" target="_blank"><#article/comment/name#></a></div><div class="msgarticle">  <span class="Gravatar"><img src="http://www.gravatar.com/avatar/<'<#article/comment/id#>')">【REPLY】</a></div>

   接将以上内容替换b_article_comment.html里内容就行了,替换前请备份,以防万一还原即可。效果见温州SEO文章评论。

   还有一种格式代码如下,效果一样就是排版有点区别,本博目前使用此格式 ,自己试一下就知:<div class="msgname" id="cmt<#article/comment/id#>"><span><#article/comment/count#> #</span><a href="<#article/comment/url#>" rel="nofollow" target="_blank"><#article/comment/name#></a> <#article/comment/posttime#> <a href="#posttop" onclick="RevertComment('<#article/comment/id#>')">【回复该留言】</a></div><div class="msgarticle">  <span class="Gravatar"><img src="http://www.gravatar.com/avatar/<#article/comment/emailmd5#>?d=monsterid&r=g" alt="<#article/comment/name#>" /></span>  <span class="Gcontent"><#article/comment/content#></span></div>

 做好这些请重建文件。

 

 本文链接:http://www.167h.com/jz/201104/78.html

 发布:温州网站优化 ┊ 已有: strBatchCount+="spn78=78," 人围观 | 发表时间:2011-4-11

 好文章要分享:   大家正在看:  温州SEO:ZBLOG-修改留言内容心诺Sean_Cms主题模板的seo优化zblog程序301永久重定向的方法网站图标favicon.ico-美化提升你的网站如何制作网站favicon.ico图标Z-Blog文章评级插件sean_digg,导致广告跑位原因Sean_Cms模板修改方法!在哪里改?    【 已经有(8)位网友发表了评论,你也评一评吧!点我写评语!】 8 # 2011-8-12 14:42:10 【回复该留言】   谢谢分享  7 # 2011-4-12 8:43:23 【回复该留言】   wp都是默认有no follow的。  6 # 2011-4-12 0:26:01 【回复该留言】   我是用的wordress呵呵,这个暂时不需要,谢谢博主分享  5 #温州SEO 2011-4-11 22:20:37 【回复该留言】   谢谢提醒,可能是因为使用子目录,有时会出现打不开现像  4 # 2011-4-11 21:52:26 【回复该留言】   你的网站好像不太稳定哦!!  3 # 2011-4-11 15:16:44 【回复该留言】   学习了,www.huiyunseo.com 这个站也是用zblog做的  2 # 2011-4-11 2:45:17 【回复该留言】   这是个不错的方法,值得一试  1 # 2011-4-11 0:43:13 【回复该留言】   虽然不能传递权重,但是用户体验,提升PV是很有帮助的。     ◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

      名称(*)

  邮箱

  网站链接

 正文(*)(留言最长字数:1000)   

 

   记住我,下次回复时不用重新输入个人信息

  LoadRememberInfo();    广告宣传       置顶推荐   strBatchInculde+="mod_randomsortallrand=randomsortallrand,"   本类更新   strBatchInculde+="ulCategory=sean_category_2,";   最新评论   strBatchInculde+="mod_comments=comments,"   随便机文章   strBatchInculde+="mod_randomsortallrand=randomsortallrand,"       温州SEO优化 | 温州企业网站建设 | 温州SEO博客|  |  |