Welcome to My Website

Make Tags Cloud

Posted by : Aji Setio Aji Tuesday, January 19, 2010


 

According to language tag mean label,  and cloud mean cloud. So tags cloud that is formed label likes cloud. Article in gathering label will like cloud and the font not flat. As to function from tags cloud that is when does article you post many so tag article more expand,  but when does article only a little so article be little. So tags cloud simplify to detect article or posting which at most. When do you interested to make a tags cloud, don't pass and don't forget to read article follows!

The steps to makes tags cloud that is as follows:

  1. Login beforehand to Blogger with your id.
  2. Step into location order menu then Edit HTML.
  3. Then put code hereunder exactly above code ]]></b:skin>.
/* Label Cloud Styles
----------------------------------------------- */
#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}
  1. Put code follows correct be code <head>.
<script type='text/javascript'>
// Label Cloud User Variables
var cloudMin = 1;
var maxFontSize = 20;
var maxColor = [0,0,255];
var minFontSize = 10;
var minColor = [0,0,0];
var lcShowCount = false;
</script>
  1. then look for code <b:widget id='Label1' locked='false' title='Labels' type='Label'/>. To simplify livelihood presses ctrl + f, and copy-paste this code.
  2. Change code with code hereunder:
<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'>
<div id='labelCloud'/>
<script type='text/javascript'>

// 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';
li.style.lineHeight = '1';
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>

<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>
<b:include name='quickedit'/>
</div>

</b:includable>
</b:widget>
  1. Then save template and see the result.

Goods News …

But now you are difficult there is no need to are making tag cloud, Blogger prepare this service that is:

Add Element and choose "label" then choose radio button "cloud". And save.
Finished …

I thinks is enough for this article, good can useful for you …


0 komentar

Post a Comment

Undangan Pernikahan Online

Undangan Pernikahan Online
Undangan Pernikahan Online dalam bentuk web. Praktis dan mudah dibagikan.

Email Subscriptions


Enter your email address:

Delivered by FeedBurner


Translator


English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
The Best Translator

Followers

About Me

My photo
Ngeblog adalah hobi saya sejak dalam kandungan (hahahah), Thanks buat semuanya yang udah berkunjung ke blog ane, semoga bermanfaat..