Tuesday, July 19, 2011

新玩意

会动的云
相当好玩呵

Step 1:
记得先把原来的 template 下载保存好
以防万一

然后 Design→Edit HTML→Expand Widget Templates → ctrl + f :

<b:section class='sidebar' id='sidebar' preferred='yes'>



<b:section-contents id='sidebar-right-1'>




<b:section-contents id='sidebar-left-1'>

Step 2:
把以下的 code
paste 在 Step 2 的 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'>flash tag cloud </div>

<script type='text/javascript'>

var so = new SWFObject("http://sites.google.com/site/bloggerustemplatus/code/tagcloud.swf", "tagcloud", "240", "300", "7", "#ffffff");

// uncomment next line to enable transparency

//so.addParam("wmode", "transparent");

so.addVariable("tcolor", "0x333333");

so.addVariable("mode", "tags");

so.addVariable("distr", "true");

so.addVariable("tspeed", "100");

so.addVariable("tagcloud", "<tags><b:loop values='data:labels' var='label'><a expr:href='data:label.url' style='12'><data:label.name/></a></b:loop></tags>");

so.addParam("allowScriptAccess", "always");

so.write("flashcontent");

</script>

<b:include name='quickedit'/>

</div>

</b:includable>

</b:widget>

<small><a href="http://mazeermohamad.blogspot.com/2011/06/how-to-add-flash-tag-cloud-for-blogger.html" target="_blank">get this widget here</a></small>

Step 3:
背景换色可以参考这个
在这里更改:
var so = new SWFObject("http://sites.google.com/site/bloggerustemplatus/code/tagcloud.swf", "tagcloud", "240", "300", "7", "#ffffff");

Step 4:
格子大小可以随意变换
在这里更改:
var so = new SWFObject("http://sites.google.com/site/bloggerustemplatus/code/tagcloud.swf", "tagcloud", "240", "300", "7", "#ffffff");


Step 5:
字体大小可以随意变换
在这里更改:
so.addVariable("tagcloud", "<tags><b:loop values='data:labels' var='label'><a expr:href='data:label.url' style='12'><data:label.name/>

不过
我发现这代码
它不能解读中文标签
只可以显示英文标签





Info courtesy to Mazeer

Smiley Thanks for reading my blog

0 个鼓励:

Post a Comment

LinkWithin

Related Posts with Thumbnails