分类归档:分享

修改simple tags 2.1.1 彩色标签云

这几天simple tags更新了。。。原来的颜色很乏味。。。又要改了!

修改Simple Tags的方法如下:
1.找到wp-content/plugins/simple-tags/inc/class.client.tagcloud.php文件
2.再搜索如下语句:

1
2
3
4
5
6
7
8
9
10
$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.修改为:

1
2
3
$r = dechex(rand(0,255));
$g = dechex(rand(0,196));
$b = dechex(rand(0,255));

只要修改$r $g $b…效果看右边~~~

分享家:Addthis中国
第 1 页,共 13 页12345...10...最旧 »