Add label cloud in your blogger/blogspot blog
It is similar to adding a tag cloud in wordpress, but in wordpress a single addition of the widget to your desired place clears the problem and puts the tag cloud for you.
Here, for a blogger platform blog, here is the procedure to do that -
Go to your Blogger Dashboard
Go to Blog Settings
Select Layout in the top options menu
Add Label Widget by Selecting option through “Add page element”
You can choose whether to have the labels randomly or sorted alphabetically.
Now you are half done. Go to Edit HTML section, and search for the following -
<b:widget id=’Label1′ locked=’false’ title=’Labels’ type=’Label’>
Replace that code with the following -
<b:widget id=’Label1′ locked=’false’ title=’Label Cloud’ type=’Label’>
<b:includable id=’main’>
<b:if cond=’data:title’>
<h2><data:title/></h2>
</b:if>
<div class=’widget-content’>
<style type=’text/css’>”;
#labelCloud {text-align:center;font-family:arial,sans-serif;}
#labelCloud .label-cloud li{display:inline;background-image:none !important;padding:0 5px;margin:0;vertical-align:baseline !important;border:0 !important;}
#labelCloud ul{list-style-type:none;margin:0 auto;padding:0;}
#labelCloud a img{border:0;display:inline;margin:0 0 0 3px;padding:0}
#labelCloud a{text-decoration:none}
#labelCloud a:hover{text-decoration:underline}
#labelCloud li a{}
#labelCloud .label-cloud {}
#labelCloud .label-count {padding-left:0.2em;font-size:9px;color:#000}
#labelCloud .label-cloud li:before{content:”" !important}
</style>
<div id=’labelCloud’/>
<p align=’center’>
<script type=’text/javascript’>
var cloudMin = 1;
var maxFontSize = 25;
var maxColor = [0,255,0];
var minFontSize = 10;
var minColor = [0,0,0];
var lcShowCount = false;
// Don’t change anything past this point —————–
// Cloud function s() ripped from del.icio.us
function s(a,b,i,x){
if(a>b){
var m=(a-b)/Math.log(x),v=a-Math.floor(Math.log(i)*m)
}
else{
var m=(b-a)/Math.log(x),v=Math.floor(Math.log(i)*m+a)
}
return v
}
var c=[];
var labelCount = new Array();
var ts = new Object;
<b:loop values=’data:labels’ var=’label’>
var theName = “<data:label.name/>”;
ts[theName] = <data:label.count/>;
</b:loop>
for (t in ts){
if (!labelCount[ts[t]]){
labelCount[ts[t]] = new Array(ts[t])
}
}
var ta=cloudMin-1;
tz = labelCount.length - cloudMin;
lc2 = document.getElementById(’labelCloud’);
ul = document.createElement(’ul’);
ul.className = ‘label-cloud’;
for(var t in ts){
if(ts[t] < cloudMin){
continue;
}
for (var i=0;3 > i;i++) {
c[i]=s(minColor[i],maxColor[i],ts[t]-ta,tz)
}
var fs = s(minFontSize,maxFontSize,ts[t]-ta,tz);
li = document.createElement(’li’);
li.style.fontSize = fs+’px’;
a = document.createElement(’a');
a.title = ts[t]+’ Posts in ‘+t;
a.style.color = ‘rgb(’+c[0]+’,'+c[1]+’,'+c[2]+’)';
a.href = ‘/search/label/’+encodeURIComponent(t);
if (lcShowCount){
span = document.createElement(’span’);
span.innerHTML = ‘(’+ts[t]+’) ‘;
span.className = ‘label-count’;
a.appendChild(document.createTextNode(t));
li.appendChild(a);
li.appendChild(span);
}
else {
a.appendChild(document.createTextNode(t));
li.appendChild(a);
}
ul.appendChild(li);
abnk = document.createTextNode(’ ‘);
ul.appendChild(abnk);
}
lc2.appendChild(ul);
</script>
</p>
<noscript>
<ul>
<b:loop values=’data:labels’ var=’label’>
<li>
<b:if cond=’data:blog.url == data:label.url’>
<data:label.name/>
<b:else/>
<a expr:href=’data:label.url’><data:label.name/></a>
</b:if>
(<data:label.count/>)
</li>
</b:loop>
</ul>
</noscript>
<br/>Powered By:<small><a href=’http://www.bloggerplugins.org’>Blogger Widgets</a></small>
<b:include name=’quickedit’/>
</div>
</b:includable>
</b:widget>
You will see something of this kind -

[...] 27th 2008 1:09pm [-] From: thewwwblog.com [...]
Reply to this comment:thanx, i gonna try it
Reply to this comment:I also like tag cloud code at http://technoexperts.blogspot.com/2008/08/new-blogger-tag-cloud-widget.html.
Reply to this comment:The blog address has been changed to http://websitewealth.blogspot.com/2008/08/new-blogger-tag-cloud-widget.html
Reply to this comment:How to add labels to meta keywords? I need dynamic meta keywords(from data.label.name)for this blog : http://hyipinvestors.blogspot.com
Reply to this comment:Let me try it.
Reply to this comment:Leave a comment!
Subscribe for Updates!
Be our sponsor!
The www Updates
Connect
Blog Traffic Stats
My Friends
World Wide Web Blog!
This blog uses this theme!
Top Commentators