Label Cloud or Blog Cloud for Blogger


To Put Label cloud or tag cloud on yours blogger sidebar template you have to follow below instruction carefully and with free mind. This hack will really add flavour to your blogger Template and help yours readers in finding contents according to label or tags ,this features will really make you free to add many tags according to your blog post.Make sure you backup your template before making any changes!

1.  Log in to your Blogger account

2. On yours Dashboard Select Layout

3. Go To Edit Html

4. Then Search for the code ]]></b:skin>. Replace this with following code

/* 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:skin>

<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>

5. Search for below mention label widget in blogger Html

<b:widget id=’Label1′ locked=’false’ title=’Labels’ type=’Label’/>

6. Replace above mention code with 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’>

  <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&gt;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 = &quot;<data:label.name/>&quot;;

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] &lt; cloudMin){

       continue;

       }

    for (var i=0;3 &gt; 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>

7. Now Save Template and you are Done

Featured Items - Business Class Hosting From Inmotion at Just $5.95

Inmotion is a No.1 Fast, Reliable and Affordable Hosting provider. Inmotion has earned 3 out of 3 rating from CNET to become a CNET Certified Service Provider. LIMITED TIME SPECIAL OFFER! - Get $1 Off / Month on your initial purchase
FIND OUT MORE

Featured Items - Top Selling WordPress Themes From Themeforest

Want to use one of the top selling WordPress theme for your next project?   Here is the list of Premium WordPress items from Blog, Magazine, Creative, Retail, Technology, Entertainment, BuddyPress, eCommerce and Nonprofit categories.
FIND OUT MORE

Featured Items - WebHostingPad Starts at only $1.99/Month

WebHostingPad is a Cheap, Easy and Affordable web hosting provider with Free Website Builder and Website Transfer. They are running SPECIAL LIMITED PERIOD OFFER $1.99/month (Regularly $4.95.mo).
FIND OUT MORE

Featured Items - Top 10 Website Hosting Provider 2012

Want to host your website in one of the top rated Web Hosting company ? Ratings are collected from the user all over the world and given a ranking based on the user feedback. All Plan includes: Free domain, Unlimited Space, Bandwidth, unlimited sites, free marketing credits and which also includes attractive discount.
FIND OUT MORE

Featured Items - Unlimited Web Hosting from HostGator 25% OFF

HostGator is a one of the most trusted Easy and Affordable Web Hosting Provider next to Inmotion Hosting. LIMITED TIME OFFER! Get 25% OFF using coupon code: BLOGOSYS25
FIND OUT MORE