9 March 2013

Tutorial : Top Commentors Cloud


Assalamualaikum, Salam Sejahtera. :)
Bismillahirrahmanirrahim..


Selalunya kat blog orang lain dia punya top commentors widget dia susun secara biasa menegak kan? kali ni nak share dengan korang satu lagi widget top commentators versi awan pulak :D Contoh tengok dekat atas tu hehe

1. Login account blogger anda
2. Pergi ke Layout
3. Tekan Add A Gadget
4. Di window add a gadget, pilih HTML/JavaScript
5. Copy codes bawah ni dan pastekan di ruangan HTML/JavaScript

<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
{
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
{
max = ccCount;
}
if (ccCount < min)
{
min = ccCount;
}
}
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
{
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
}
document.write(display);
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://www.bloggersentral.com &Exclusions=Anonymous,Greenlava &ShowHowMany=20 &Order=alphabet &_callback=cCloud
&_id=cfa196644e1d6159c9183548c4b5e2f5
&_render=json"
type="text/javascript"></script>
</div>
<span style="font-size: 80%; float:right;;margin-top:5px;">Get this <a href="http://www.faqihahhusni.blogspot.com/" target="_blank">commentators</a> <a href="http://www.faqihahhusni.blogspot.com/" target="_blank">widget</a></span>
KETERANGAN
merah : gantikan dengan URL Blog anda
biru : Nama-nama yang tak perlu ada dalam widget top commentors ni. Letak koma untuk pisahkan antara nama dengan nama dan Pastikan tidak letak space antara mereka ye
Hijau : bilangan nama yang anda hendak paparkan
Pink : Turutan nama dia samada dalam bentuk

  • alphabet - turutan nama ikut huruf ataupun anda nak tukar ikut
  • frequency - ikut sapa komen paling banyak sampai sikit

6. Save :)

Yay dah siap ^_^

[NI ADALAH AUTOPOST. TUAN BLOG ADA DI ASRAMA, NANTI KALAU BALIK INSYAALLAH SEGALA KOMEN DAN PERTANYAAN AKAN DIJAWAB :) Terima kasih..]
author image

FAQIHAH HUSNI

Hi! I'm the writer and author of this webpage. Currently studying in SM Sains Kubang Pasu or know as KUPSIS in Kedah. A Kedahan girl for sure! 2017 is my senior year there and I'm fighting to 9A+ in SPM. Do pray the good result for me and others 1317 warriors. Thank you for your time :)

5 comments:

Budi Bahasa Budaya Kita