Để tạo một Recent Comments "Hay Thêm Widget bình luận mới blogger"Cho Blogspot cho blogspot các bạn làm như sau :
1. Đăng Nhập Vào Tài Khoản Blogger
2. Vào Edit HTML
/* Bình Luận Mới Nhất By vungve.com */
ul.idbcomments{list-style:none;margin:0;padding:0}.idbcomments li{display:block;clear:both;overflow:hidden;list-style:none;border-bottom:0!important;word-break:break-all;padding:8px 0!important}.idbcomments li .avatarImage{float:left;margin-right:10px;position:relative;overflow:hidden}.idbcomments li img{border-radius:100%;position:relative;overflow:hidden;display:block;width:42px;height:42px}.idbcomments li a{font-weight:700}.idbcomments li span{margin-top:2px;color:#666;display:block;font-size:12px;line-height:1.4}
<script type="text/javascript">5. Lưu Lại Và Xem Kết Quả . Chúc Các Bạn Thành Công
//<![CDATA[
// Recent Comments by vungve.com
function idbcomments(a){var e;e='<ul class="idbcomments">';for(var t=0;numComments>t;t++){var r,o,n,i;if(t==a.feed.entry.length)break;e+="<li>";for(var d=a.feed.entry[t],s=0;s<d.link.length;s++)"alternate"==d.link[s].rel&&(r=d.link[s].href);for(var l=0;l<d.author.length;l++)o=d.author[l].name.$t,n=d.author[l].gd$image.src;n=-1!=n.indexOf("/s1600/")?n.replace("/s1600/","/s"+avatarSize+"-c/"):-1!=n.indexOf("/s220/")?n.replace("/s220/","/s"+avatarSize+"-c/"):-1!=n.indexOf("/s512-c/")&&0!=n.indexOf("http:")?"http:"+n.replace("/s512-c/","/s"+avatarSize+"-c/"):-1!=n.indexOf("blogblog.com/img/b16-rounded.gif")?"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMJLNogd4LzOfCZKJhEemId3paJ3Ssg6Mb6HC43xMTxB4vMChONPICzINBUSe7rm0uKMhITXP-Puwy3LdlMgTkdjSOJYlSPlKrBUyllOk44yvFKLEvksVXFeWi99IgQ-_R_77nXdt_fLEB/"+avatarSize+"/blogger.png":-1!=n.indexOf("blogblog.com/img/openid16-rounded.gif")?"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSnB_M6e_HBtFSxirCvgYqlvom7WWzf95o2O5dfRM88bcqJnWpT5-9GL1tYEVKMhmt155FOkCrE1d6fW-wBcraFF7cexQT_XnP9Y706kWIYbaN5cEPcMIyCTJGTwm6CNwWeWjfWbERxqUm/"+avatarSize+"/openid.png":-1!=n.indexOf("blogblog.com/img/blank.gif")?-1!=defaultAvatar.indexOf("gravatar.com")?defaultAvatar+"&s="+avatarSize:defaultAvatar:n,1==showAvatar&&(i=1==roundAvatar?"avatarRound":"",e+='<div class="avatarImage '+i+'"><img class="'+i+'" src="'+n+'" alt="'+o+'" width="'+avatarSize+'" height="'+avatarSize+'"/></div>'),e+='<a href="'+r+'">'+o+"</a>";var A=d.content.$t,v=A.replace(/(<([^>]+)>)/gi,"");""!=v&&v.length>characters?(v=v.substring(0,characters),v+="…",1==showMorelink&&(v+='<a href="'+r+'">'+moreLinktext+"</a>")):v=v,e+="<span>"+v+"</span>",e+="</li>"}e+="</ul>";var c="";0==hideCredits&&(c="display:block;"),e+="",document.write(e)}var numComments=7,showAvatar=!0,avatarSize=42,roundAvatar=!0,characters=40,showMorelink=!1,defaultAvatar="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIgkNJFueg82Kxu6DX9OR8mUxrUCXjwLw06oGnx8PNd7q8_80HSNNV9NZIWFA8wRXpUReQupi425bhoW_K9JKQx0NOO2IaflRC-KrmSIAzihoVhmjC6eurHfaHNa5a-3WAMj6jPPrVO5J7/s1600/noimage.png",hideCredits=!0,numComments=numComments||5,avatarSize=avatarSize||60,characters=characters||40,defaultAvatar=defaultAvatar||"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIgkNJFueg82Kxu6DX9OR8mUxrUCXjwLw06oGnx8PNd7q8_80HSNNV9NZIWFA8wRXpUReQupi425bhoW_K9JKQx0NOO2IaflRC-KrmSIAzihoVhmjC6eurHfaHNa5a-3WAMj6jPPrVO5J7/s1600/noimage.png",moreLinktext=moreLinktext||" More »",showAvatar="undefined"==typeof showAvatar?!0:showAvatar,showMorelink="undefined"==typeof showMorelink?!1:showMorelink,roundAvatar="undefined"==typeof roundAvatar?!0:roundAvatar,hideCredits="undefined"==typeof hideCredits?!1:roundAvatar;
//]]>
</script>
<script type="text/javascript" src="/feeds/comments/default?alt=json&callback=idbcomments&max-results=7"></script>
1 Nhận xét
kiểu này phù hợp với tất cả các trang nhé. để lại comment để được chỉ dẫn chi tiết hơn nếu mắc lỗi. !
Trả lờiXóaNhập nội dung