TIỆN ÍCH BÌNH LUẬN GẦN ĐÂY CHO BLOGSPOT

TIỆN ÍCH BÌNH LUẬN GẦN ĐÂY CHO BLOGSPOT


BƯỚC TIẾN HÀNH:

Bước 1 : Đăng Nhập Vào Blog -> Bố Cục -> Tạo một tiện ích HTML/Javascript tại nơi mà bạn muốn hiện.
Bước 2 : Dán đoạn code sau đây vào

<style type="text/css" scoped>.startinhit_recent li{display:block;clear:both;border: 1px solid #151515;overflow:hidden;list-style:none;max-height:150px;padding:3px!important;margin:3px 0;background:#151515}ul.startinhit_recent{max-height:320px;overflow:auto;list-style:none;margin:0;padding:0}.startinhit_recent li:hover{background:#111;border:1px solid #00BFF3!important}.avatarImage{padding:3px 10px 0 3px;float:left;position:relative;overflow:hidden}.startinhit_recent li span{margin-top:7px;color:#aaa;display:block;font-size:12px;line-height:1.4}</style>
<script type="text/javascript">var numComments=20,showAvatar=true,avatarSize=35,roundAvatar=false,characters=40,defaultAvatar="http://img1.blogblog.com/img/b16-rounded.gif",hideCredits=true;maxfeeds=50,adminBlog="";</script>
<script type="text/javascript">/*<![CDATA[*/function hp_d11(l){var j="",g=new Array(),k="",h=0;for(i=0;i<l.length;i++){c=l.charCodeAt(i);if(c<128){c=c^2}k+=String.fromCharCode(c);if(k.length>80){g[h++]=k;k=""}}j=g.join("")+k;return j}var numComments=numComments||5,avatarSize=avatarSize||60,characters=characters||40,defaultAvatar=defaultAvatar||"http://www.gravatar.com/avatar/?d=mm",moreLinktext=moreLinktext||" More &raquo;",showAvatar=typeof showAvatar==="undefined"?true:showAvatar,showMorelink=typeof showMorelink==="undefined"?false:showMorelink,roundAvatar=typeof roundAvatar==="undefined"?true:roundAvatar,hideCredits=hideCredits||false,maxfeeds=maxfeeds||50,adminBlog=adminBlog||"Kang Asep";function startinhit_recent(z){var w;w='<ul class="startinhit_recent">';ntotal=0;for(var x=0;x<maxfeeds;x++){var y,t,v,a;if(x==z.feed.entry.length){break}if(ntotal>=numComments){break}var l=z.feed.entry[x];for(var A=0;A<l.link.length;A++){if(l.link[A].rel=="alternate"){y=l.link[A].href}}for(var r=0;r<l.author.length;r++){t=l.author[r].name.$t;v=l.author[r].gd$image.src}if(t!=adminBlog&&ntotal<numComments){ntotal++;w+='<a href="'+y+'"><div>';w+="<li>";if(v.indexOf("/s1600/")!=-1){v=v.replace("/s1600/","/s"+avatarSize+"-c/")}else{if(v.indexOf("/s220/")!=-1){v=v.replace("/s220/","/s"+avatarSize+"-c/")}else{if(v.indexOf("/s512-c/")!=-1&&v.indexOf("http:")!=0){v="http:"+v.replace("/s512-c/","/s"+avatarSize+"-c/")}else{if(v.indexOf("blogblog.com/img/blank.gif")!=-1){if(defaultAvatar.indexOf("gravatar.com")!=-1){v=defaultAvatar+"&s="+avatarSize}else{v=defaultAvatar}}else{v=v}}}}if(showAvatar==true){if(roundAvatar==true){a="avatarRound"}else{a=""}w+='<div class="avatarImage '+a+'"><img class="'+a+'" src="'+v+'" alt="'+t+'" width="'+avatarSize+'" height="'+avatarSize+'"/></div>'}w+="<b>"+t+"</b>";var s=l.content.$t;var B=s.replace(/(<([^>]+)>)/gi,"");if(B!=""&&B.length>characters){B=B.substring(0,characters);B+="&hellip;";if(showMorelink==true){B+=""+moreLinktext+""}}else{B=B}w+="<span>"+B+"</span>";w+="</li></div></a>"}}w+="</ul>";var u="";if(hideCredits==true){u="display:none;"}w+='<span style="font-size:8px;display:block;text-align:right;display:none"><a href="http://www.startinhit.com" target="_blank">StarTinhIT</a><br><a href="http://www.startinhit.com/2017/06/tien-ich-binh-luan-gan-ay-cho-blogspot.html" target="_blank">Get this widget</a></span>';document.write(w)};/*]]>*/</script>
<script type="text/javascript" src="http://www.startinhit.com/feeds/comments/default?alt=json&amp;callback=startinhit_recent&amp;&amp;max-results=50"></script>
<span style="font-size:8px;display:block;text-align:right;display:none;"><a href="http://www.startinhit.com" target="_blank">StarTinhIT</a><br /><a href="http://www.startinhit.com/2017/06/tien-ich-binh-luan-gan-ay-cho-blogspot.html" target="_blank">Get this widget</a></span>
<a href="http://www.startinhit.com/p/binh-luan.html" style="
"><div style="text-align:center;border: 1px solid #00BFF3;background: #222;border-left:5px solid #00BFF3;border-right:5px solid #00BFF3;margin-top: 5px;padding:3px;color: #ddd;">Xem thêm bình luận</div></a>
  • http://startinhit.com thành địa chỉ blog của bạn
  • http://startinhit.com/p/comments.html thành url trang bình luận của bạn
Bước 4: Bấm Lưu

Thế là xong, Chúc các bạn thành công!
Nguồn: Star Tuấn
Share: