10385 Posts in 2197 Topics by 1712 members
| Go to End | Next > | |
| Author | Topic: | 35157 Views |
-
Re: Preview: Event Calendar Module

6 April 2009 at 4:59am
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: www.vmec.org/workshops
-
Re: Preview: Event Calendar Module

7 April 2009 at 9:04am
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. -
Re: Preview: Event Calendar Module

7 April 2009 at 9:17am
Great catch. I think I see the bug. I'll patch it and check in a new version as soon as I can.
-
Re: Preview: Event Calendar Module

8 April 2009 at 2:10am
I've patched the bug with announcements in the ICS in the latest version.
-
Re: Preview: Event Calendar Module

8 April 2009 at 2:45am
Actually it also fixed Missing Time on CalendarEvent:
Still1) in blackcandy it is not correctly aligned
http://weyl.math.toronto.edu:8888/SilverStripe/test-calendar/2009-04-06
2) no time display on Calendar
-
Re: Preview: Event Calendar Module

8 April 2009 at 10:58am Last edited: 8 April 2009 10:59am
Thanks for the patch. ICS is now working.
But I have the same problem, that time is not anymore shown.
-
Re: Preview: Event Calendar Module

8 April 2009 at 1:09pm
Make sure your template is not using <% control Times %> .. that's deprecated. Just use $_Times.
-
Re: Preview: Event Calendar Module

8 April 2009 at 1:21pm
In Calendar.ss (r18) still was <% if Times %> and <% Control Times %>
Removing them put time into Diary pageSo far
| 35157 Views | ||
| Go to Top | Next > |


