2007-02-26, 09:37 PM
2007-02-27, 10:45 AM
That's abit a lot of work for a little thing. It requires altering the events db table, changing templates, editing php codes. so ...
2007-02-27, 01:23 PM
You could probably get away with doing colours in a predetermined colour (not chosen when creating the event) rather easily. ie, the first event in the month will be green, the second orange etcetc.
I've not tested this but try
calendar.php
Find
Find
Edit template calendar_daybit
Replace
If it works and you need to change the colour, you can do so by editing the $event_colours array at the top.
Anything more complicated and it would require more work as zaher says.
(Note the above code could probably be made into a plugin but I'm at work so can't really make one)
I've not tested this but try
calendar.php
Find
<?php
after add$event_colours = array('F00', '0F0', '00F');
Find
eval("\$daybits .= \"".$templates->get("calendar_daybit")."\";");
before it add$event_colour='';
if($events[$i] != ' ')
{
$event_colour = "style=\"background:#" . ($event_colours[$event_colour_count++ % count($event_colours)]) . "\"";
}
Edit template calendar_daybit
Replace
<td width="14%" height="90" class="trow1" valign="top">
with<td width="14%" height="90" class="trow1" valign="top" {$event_colour}>
If it works and you need to change the colour, you can do so by editing the $event_colours array at the top.
Anything more complicated and it would require more work as zaher says.
(Note the above code could probably be made into a plugin but I'm at work so can't really make one)
2007-02-27, 11:11 PM
I would introduce categories for events (hopefully this is part of the calendar rewrite for MyBB 1.4)and base the color of the event off the category.
2007-02-28, 12:14 AM
Exactly what I need, laie_techie.
I guess the answer is: NOT POSSIBLE NOW.
I guess the answer is: NOT POSSIBLE NOW.