Quote:
Originally Posted by Trommsdorff
OK, thanks again for the quick reply. I'm trying to use it in the postbit_legacy to display in posts, but nothing is showing.
Should I call it differently for there?
|
Posts are processed in a function, so it's not available there. If you want every post to have a different color, do this: hook:
postbit_display_complete
PHP Code:
$r = rand(128,255);
$g = rand(128,255);
$b = rand(128,255);
$randomcolor = dechex($r) . dechex($g) . dechex($b);
and then $randomcolor will be available (and unique) in all of your posts (you can remove the other plugin you created in global_start).
If you want them all the same:
postbit_display_complete
PHP Code:
global $randomcolor;
(while leaving the original global_start hook intact).