Wordpress wp-cumulus loading Delicious Tags & SWFObject v2.2
wp-cumulus flashvars
Create your Delicious Tagrolls at http://www.delicious.com/help/tagrolls.
The jQuery script deletes the color style from the link tag with Regular Expressions and pass it to flashvars.
Example: stackoverflow.com - Background-color hex to JavaScript variable (jQuery)
Downloads: SWFObject jQuery jQuery Plugin URLEncode wp-cumulus
Show code
jQuery Script:
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$delicious_cloud="";
$("#delicious-tags-komashooter ul li").each(function(index) {
$delicious_cloud+= $(this).html();
});
$delicious_cloud_box = $delicious_cloud;
$delicious_cloud = $delicious_cloud.toLowerCase(); // IE fix: transform COLOR in color
$delicious_cloud = '<tags>'+$delicious_cloud+'</tags>';
$delicious_cloud = $delicious_cloud.replace(/color:rgb/g,'color: rgb'), // Google Chrome & Safari fix: transform color:rgb in color: rgb
$delicious_cloud_format = $delicious_cloud.replace(/color: rgb\((\d+),\s*(\d+),\s*(\d+)\);/g,''),
$delicious_cloud_raw = $delicious_cloud;
//$.URLEncode jQuery Plugin
$delicious_cloud =$.URLEncode($delicious_cloud_format);
var flashvars = {
tcolor:"0x111111",
tcolor2:"0x336699",
hicolor:"0xFF0000",
tspeed:"100",
distr:"true",
mode:"both",
tagcloud:$delicious_cloud,
categories:""
};
var params = {
wmode: "transparent",
allowScriptAccess: "always"
};
var attributes = {
id: "myDynamicContent",
name: "myDynamicContent"
};
swfobject.embedSWF("tagcloud.swf", "wpcumuluscontent", "400", "200", "9.0.0","expressInstall.swf", flashvars, params, attributes);
});
</script>
Delicious Tagrolls: Quantity=40<script type="text/javascript" src="http://feeds.delicious.com/v2.1/js/tags/komashooter?title=My%20Delicious%20Tags&icon&count=40&sort=alpha&flow=cloud&name&showadd&color=73adff-3274d0&size=12-35"></script>This Script is stored in a hidden div.
SWFObject:<div align="center"> <div id="wpcumuluscontent"><p>WP Cumulus Flash tag cloud by <a href="http://www.roytanck.com" rel="nofollow">Roy Tanck</a> requires <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> 9 or better.</p></div></div>
alternate content:<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("#delicious_cloud").text($delicious_cloud_box);
$("#alternate_content").html($delicious_cloud_format);
});
</script>WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.