首页 > WordPress > 多彩标签云

多彩标签云

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

分类: WordPress 标签:
  1. 2009年4月7日15:55 | #1

    我还以为来错地方了……..

    Reply:

    。。。踩死你!

    索 Reply:

    踢死你

  1. 本文目前尚无任何 trackbacks 和 pingbacks.