Blogger Tag Cloud Widget by Categories / Labels Blogger Tag Cloud Widget oleh Kategori / Label
This widget is perfect for blogspot users who desire a simple tag cloud for their Categories. widget ini sangat cocok untuk pengguna blogspot yang menginginkan awan tag sederhana untuk Kategori mereka. The Labels Cloud can easily be implemented within the sidebar of your blog and will match your template wonderfully. Label Cloud dengan mudah dapat diimplementasikan dalam sidebar blog Anda dan akan sangat cocok dengan template Anda.Steps for Implementation Langkah-langkah untuk Pelaksanaan
Step 1: Back it Up Langkah 1: Kembali itu Up
Always make sure to back up your Blogger Template before doing anything else! Selalu pastikan untuk back up Template Blogger sebelum melakukan apapun!
Step 2: The Labels Gadget Langkah 2: Label Gadget
Always make sure to back up your Blogger Template before doing anything else! Selalu pastikan untuk back up Template Blogger sebelum melakukan apapun!
Step 2: The Labels Gadget Langkah 2: Label Gadget
Make sure that you have the Labels Page Element installed. Pastikan bahwa Anda memiliki Label Elemen Halaman diinstal. If you haven't already... Jika Anda belum ...
- Go to Layout >Page Elements . Pergi ke Layout> Elemen Halaman.
- Click "Add a Gadget" and then add the "Labels" gadget. Klik "Tambah Gadget" dan kemudian menambahkan "Label" gadget.
Step 3: Locating the "Old Code" Langkah 3: Mencari Lama Kode ""
- Now go to Layout >Edit HTML Sekarang pergi ke Layout> Edit HTML
- Make sure that the "Expand Widgets Template" box is unchecked. Pastikan bahwa "Expand Template Widget" kotak tidak dicentang.
- Now we need to search for the code that looks like this. Sekarang kita perlu mencari kode yang terlihat seperti ini.
<b:widget id='Label1' locked='false' title='Tags' type='Label'/>
Step 4: Replacing the "Old Code" with the "New Code" Langkah 4: Mengganti "Old Code" dengan "New Code"
- Once you've located type='Label', remove the whole line of code that looks just like the code mentioned in part 3 of step 3. Setelah Anda menemukan type = 'Label', menghapus seluruh baris kode yang terlihat seperti kode disebutkan pada bagian 3 dari langkah 3.
- Replace this code that you've just deleted with the code below: Ganti kode ini bahwa Anda baru saja dihapus dengan kode di bawah ini:
/*
Distributed by John Smith at WidgetsForFree.blogspot.com
*/ <b:widget id='Label1' locked='false' title='Tags' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content' style='text-align: justify;'>
<script type='text/javascript'>
/*
Simple Blogger Tag Cloud Widget
by Raymond May Jr.
http://www.compender.com
Released to the Public Domain
*/
//Settings / Variables
var max = 150; //max css size (in percent)
var min = 70; //min css size (in percent)
var showCount = false; // show counts? true for yes, false for no
var minCount = 1; // what is the minimum count for a tag to be shown? 1 for all
//Begin code:
var range = max - min;
//Build label Array
var labels = new Array();
<b:loop values='data:labels' var='label'>
labels.push("<data:label.name/>");
</b:loop>
//URLs
var urls = new Array();
<b:loop values='data:labels' var='label'>
urls.push("<data:label.url/>");
</b:loop>
//Counts
var counts = new Array();
<b:loop values='data:labels' var='label'>
counts.push("<data:label.count/>");
</b:loop>
//Number sort funtion (high to low)
function sortNumber(a, b)
{
return b - a;
}
//Make an independant copy of counts for sorting
var sorted = counts.slice();
//Find the largest tag count
var most = sorted.sort(sortNumber)[0];
//Begin HTML output
for (x in labels)
{
if(x != "peek" && x != "forEach" && counts[x] >= minCount)
{
//Calculate textSize
var textSize = min + Math.floor((counts[x]/most) * range);
//Show counts?
if(showCount)
{
var count = "(" + counts[x] + ")";
}else{
var count = "";
}
//Output
document.write("<span style='font-size:" + textSize + "%'><a href='" + urls[x] + "' style='text-decoration:none;'>" + labels[x] + count + "</a></span> " );
}
}
</script>
<br/>
<span style="font-size:80%;float:right;">Powered by <a href="http://www.widgetsforfree.blogspot.com">Blogger Widgets</a></span>
</div>
</b:includable>
</b:widget>
Step 5: Previewing the New Tag Cloud Langkah 5: Meninjau Tag Cloud Baru
0 komentar:
Posting Komentar
jangan lupa comentnya bro,,,,