Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Most Commented Posts



Tutorial ini mengenai widget artikel Paling Banyak di komen di Blog.Widget ini akan memaparkan post yang memiliki jumlah komen terbanyak di blog kamu.Widget ini hampir sama dengan widget popular post yang memaparkan artikel yang popular di blog, hanya sedikit perbezaan iaitu widget ini menujukkan post yang paling banyak di koment. Untuk mengetahui lebih lanjut boleh melihat demonya dibawah sebelum mencuba.

 Pasang Slide Out Butang Follower

Pasang Most Commented Posts

Langkah 1) Dari Blogger Dashboard, pergi Layout and klik pada Add a Gadget link




Langkah  2) In the pop-up window, pilih  HTML/JavaScript widget




Langkah 3) Copy-paste kode dibawah ini.



#most-comments li,#most-comments ul,#most-comments ul li{margin:0;list-style:none;color:#444;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px}#most-comments ul li{position:relative;overflow:hidden;background:#fff;margin:3.5px 0;padding:7px 10px 7px 50px;white-space:nowrap;text-overflow:ellipsis;box-shadow:inset 0 0 #fc4f3f;border:1px solid #e6e6e6;transition:all .6s}#most-comments ul li:hover{box-shadow:inset 310px 0 #fc4f3f}#most-comments ul li a{color:#444;font-weight:700;text-decoration:none;transition:all .3s}#most-comments ul li a:hover,#most-comments ul li:hover a{color:#fff}.count-most{position:absolute;left:0;top:0;width:40px;height:100%;margin:0;padding:7px 0;background-color:#383838;color:#fff!important;text-align:center;transition:all .3s}#most-comments ul li:hover .count-most{background-color:#fc4f3f}


//
var numPosts=10;
var homePage="www.belajarblogs.com";
var postTitlear=new Array();
var postUrlar=new Array();
var postCommentar=new Array();
var totalpost;document.write('
    ');
    function mostComment(j){var a=j.feed.entry.length;totalpost=a;
    for(var f=0;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
    if(h.link[d].rel=="alternate"){g=h.link[d].href;break}}
    for(var d=0;d
    if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split(" ")[0];}};
    postTitlear.push(c);
    postUrlar.push(g);
    postCommentar.push(b)}sortPosts();
    for(var f=0;f'+postTitlear[f]+'';
    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
    for(var a=b+1;a
    if(parseInt(postCommentar[b])
    document.write('
    document.write('')
    document.write('
')
document.write('
');

//]]>


Nota: Tukar bilangan yang berwarna merah numPosts=10 dengan nombor post yang anda ingin paparkan dan URL yang berwarna kuning dengan URL blog anda.


This post first appeared on Tutorial Blogger, please read the originial post: here

Share the post

Most Commented Posts

×

Subscribe to Tutorial Blogger

Get updates delivered right to your inbox!

Thank you for your subscription

×