Source of file TagCloud.php
Size: 1,170 Bytes - Last Modified: 2021-12-23T10:41:39+00:00
/var/www/docs.ssmods.com/process/src/code/TagCloud.php
12345678910111213141516171819202122232425262728293031323334353637383940 | <?php /* */ class TagCloud extends ViewableData { public static $tagCloudItems = array(); public static $elementID = "flashcontent"; public static function addCloudTag($itemName, $style) { $tagCloudItems[] = array( "itemName" => $itemName, "style" => $style ); } public function init() { foreach (self::$tagCloudItems as $itemArray) { $cloudString = '<a style=\''.$itemArray["style"].'\'>'.$itemArray["ItemName"].'</a>'; } Requirements::javascript("flash/javascript/swfobjectOlder.js"); $customJS = ' var so = new SWFObject("themes/massolution/images/tagcloud.swf", "tagcloud", "400", "300", "7", ""); so.addParam("wmode", "transparent"); so.addVariable("tcolor", "0xffffff"); so.addVariable("tcolor2", "0xacacac"); so.addVariable("mode", "tags"); so.addVariable("distr", "true"); so.addVariable("tspeed", "100"); so.addVariable("tagcloud", "<tags>'.$cloudString.'</tags>"); so.write("'.self::$elementID.'");'; Requirements::customScript($customJS); $doSet = new DataObjectSet(); return $doSet; } } |