Monday, April 4, 2011

Cara Membuat Recent Komen

Oke, langsung aja Cara Membuat Recent Komen
Soalnya lagi sibuk. Jadi mohon maaf cuman bisa ngeshare Cara Membuat Recent Komen htmlnya dwnk. N jangan lupa ganti warna merah dengan url blog kalian. Terlebih ini html aku tujukan buat Agus Happy Slalu


<div style="overflow:auto;width:270px;height:150px;padding:10px;border:1px solid #eee" align="justify">
<script style='text/javascript'>
//Widget by Blogger Templates (Distributed by BloggerStop.net)
function showrecentcomments(json){for(var i=0;i<a_rc;i++){var b_rc=json.feed.entry[i];var c_rc;if(i==json.feed.entry.length)break;for(var k=0;k<b_rc.link.length;k++){if(b_rc.link[k].rel=='alternate'){c_rc=b_rc.link[k].href;break;}}c_rc=c_rc.replace("#","#comment-");var d_rc=c_rc.split("#");d_rc=d_rc[0];var e_rc=d_rc.split("/");e_rc=e_rc[5];e_rc=e_rc.split(".html");e_rc=e_rc[0];var f_rc=e_rc.replace(/-/g," ");f_rc=f_rc.link(d_rc);var g_rc=b_rc.published.$t;var h_rc=g_rc.substring(0,4);var i_rc=g_rc.substring(5,7);var j_rc=g_rc.substring(8,10);var k_rc=new Array();k_rc[1]="Jan";k_rc[2]="Feb";k_rc[3]="Mar";k_rc[4]="Apr";k_rc[5]="May";k_rc[6]="Jun";k_rc[7]="Jul";k_rc[8]="Aug";k_rc[9]="Sep";k_rc[10]="Oct";k_rc[11]="Nov";k_rc[12]="Dec";if("content" in b_rc){var l_rc=b_rc.content.$t;}else if("summary" in b_rc){var l_rc=b_rc.summary.$t;}else var l_rc="";var re=/<\S[^>]*>/g;l_rc=l_rc.replace(re,"");if(m_rc==true)document.write('On '+k_rc[parseInt(i_rc,10)]+' '+j_rc+' ');document.write('<a href="'+c_rc+'">'+b_rc.author[0].name.$t+'</a> commented');if(n_rc==true)document.write(' on '+f_rc);document.write(': ');if(l_rc.length<o_rc){document.write('<i>&#8220;');document.write(l_rc);document.write('&#8221;</i><br/><br/>');}else{document.write('<i>&#8220;');l_rc=l_rc.substring(0,o_rc);var p_rc=l_rc.lastIndexOf(" ");l_rc=l_rc.substring(0,p_rc);document.write(l_rc+'&hellip;&#8221;</i>');document.write('<br/><br/>');}}document.write('');}

</script><script style='text/javascript'>var a_rc=10;var m_rc=true;var n_rc=true;var o_rc=100;</script><script src='http://artinyakehidupan.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments'></script></div>

» Jangan lupa dilike kalau bermanfaat.

2 Komentar:

Ladida Cafe said...

kenapa ya kok ada kode json?

tuh kode apa sii bro?

Sahili said...

Ga tau juga sih...
:D

heheheeh

Post a Comment