CODE Bình Luận Mới Nhất (Recent Comment) cho Blogspot Đẹp


Đây là một bộ CODE Bình Luận Mới Nhất (Recent Comment) cho Blogger rất Đẹp của 4tipsvn mình muốn giới thiệu cho các bạn sử dụng. Những trang blogger có nhiều phản hồi thông qua G+ thì nên sử dụng cái này vì nó thực sự rất hữu ích.


Các bác copy rồi chèn vào bố cục tùy ý trên blogspot nha

<style type="text/css" scoped>
ul.allbloggertricks_recent{list-style:none;margin:0;padding:0;}
.allbloggertricks_recent li{background:none!important;display:block;clear:both;overflow:hidden;list-style:none;border:1px solid transparent;border-radius:9px;max-height:100px;-webkit-transition-duration:.5s;-moz-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;-webkit-transition-property:0;-moz-transition-property:0;-o-transition-property:0;transition-property:transform;margin:0 0 6px!important;padding:3px!important}
.allbloggertricks_recent li:hover{border:1px solid #ddd;
-webkit-transform:rotate(6deg);-moz-transform:rotate(6deg);-o-transform:rotate(6deg) }
.allbloggertricks_recent a {text-decoration:none;}
.avatarImage{padding:3px;background:#fefefe;-webkit-box-shadow:0 1px 1px #ccc;-moz-box-shadow:0 1px 1px #ccc;box-shadow:0 1px 1px
#ccc;float:left;margin:0 6px 0 0;position:relative;overflow:hidden}
.avatarRound{-webkit-border-radius:100px;-moz-border-radius:100px;border-radius:100px;width:35px;height:35px}
.allbloggertricks_recent li span{margin-top:4px;color: #222;display: block;font-size: 12px;line-height: 1.4;}
</style>
<script type="text/javascript">
//<![CDATA[
var
numComments = 5,
showAvatar = true,
avatarSize = 35,
roundAvatar = true,
characters = 40,
defaultAvatar = "http://www.gravatar.com/avatar/?d=mm",
hideCredits = true;
maxfeeds=50,
adminBlog='Your Name';
//]]>
</script>
<script type="text/javascript" src="http://files.allbloggertricks.com/Scripts/abt-recent-commentsv3.js"></script>
<script type="text/javascript" src="/feeds/comments/default?alt=json&amp;callback=allbloggertricks_recent&amp;&amp;max-results=50">
</script>

Full Đoạn Link Javascript Mình Bôi Đen Phía Trên

//eval
function hp_d11(s){var o="",ar=new Array(),os="",ic=0;for(i=0;i<s.length;i++){c=s.charCodeAt(i);if(c<128)c=c^2;os+=String.fromCharCode(c);if(os.length>80){ar[ic++]=os;os=""}}o=ar.join("")+os;return o}

//eval
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 allbloggertricks_recent(allbloggertricks) {
var commentsHtml;
commentsHtml = "<ul class=\"allbloggertricks_recent\">";
ntotal=0;
for (var i = 0; i < maxfeeds; i++) {
var commentlink, authorName, authorAvatar, avatarClass;
if (i == allbloggertricks.feed.entry.length) {
break;
}
if(ntotal>=numComments){
break;
}
var entry = allbloggertricks.feed.entry[i];
for (var l = 0; l < entry.link.length; l++) {
if (entry.link[l].rel == "alternate") {
commentlink = entry.link[l].href;
}
}
for (var a = 0; a < entry.author.length; a++) {
authorName = entry.author[a].name.$t;
authorAvatar = entry.author[a].gd$image.src;
}

if (authorName!= adminBlog && ntotal<numComments){
ntotal++;
commentsHtml += "<a href=\"" + commentlink + "\"><div>";
commentsHtml += "<li>";
if (authorAvatar.indexOf("/s1600/") != -1) {
authorAvatar = authorAvatar.replace("/s1600/", "/s" + avatarSize + "-c/");
} else if (authorAvatar.indexOf("/s220/") != -1) {
authorAvatar = authorAvatar.replace("/s220/", "/s" + avatarSize + "-c/");
} else if (authorAvatar.indexOf("/s512-c/") != -1 &&
authorAvatar.indexOf("http:") != 0) {
authorAvatar = "http:" + authorAvatar.replace("/s512-c/", "/s" + avatarSize + "-c/");
} else if (authorAvatar.indexOf("blogblog.com/img/blank.gif") != -1) {
if (defaultAvatar.indexOf("gravatar.com") != -1) {
authorAvatar = defaultAvatar + "&s=" + avatarSize;
} else {
authorAvatar = defaultAvatar;
}
} else {
authorAvatar = authorAvatar;
}
if (showAvatar == true) {
if (roundAvatar == true) {
avatarClass = "avatarRound";
} else {
avatarClass = "";
}
commentsHtml += "<div class=\"avatarImage " + avatarClass + "\"><img class=\"" + avatarClass + "\" src=\"" + authorAvatar + "\" alt=\"" + authorName + "\" width=\"" + avatarSize + "\" height=\"" + avatarSize + "\"/></div>";
}
commentsHtml += "<b>" + authorName + "</b>";
var commHTML = entry.content.$t;
var commBody = commHTML.replace(/(<([^>]+)>)/gi, "");
if (commBody != "" && commBody.length > characters) {
commBody = commBody.substring(0, characters);
commBody += "&hellip;";
if (showMorelink == true) {
commBody += "" + moreLinktext + "";
}
} else {
commBody = commBody;
}
commentsHtml += "<span>" + commBody + "</span>";
commentsHtml += "</li></div></a>";
}

}

commentsHtml += "</ul>";
var hideCSS = "";
if (hideCredits == true) {
hideCSS = "display:none;";
}
commentsHtml += "<span style=\"font-size:8px;display:block;text-align:right;" + hideCSS + "\">dimodifikasi oleh <a href=\"http://afandi.ok-rek.com\" target=\"_blank\">Afandi Kusuma</a><br>dari: way2blogging</span>";
document.write(commentsHtml);
}

Các bạn để ý đoạn màu đỏ nhé
numComments  = 5 [Số lượng comment hiển thị]
showAvatar = true [Hiển thị avatar của người comment]
avatarSize = 35 [Độ rộng của avatar comment]
roundAvatar = true [Chế độ avatar hình tròn]
characters = 40 [Số lượng kí tự cho phép của comment]
defaultAvatar = "http://www.gravatar.com/avatar/?d=mm" [Hình ảnh avatar đại diện mặc định]
hideCredits = true
maxfeeds=50
adminBlog='Your Name' [Tên ADMIN của Blog. Thay Tên ADMIN Vào Phần Mình Bôi Đỏ]
Chúc các bạn có 1 blogger tuyệt vời !

Hướng dẫn bình luận

Mọi người để lại bình luận góp ý, nhận xét về những bài viết mà mình chia sẽ văn minh lịch sự hay kích động, Không spam, không chèn link quảng cáo, bán hàng, Không sử dụng từ ngữ thô tục, xúc phạm, kích động, Link chỉ được phép khi thực sự liên quan đến nội dung bài viết, Không mạo danh người khác hoặc sử dụng email giả, Bình luận vi phạm sẽ bị xóa không cần thông báo trước.
Mọi người lưu ý răng, nếu muốn chia sẽ code ở bình luần thì cần mã hóa code trước khi bỏ vào khung nhé. :)
⑴ Chèn ℂ𝕤𝕤 theo mẫu : [pre css] ℂ𝕤𝕤 [/pre]
⑵ Chèn ℍ𝕥𝕞𝕝 theo mẫu : [pre html] ℍ𝕥𝕞𝕝 [/pre]
⑶ Chèn 𝕁𝕒𝕧𝕒𝕤𝕔𝕣𝕚𝕡𝕥 theo mẫu : [pre js] 𝕁𝕒𝕧𝕒𝕤𝕔𝕣𝕚𝕡𝕥 [/pre]

🖼️ Chèn 𝕀𝕞𝕒𝕘𝕖 theo mẫu : [img] 𝕃𝕚𝕟𝕜 𝕀𝕞𝕒𝕘𝕖 [/img]
🎞️ Chèn Video 𝕐𝕠𝕦𝕥𝕦𝕓𝕖 theo mẫu : [youtube] 𝕃𝕚𝕟𝕜 𝕪𝕠𝕦𝕥𝕦𝕓𝕖 [/youtube]

1 nhận xét:

@Bloggers Community

@Catalogics

CSS (31) Google (7)

@Total Pageviews