Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Preview: Event Calendar Module


293 Posts   41959 Views


6 April 2009 at 4:59am 4085 Posts

1) I took out $MonthNavigator, because I assumed no one was using it, and it seemed redundant to the CalendarWidget. I've put it back in an done a little code cleanup on it.

2) To change the date display is not the most user-friendly thing in the world, but it's very flexible. In your _config.php file, edit the $customDateTemplates array. You can change any one of the following date scenarios:

- OneDay
- SameMonthSameYear
- DiffMonthSameYear
- DiffMonthDiffYear
- OneDayHeader
- MonthHeader
- YearHeader

"Header" keys are for the date range headers that are displayed when a range is selected. All others apply to each event listing, specifying different scenarios, e.g. if an event spans several days in the same month, you want something like "Oct 6-8, 2009" (US format).

You'll find a bunch of date format keys in the _config.php file that you can use to build your own. To make the update you want, you can do something like:

$customDateTemplates = array (
'OneDay' => '%{sWeekDayFull}, %{sMonFull} %{sDayNumShort}%{sDaySuffix}, %{sYearFull}'

If you plan on having dates that span multiple days, you should spec out the other keys for "SameMonthDiffDay", etc.. Otherwise, it falls back on the lang file.

3) First, you need to read the documentation on extending the calendar. There's a good recipe in the Wiki. Once you've done that you can build a custom Events function that might look like this:

class MyCustomCalendar_Controller extends Calendar_Controller
public function FundRaisingEvents()
return parent::Events("Type = 'Fundraising');

We did something like that on this site:


7 April 2009 at 9:04am Community Member, 41 Posts

Hello UncleCheese

I have an event_calendar (latest trunk) with SS 2.3.1 named events. Only announcements are saved.
When I make an ICS export I got as subject the name of the calendar (events).
It seems that 'SUMMARY' in the ICS-file is not correctly written with the title of the announcement, it is written with the name of the calendar.


7 April 2009 at 9:17am 4085 Posts

Great catch. I think I see the bug. I'll patch it and check in a new version as soon as I can.


8 April 2009 at 2:10am 4085 Posts

I've patched the bug with announcements in the ICS in the latest version.


8 April 2009 at 2:45am Community Member, 128 Posts

Actually it also fixed Missing Time on CalendarEvent:

1) in blackcandy it is not correctly aligned

2) no time display on Calendar


8 April 2009 at 10:58am (Last edited: 8 April 2009 10:59am), Community Member, 41 Posts

Thanks for the patch. ICS is now working.

But I have the same problem, that time is not anymore shown.


8 April 2009 at 1:09pm 4085 Posts

Make sure your template is not using <% control Times %> .. that's deprecated. Just use $_Times.


8 April 2009 at 1:21pm Community Member, 128 Posts

In (r18) still was <% if Times %> and <% Control Times %>
Removing them put time into Diary page

So far