OK, we return to the tutorial, of course ...... blog. Tutorials this
time I want to discuss the installation of a label or Cloud Tag Cloud
on the new template / new blogger templates.
What's the meaning of Label Cloud?
Label cloud is the installation of labels (categories) in the form of a cloud .... as a comrade see sidebar on the right side of this blog is written under the category there, there are some labels (category) that the tip indicated how the number of categories that are installed on kateori. It is a label that in general use in the blogger, if you want to slightly different, comrade can install the label cloud. With the cloud label, the label (category) will be in writing in a different font size in accordance with the number of categories in pairs, the more frequent category, the greater will also font printed.
To install the label cloud, techniques that I use this time is the fruit of the work phydeaux. Please follow the following steps:
time I want to discuss the installation of a label or Cloud Tag Cloud
on the new template / new blogger templates.
What's the meaning of Label Cloud?
Label cloud is the installation of labels (categories) in the form of a cloud .... as a comrade see sidebar on the right side of this blog is written under the category there, there are some labels (category) that the tip indicated how the number of categories that are installed on kateori. It is a label that in general use in the blogger, if you want to slightly different, comrade can install the label cloud. With the cloud label, the label (category) will be in writing in a different font size in accordance with the number of categories in pairs, the more frequent category, the greater will also font printed.
To install the label cloud, techniques that I use this time is the fruit of the work phydeaux. Please follow the following steps:
- Sign in on blogger
- Click the Layout menu
- Click the Edit menu HTML
- Click the Download Full Template writing, and save the data. This is to guard when an error occurs in the edit template code
- Click the box next to the small writing Expand Widget Templates for the check.
- Wait some time until the process is finished
- Save the following code in the code between <b:skin><![CDATA[ and the code
]]></b:skin> , or if the store just confused on the exact code
]]></b:skin> - Copy and paste the following code after the code ]]></b:skin> and before the code </head> or if the store just confused on the exact 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>
Find the following code in your template code
- Replace the above code with the following code:
- Click the Save button templates
- FINISH .
/* 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}
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<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>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
<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>
No comments:
Post a Comment