返回首頁 » WordPress

把Simple Tags的標籤雲變成彩色!

發表日期:2009年08月28日 Comments (0)

修改前:

修改後:

打開simple-tags.client.php

尋找

1
2
3
4
5
6
7
8
9
10
11
12
$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));

取代為

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

本教學來自:[WP] 用Simple Tags產生彩色標籤雲 | Eric's Blog

標籤:
     
« « 上一篇文章
2009.7.11.二寮日出
下一篇文章 » »
2009.8.29.1/2 Sofa 異國美食聚餐

發表迴響



留言訊息:
表情符號
囧 XD Orz :32: :31: :30: :28: :27: :25: :24: :23: :22: :21: :20: :19: :18: :17: :16: :15: :14: :13: :12: :11: :10: :09: :08: :07: :06: :05: :04: :03: :02: :01: