How To Add A Tag Cloud Widget (Cloud Labels) To Your Blogger/ Blogspot

Views:

Now i share a special widget, It shows your labels (Categories) like a Cloud. It is 100% working with any blogger templates. It is very easy to install in your blogger follow our tutorials.





Step 1: Log in your Blogger.

Step 2: Go to Layout >Page Elements



Step 3: Click “Add a gadgets” option then select “ Labels” Gadget from the given list
Make sure that you have the Labels Page Element installed. If you haven't already...


Step 4: Save it.



Step 5: Now go to Templates>Edit HTML


Step 6: Make sure that the "Expand Widgets Template" box is unchecked.


Step 7: Find Blow code (Ctrl+F).
<b:widget id='Label1' locked='false' title='Tags' type='Label'/>
Your code may look a little different. So try to find type='Label'.

Step 8: Replacing tat code with below code.
Once you've located type='Label', remove the whole line of code that looks just like the code mentioned in step 7.


Step 9: Replace above line with below code

Copy This Code


/*
Distributed by Arun Johnson at entertainer001.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(&quot;<data:label.name/>&quot;);
</b:loop>

//URLs
var urls = new Array();
<b:loop values='data:labels' var='label'>
urls.push(&quot;<data:label.url/>&quot;);
</b:loop>

//Counts
var counts = new Array();
<b:loop values='data:labels' var='label'>
counts.push(&quot;<data:label.count/>&quot;);
</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 != &quot;peek&quot; &amp;&amp; x != &quot;forEach&quot; &amp;&amp; counts[x] >= minCount)
{
//Calculate textSize
var textSize = min + Math.floor((counts[x]/most) * range);
//Show counts?
if(showCount)
{
var count = &quot;(&quot; + counts[x] + &quot;)&quot;;
}else{
var count = &quot;&quot;;
}
//Output
document.write(&quot;<span style='font-size:&quot; + textSize + &quot;%'><a href='&quot; + urls[x] + &quot;' style='text-decoration:none;'>&quot; + labels[x] + count + &quot;</a></span> &quot; );
}
}
</script>
<br/>
<span style="font-size:80%;float:right;">Powered by <a href="http://www.entertainer001.blogspot.com">Entertainment</a></span>
</div>
</b:includable>
</b:widget>





 Before saving the template make sure to click preview. The new tag cloud should now be visible. If not, make sure that you've completed all the steps correctly.




............................................End.......................................................



How To Add A Tag Cloud Widget (Cloud Labels) To Your Blogger/ Blogspot How To Add A Tag Cloud Widget (Cloud Labels) To Your Blogger/ Blogspot Reviewed by Gaint Hackers on 02:35 Rating: 5

No comments:

Powered by Blogger.