Friday, September 7, 2007

Indoor -outdoor Games For Kinder Garten

How to make a tag cloud? -73 -

A
tag cloud is a visual representation of the "tags" or keywords used on a website . Usually this word list is sorted alphabetically and with different size according to relevance.
To begin to put our tag on the blog we have to label


all our post.
1. Go
template design, then Edit HTML and click Expand Widget Templates and you have to paste between \u0026lt;b:skin> \u0026lt;! [CDATA [and ]]>\u0026lt;/ b: skin>. Preferable that hit near the end (before ]]>\u0026lt;/ 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}

2.
Then add the following code between ]]>\u0026lt;/ b: skin> and \u0026lt;/ head>. Preferable that hit near the end (before \u0026lt;/ head>). \u0026lt;script Type='text/javascript'>
/ / Label Cloud User Variables var lcBlogURL = 'http://ayudaparaelblog.blogspot.com'; maxFontSize var = 20;
maxColor var = [0, 0.255];
minFontSize var = 10; minColor var = [0,0,0]; lcShowCount var = false; \u0026lt;/ script>
3.
Find the widget with ID Label1 and the title tags. This I find where it says: \u0026lt;div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>


<b:widget id='Label1' locked='false' title='Etiquetas' 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'><?xml:namespace prefix = data />
</data:label.name></a> </b:if>
(<data:label.count/>)
</li>
</b:loop>
</ul>

<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>


4.
Once located, you have to replace all the previous code as follows:

\u0026lt;b:widget id='Label1' locked='false' title='Label Cloud' type='Label'> \u0026lt; b: includable id = 'main'> \u0026lt;b:if cond='data:title'>
\u0026lt;h2> \u0026lt;data:title/> \u0026lt;/ h2>
\u0026lt;/ b: if> ;

\u0026lt;div class='widget-content'>
\u0026lt;div id='labelCloud'/>
\u0026lt;script type='text/javascript'>

/ / Do Note change anything past this point -----------------
function s (a, b, i, x) {
if (a> b) {
where m = (ab ) / Math.log (x), v = a-Math.floor (Math.log (i) * m)

} else {
where m = (ba) / Math.log (x), v = Math. Floor (Math.log (i) * m + a)
} return v}

was taking = 0
var c = [];
was Label count = new Array ();
was ts = new Object;
\u0026lt;b:loop values='data:labels' var='label'>
was theName = "\u0026lt;data:label.name/>";
ts [theName] = \u0026lt;Data: label.count / >;
\u0026lt;/ b: loop>
for (t in ts) {
if (! Label count [ts [t]]) {
label count [ts [t]] = new Array (ts [t]) } }
tz = labelCount.length-1;
LC2 = document.getElementById ('label cloud');
ul = document.createElement ('ul'); ul.className = 'label-cloud';
for (var t set ts) {
for (var i = 0; 3> i; i + +) {
c [i] = s (minColor [i], maxColor [i], ts [t]-ta, tz)
}
was 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 = lcBlogURL+'/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);
\u0026lt;/ script>

\u0026lt;noscript>
\u0026lt;ul>
\u0026lt; b: loop values \u200b\u200b= 'data: labels' var = 'label'>
\u0026lt;li>
\u0026lt;b: f 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>

\u0026lt;/ b: includable>
\u0026lt;/ b: widget>



step
Explanation No. 2


-
In lcBlogURL, you must put the address of your blog.


-
In maxFontSize, we can change the font size shown.


-
In maxColor = [0,0,255], we can change the color of the displayed font.
For example:
[255,0,0] = Red clear
[0,255,0] = Light Green
[128,0,0] = Dark Red
[0,128,0] = Dark Green
[0,0,128] Dark blue =
More color combinations


HYPE's Color Specifier


.


-
In minFontSize, we can change the font size shown.


-
In minColor = [0,0,0], we can change the color of the displayed font.

-
In lcShowCount (true or false) .- If true will display a tag with the number of entries that exist. While in false just see a tag without the corresponding number.
Note: - so that it is this trick you have up to more than 2 entries otherwise not be shown.



0 comments:

Post a Comment