SimplePortal
Development => Bugs => Fixed or Bogus Bugs => Topic started by: willerby on May 01, 2009, 04:44:44 AM
-
Been reading various threads on improvements to Calendar and Calendar Info block and have tried various other php Calendar blocks but all, including the SP version, have a flaw in how they present events...
In SMF the calendar can be used for events that span multiple days (our classic car club use it for weekend and week long shows/exhibitions etc). These appear in the Calendar Info block as upcoming events but show individual entries for each day... see attached. Othr coded mods have the same issue.
Is it possible to change the coding so that upcoming events that span multiple days only show once?
Thanks
-
Moved to the Bug Reports.
http://simpleportal.net/index.php?issue=191.0
Here is a quick fix:
SPortal2.php
$events = sp_loadCalendarData('getEvents', $today_date, $event_future_date);
$events = sp_loadCalendarData('getEvents', $today_date, $event_future_date);
$displayed = array();
foreach ($events as $day => $day_events)
foreach ($day_events as $event_key => $event)
if (in_array($event['id'], $displayed))
unset($events[$day][$event_key]);
else
$displayed[] = $event['id'];
-
Excellent, as always SiNaN. That was one quick response.
Thanks
W