Logarithmic Tag Cloud for Yii Framework
tags CREATE TABLE `tags` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `frequency` int(11) DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
$this->widget('TagCloud', array('limit' => 50));
On GitHub https://github.com/Troytft/yii-tagcloud
Total 3 comments
Good extension.
https://github.com/Troytft/yii-tagcloud/blob/master/models/Tag.php#L6
Maybe extends CActiveRecord?
@yiqing95 : Thanks, I uploaded new version.
about the tag font , you can refer to this : calculate the tag weight and the logarithms formula : in search of the perfect tag cloud;
@Troy : i read your code , i found you use two sql to retrieve the max and min value from db . may be one sql query is better , see SQL Functions using MIN and MAX together
Leave a comment
Please login to leave your comment.