Cara Pasang Populer Posts

Cara Pasang Populer Posts
Entri Populer ~ Udah banyak tutorial di luar sana yang bahas soal beginian, ada yang canggih, ada juga yang simpel, tinggal sohib mau pilih yang mana....terserah sohib.
Langsung ke tujuan :
1.  Login ke Blog nya
2. Tambah gadget, lalu pilih HTML/JavaScript
3. Pastekan kode dibawah kedalamnya
4. Ganti yang berwarna merah dengan URL Blog sohib
5. Pratinjau, lalu save.

<div style="height: 200px; overflow: auto; width: 100%;">
<script language='javascript'>
aBold = false;
numposts=100;
maxshowresult=20;
home_page = "http://desacilembu.blogspot.com/";
</script>
<script type='text/javascript'>
//<![CDATA[

var postTitlear=new Array();var postUrlar=new Array();var postCommentar=new Array();var totalpost;document.write("<ul>");function showrecentposts(j){var a=j.feed.entry.length;totalpost=a;for(var f=0;f<a;f++){var h=j.feed.entry[f];var c=h.title.$t;var b;var g;if(f==j.feed.entry.length){break}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="alternate"){g=h.link[d].href;break}}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split(" ")[0];break}}c=(aBold)?"<b>"+c+"</b>":c;postTitlear.push(c);postUrlar.push(g);postCommentar.push(b)}sortPosts();for(var f=0;f<maxshowresult;f++){var e='<li><a href="'+postUrlar[f]+'" class="recent-link">'+postTitlear[f]+" ("+postCommentar[f]+" comments)</a>";document.write(e)}}function sortPosts(){function c(d,f){var e=postTitlear[d];postTitlear[d]=postTitlear[f];postTitlear[f]=e;var e=postUrlar[d];postUrlar[d]=postUrlar[f];postUrlar[f]=e;var e=postCommentar[d];postCommentar[d]=postCommentar[f];postCommentar[f]=e}for(var b=0;b<postTitlear.length-1;b++){for(var a=b+1;a<postTitlear.length;a++){if(parseInt(postCommentar[b])<parseInt(postCommentar[a])){c(b,a)}}}}document.write('<script src="'+home_page+"feeds/posts/default?max-results="+numposts+'&orderby=published&alt=json-in-script&callback=showrecentposts"><\/script>');
//]]>
</script></div>
Cara Pasang Populer Posts
Reaksi:

Related Posts:

You Might Also Like:

Comment Policy: Silahkan tuliskan komentar Anda yang sesuai dengan topik postingan halaman ini. BAGI PENGGUNA MOBILE, KLIK What do you think? atau dimana saja pada halaman disqus JIKA HALAMAN DISQUS TIDAK TERBUKA SEMPURNA .
Buka Komentar
© 2017 DESA CILEMBU - Template Created by goomsite - Proudly powered by Blogger