Pada kesempatan ini Bang Kamplenk akan mengshare cara membuat Recent Comments Terbaru, pada artikel sebelumnya saya juga pernah membagikan cara Membuat Recent Comment Bergaya Windows delapan. Bagi sobat yang ingin memperganteng blognya widget ini bisa dijadikan pilihan, tampilannya bergaya, simple, keren dan tidak memberatkan loading blog anda, bagi sobat ingin memiliki silahkan ikuti panduannya dibawah ini :
1.Klik Tata Letak.
2.Klik Elemen Halaman.
3.Klik Tambah Gadget.
4.Kemudian Pilih HTML/Javascript.
5.Copy paste kode dibawah ini :
NB : Silahkan sobat ganti kata Feed id dengan Feed Burner blog anda
Semoga Bermanfaat.
<script type='text/javascript'>//<![CDATA[
function latest_recent_comments(e){var t;t='<ul class="latest_recent_comments">';for(var n=0;n<numComments;n++){var r,i,s,o;if(n==e.feed.entry.length)break;t+="<li>";var u=e.feed.entry[n];for(var a=0;a<u.link.length;a++){if(u.link[a].rel=="alternate"){r=u.link[a].href}}for(var f=0;f<u.author.length;f++){i=u.author[f].name.$t;s=u.author[f].gd$image.src}if(s.indexOf("/s1600/")!=-1){s=s.replace("/s1600/","/s"+avatarSize+"-c/")}else if(s.indexOf("/s220/")!=-1){s=s.replace("/s220/","/s"+avatarSize+"-c/")}else if(s.indexOf("/s512-c/")!=-1&&s.indexOf("http:")!=0){s="http:"+s.replace("/s512-c/","/s"+avatarSize+"-c/")}else if(s.indexOf("blogblog.com/img/b16-rounded.gif")!=-1){s="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvOZjk-zEmtyt-R9hxsVNXzbC-y0NI-RD0RdRTEPEQNOenWhxz_iYFcuV7Dq40nV7CEalUMVuH4FXY-G11eEdyMYq0aN-AdHKP8rWdeZq6jVAOe1B5Cfj40077sutH7szSnq4pqZBKWjij//"+avatarSize+"/md_blogger_logo.png"}else if(s.indexOf("blogblog.com/img/openid16-rounded.gif")!=-1){s="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVWUAD1KYR9BP5-H6y2y3aKK_VtX7f0tOFOYGthR7aaBs0gGftwRkG4459TLtt0fKzOv_ZM10CmfCbudmHXEVzArANJW3GlzMe7sVH-290ljbNMta29DlliPAsvkjbz8B3o80NyXKv9wfN//"+avatarSize+"/md_openid_logo.png"}else if(s.indexOf("blogblog.com/img/blank.gif")!=-1){if(defaultAvatar.indexOf("gravatar.com")!=-1){s=defaultAvatar+"&s="+avatarSize}else{s=defaultAvatar}}else{s=s}if(showAvatar==true){if(roundAvatar==true){o="avatarRound"}else{o=""}t+='<div class="avatarImage '+o+'"><img class="'+o+'" src="'+s+'" alt="'+i+'" width="'+avatarSize+'" height="'+avatarSize+'"/></div>'}t+="<span>"+i+"</span>";var l=u.content.$t;var c=l.replace(/(<([^>]+)>)/ig,"");if(c!=""&&c.length>characters){c=c.substring(0,characters);c+="…"}else{c=c}t+='<a href="'+r+'">'+c+"</a>";t+="</li>"}t+="";document.write(t)}var numComments=numComments||8,avatarSize=avatarSize||34,characters=characters||26,defaultAvatar=defaultAvatar||"https://lh5.googleusercontent.com/-5YeC_6-32nw/UPb7SL-uGXI/AAAAAAAABWE/QJRpUV7G9bc/s80/personal.png",showAvatar="undefined"===typeof showAvatar?!0:showAvatar,roundAvatar="undefined"===typeof roundAvatar?!0:roundAvatar,hideCredits="undefined"===typeof hideCredits?!1:roundAvatar
//]]></script>
<script type="text/javascript" src="http://FEED ID/feeds/comments/default?alt=json&callback=latest_recent_comments&max-results=7"></script>
<link type="text/css" rel="stylesheet" href="https://dl.dropboxusercontent.com/s/exxk700dfe4kqiu/metro-style-recent-comments-v2.css"/>
C O D E
wedew, simpel juga bro tampilannya, tapi saya lebih milih bawwan blogger aje :D
BalasHapusHidup adalah pilihan... ;)
Hapus