Become an Author for this blog just by a Click

How to add tag Cloud to your blog?

Written By avinash on Wednesday, October 12, 2011 | 2:25 PM

A widget is a simple gadget that will appear in your blog and this will add more flavour to your blog.You can have your own widgets by using HTML codes,Java etc.You can add anything you want in your widget like number of people online in your blog, weather report etc.

Here are few steps that I suggest  to create your own widget.

STEP 1)Add a Labels gadget in your blogger template. If you have already installed then ignore this step.
Go to Layouts and choose any column where you are about to install this new widget
Click on 'Add gadget' button and add the 'label gadget'.

STEP 2) Go to Template --->Edit HTML

NOTE:Click "Expand Widgets Template". It should be in tick mark

STEP 3)Search for <b:widget id='Label1' locked='false' title='Tags' type='Label'/>.If you have a different code then in your browser's search bar or tool search for  type='Label'.

STEP 4) After you search for  type='Label',delete the code in that line and replace with the codes given below.


<b:widget id='Label1' locked='false' title='Tags' type='Label'>
<b:includable id='main'> <b:if cond='data:title'> content' style='text-a<h2><data:title/></h2> </b:if> <div class='widget -lign: justify;'> /javascript'> <script type='tex t




//Settings / Variables
var max = 150; //max css size (in percent)var min = 70; //min css size (in percent) ue for yes, false for no var minCount = 1; // what is the minimumvar showCount = false; // show counts? t r count for a tag to be shown? 1 for all //Begin code: var range = max - min; //Build label Array e/>&quot;); </b:loop> //var labels = new Array(); <b:loop values='data:labels' var='label'> labels.push(&quot;<data:label.na mURLs var urls = new Array(); <b:loop values='data:labels' var='label'> urls.push(&quot;<data:label.url/>&quot;); </b:loop> b:loop> //Counts var counts = new Array(); <b:loop values='data:labels' var='label'> counts.push(&quot;<data:label.count/>&quot;); < / //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();

ar most = sorted.sort(sortNu
//Find the largest tag count

vmber)[0];

//Begin HTML output
for (x in labels)
{
ch&quot; &amp;&amp; counts[x] >= minCount) { //Calculate textSize var textSize = min + Math.fl
if(x != &quot;peek&quot; &amp;&amp; x != &quot;forE
aoor((counts[x]/most) * range);
//Show counts?
if(showCount)
{
var count = &quot;(&quot; + counts[x] + &quot;)&quot;;
}else{
+ urls[x] + &quot;' styl
var count = &quot;&quot;;
}
//Output
document.write(&quot;<span style='font-size:&quot; + textSize + &quot;%'><a href='&quot
;e='text-decoration:none;'>&quot; + labels[x] + count + &quot;</a></span> &quot; );
}
}
</script>
<br/>
Widgets</a></span> </div> </b:includable> </b:widget>
<span style="font-size:80%;float:right;">Powered by <a href="http://www.vikiinfos.blogspot.com">Blogger



STEP 5) Now save your template and you are done.

Check a new attractive tag cloud in your blog like this. Enjoy Blogging!!

Hope the above information is useful.Any comments,suggestions or queries is most appreciated. You can leave your comments below. Please take 5 seconds to share this post with your friends and families if you like this post.



2 comments:

MOHAN MANOHAR MEKAP said... Best Blogger Tips

good write up thanks blogger has inbuilt option available

Author said... Best Blogger Tips

@MOHAN MANOHAR MEKAP Thank u

Post a Comment

Please Leave your Comments, suggestions, Queries Related to this article Below.

From the Author's Desk


Vignesh, the founder of VikiInfos, is a Commerce Graduate and Pursuing his Chartered Accountant Profession, now in the Intermediate level. Blogging is his hobby and likes to share things. He plans to Update this blog with latest happenings and things that he gets to know at times and worthy information.a friendly user blog can be followed by any person. Join us free and subscribe.
Feel free to say hi to me, or follow @vikiinfos on twitter.


Support US to support YOU!
Dono How To Donate? Click here
Creative Commons License
Healthy Infos... by Vignesh is licensed under a Creative Commons Attribution-NoDerivs 3.0 Unported License.
Based on a work at vikiinfos.blogspot.com.
 
Twitter Bird Gadget