多彩标签云
1、在simple-tags.client.php文件中查找该语句
function getColorByScale($scale_color, $min_color, $max_color)
2、注释掉上述函数中的以下语句(其实不注释掉也是无所谓的)
$scale_color = $scale_color / 100;
$minr = hexdec(substr($min_color, 1, 2));
$ming = hexdec(substr($min_color, 3, 2));
$minb = hexdec(substr($min_color, 5, 2));
$maxr = hexdec(substr($max_color, 1, 2));
$maxg = hexdec(substr($max_color, 3, 2));
$maxb = hexdec(substr($max_color, 5, 2));
$r = dechex(intval((($maxr – $minr) * $scale_color) + $minr));
$g = dechex(intval((($maxg – $ming) * $scale_color) + $ming));
$b = dechex(intval((($maxb – $minb) * $scale_color) + $minb));
3、 在上述被注释掉的语句后增加如下语句(如果没有注释掉就必须加在后面, 否则无效)
//mod by hongfengye start
$r = dechex(rand(0,255));
$g = dechex(rand(0,196));
$b = dechex(rand(0,255));
//mod by hongfengye end
http://blog.2i2j.com/2008/07/add-colorful-tags-cloud-for-simple-tags.html
我还以为来错地方了……..
04月 7th, 2009 at 21:54
。。。踩死你!
04月 15th, 2009 at 14:19
踢死你