im working with a calendar script called phpicalendar, my install is here. I'm trying to get the cell background to change according to the text in the days event.
ie text = "Busy" or "Pencil" or "Booked"
class = "monthbusy" or "monthpencil" or "monthbooked"
I have figured out how to change the html in the template but im not sure how to carry this accross.
$templatefile; //containing {CHANGE_THIS}
while ($abc == TRUE)
{
/*do some stuff*/]
$data ='get data from calendar file';
/*substitute this in loop for drawing each day*/
}
$templatefile = str_replace({CHANGE_THIS},'callfunction($data)', $templatefile)
I'm guessing i need to create an array inside the loop and then call on it outside to set the cell bg properties! but part of the script only seems to be called when there is an event, meaning i then have to match the array up to the correct cells
also kind of complicated as the cell class is before the event text in the output of html,
hope some of that made sense!
thanks in advance