Posted: Thu Nov 07, 2002 6:53 am Post subject: Categories-Can they be displayed with diff backgnd color
Has anyone tried to create a "background color" for each category?
Would it be difficult to implement? I would like to create a calendar that quickly displayed events within a DAY cell in different colors when the ALL CATEGORIES was used.
In summary...I would like a way to have a different colored background for each event based on CATEGORY.
I hadn't thought to try that, but I imagine it could be done pretty easily. You would need to build a conditional section wherever you want background colors controlled, i.e. index.php (<body>) or day_display() in lib.php.
Code:
switch ($cat) {
case "1":
$color = "#0000ff";
break;
case "2":
$color = "#00ff00";
break;
case "3":
$color = "#ffffff";
break;
case "4":
$color = "#ff0000";
break;
default:
$color = "#dedede";
}
Then place $color (or whatever variable you choose to use) into the bgcolor tag for that location.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum