Cumulus的中文支持和php应用,先看我的效果,动态效果在这里查看:http://www.huilinwang.com/blog/tag_cloud.html
WP-Cumulus本来并不支持中文,但是在其官网<http: www.roytanck.com="">上给出了解决办法,下载fla文件,重新加入支持的字体即可。
首先根据blinux之前提供的wp cumulus教程将插件安装好,然后下载tagcloud.swf这个flash.
下载地址:http://www.nonabyte.net/img/wp-plugins/tagcloud.zip
直接解压将tagcloud.swf这个flash覆盖之即可搞定.
这是wordpress给出的运行办法,<http: www.roytanck.com="" 2008="" 05="" 19="" how-to-repurpose-my-tag-cloud-flash-movie="">,代码:
<pre class="brush:jscript;"> <script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var so = new SWFObject("tagcloud.swf", "tagcloud", "600", "400", "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><a href='http://www.roytanck.com' style='22' color='0xff0000' hicolor='0x00cc00'>WordPress</a><a href='http://www.roytanck.com' style='12'>Flash</a><a href='http://www.roytanck.com' style='16'>Plugin</a><a href='http://www.roytanck.com' style='14'>WP-Cumulus</a><a href='http://www.roytanck.com' style='12'>3D</a><a href='http://www.roytanck.com' style='12'>Tag cloud</a><a href='http://www.roytanck.com' style='9'>Roy Tanck</a><a href='http://www.roytanck.com' style='10'>SWFObject</a><a href='http://www.roytanck.com' style='10'>Example</a><a href='http://www.roytanck.com' style='12'>Click</a><a href='http://www.roytanck.com' style='12'>Animation</a></tags>");
so.write("flashcontent");
</script>
```
<p>
需要注意的是,如果需要支持中文,在增加tagcloud的地方,里面并不能有中文,必须将其urlencode。这样就可以了。</p>
<p>
ps:指定颜色的地方需要注意的是 #cccccc 改写成 0xcccccc,不要用#号。</p>
WP-Cumulus php 中文 标签云 tag cloud Cumulus