Thursday, September 1, 2011

Create Animated Tag Cloud for your Blogger

Hello.

Once again I modified my blog template. I was thinking of having a  3-D rotating tag cloud for my blog but could not find it anywhere. I've always loved this rotating tag cloud over simple one. So I decided to dedicate my today's leave for it and after a bit more search, finally I found the way. It looks something like this: 





I'm sharing the way with you over here.

  1. First of all you need to have your blog on blogspot with some posts with different tags or labels.
  2. Then in your blog layout option, you need to have the LABEL widget placed in the sidebar.
  3. The labels over there can be present either list or cloud. You select the cloud option for yourself. Save and exit. 
  4. Then also save the arrangement.
  5. Now over there, go to Edit HTML option and save your current template for back up purposes.
  6. Once done with it, time to make some changes to the HTML settings of your blog.
  7. Find the following or similar line in the HTML content:
    <b:widget id='Label99' locked='false' title='Labels' type='Label'>
  8.  Now carefully replace this line with the following code:                  <b:widget id='Label99' 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'>
    <script src='http://sites.google.com/site/bloggerustemplatus/code/swfobject.js' type='text/javascript'/>
    <div id='flashcontent'>Blogumulus by <a href='http://www.roytanck.com/'>Roy Tanck</a> and <a href='http://www.bloggerbuster.com'>Amanda Fazani</a></div>
    <script type='text/javascript'>
    var so = new SWFObject(&quot;http://sites.google.com/site/bloggerustemplatus/code/tagcloud.swf&quot;, &quot;tagcloud&quot;, &quot;240&quot;, &quot;300&quot;, &quot;7&quot;, &quot;#ffffff&quot;);
    // uncomment next line to enable transparency
    //so.addParam(&quot;wmode&quot;, &quot;transparent&quot;);
    so.addVariable(&quot;tcolor&quot;, &quot;0x333333&quot;);
    so.addVariable(&quot;mode&quot;, &quot;tags&quot;);
    so.addVariable(&quot;distr&quot;, &quot;true&quot;);
    so.addVariable(&quot;tspeed&quot;, &quot;100&quot;);
    so.addVariable(&quot;tagcloud&quot;, &quot;<tags><b:loop values='data:labels' var='label'><a expr:href='data:label.url' style='12'><data:label.name/></a></b:loop></tags>&quot;);
    so.addParam(&quot;allowScriptAccess&quot;, &quot;always&quot;);
    so.write(&quot;flashcontent&quot;);
    </script>
    <b:include name='quickedit'/>
    </div>
    </b:includable>
    </b:widget>
Then preview your template. If installed correctly, you should see the tag cloud appear in your sidebar. Then you are free to save your template, edit the colors and dimensions as required, or move it to a different location. That's all..!! 

In this default installation, tag cloud includes the following preset variables:
  • Width is set to 240px
  • Height is set to 300px
  • Background color is white (#ffffff)
  • Text color is grey
  • Font size is "12"
To change any one of them, we need to make changes to the individual variables. Consider the following:
  • Editing width height and background color The variables for width and height are found in this line of the script: 
var so = new SWFObject(&quot;http://sites.google.com/site/bloggerustemplatus/code/tagcloud.swf&quot;, &quot;tagcloud&quot;, &quot;240&quot;, &quot;300&quot;, &quot;7&quot;, &quot;#ffffff&quot;); 

Here 240 is the default width, 300 is the default height and ffffff is the default background color in hexadecimal code. Make necessary changes here.
  • Alter the color of text By default, the text is set to display as dark grey ( hex value #333333). You can alter this variable in the following line:   
so.addVariable(&quot;tcolor&quot;, &quot;0x333333&quot;);
  • Adjust the font size The maximum font size of tags is specified in this line: 
so.addVariable(&quot;tagcloud&quot;, &quot;<tags><b:loop values='data:labels' var='label'><a expr:href='data:label.url' style='12'><data:label.name/></a></b:loop></tags>&quot;); 
And finally its over. First preview it and if every thing goes well, just save your template and enjoy your own new rotating 3D tag cloud.
Feel free to share your experiences and problems here with me.
Keep advancing and Happy Computing. :)) 

Credit: bloggerbuster

4 comments:

  1. hey even i was trying that. will do it in sometime :)

    ReplyDelete
  2. Hi CP.. long time no........hws you...??
    Do give it a try and pls tell me how it worked..!!
    Have a great day dear.... :)

    ReplyDelete
  3. http://bitemybits.blogspot.in/search/label/My%20e-Notes

    ReplyDelete