Ok, this is going to take just a little bit of work. First, you'll need to add a color field to your events by going to Customize Event Fields in the admin area, then clicking on Add New Field. Then change the following parameters (notice case):
Display Name: Color
Unique Field ID: color
Description: color
Required: yes
Display in Add Form: yes
Display in Details: no
Searchable: no
Input type: Selectbox
Then put each color that you want to be a choice in Display Text AND Option Value, and click add after each one. The should fill up the list box in the middle. Click Make Default on the one that you want to be the default, then save it. You might want to move it up so it's closer to the title, then click Save Order.
Now you're ready to edit the template. Open your calendarscript/templates/calendars/default directory (substitute the name of your template for default if you aren't using the default template). Then open default.html in your favorite text editor. Around line 34 of the file you'll see:
%>
<HTML>
Just before that closing %>, add this code:
code:
sub colorize {
my $details = shift;
$details->{'title'} = "<font color='" . $details->{'color'} . "'>" . $details->{'title'} . "</font>";
}if ($VIEW eq "EVENT") {
colorize ($EVENT->{'details'});
}
elsif ($VIEW ne "Search") {
foreach $EVENT (@$EVENTS) {
colorize ($EVENT->{'details'});
}
}
else {
foreach $EVENT (@$SEARCH_RESULTS) {
colorize ($EVENT->{'details'});
}
}
That should get all the titles surrounded by the font color tags. If you want more than the title to be colored, you have to go through each section of the template, and wrap everything you want colored with:
<FONT color="<%=$EVENT->{'details'}->{'color'}%>">stuff you want colored.</FONT>
Hope that helps.
------------------
David Whittaker
http://www.uabcm.com
http://bama.ua.edu/~whitt013