10929 Posts in 2613 Topics by 1809 members
Page: 1 2
|Go to End||Next >|
25 August 2009 at 7:27am Last edited: 25 August 2009 7:27am
Revision 74 of Event Calendar introduces a new UI feature:
This is an AJAX-based counterpart to CalendarWidget that is event-aware and will mark dates that have events. Further, because it is AJAX based and not generated completely client side, it adheres to MVC, making it easy to extend and customize. To change the look and feel, simply create your own LiveCalendarWidget.ss in your mysite/templates directory, or simply create an extension to LiveCalendarWidget.css for simpler modifications.
This revision has also deploys some handy new functions through a new SiteTree decorator, making calendars easier to syndicate with much less coding.
On any page, you can now use:
<% control UpcomingEvents(count,calendar-url-segment) %>
<% control RecentEvents(count,calendar-url-segment) %>
Note that if no url segment is given, the controller will assume there is only one Calendar in the site tree and get an instance of it. In other words, unless you have multiple calendars on your web site, you can use $CalendarWidget, <% control UpcomingEvents %>, etc.
Also note that "count" defaults to 5.
Lastly, a date string can be given to $CalendarWidget and $LiveCalendarWidget to override the default start date, for example:
26 August 2009 at 10:48am
Hi UncleCheese and thanks so much for developing this awesome module.
I've set it up and all looks good, except for when I add a new Calendar Event.
I can set the name etc on the Event but when I select the dates tab and want to add a new date, the date picker doesn't show up and I can't type into the box :-/
I've tried this in FF 3.5, Chrome and IE7
29 August 2009 at 4:44am
I'm not too sure what you mean by the first question. You'll have to give me a better example.
For your second question, there are three criteria for finding an event within a date range:
(StartDate <= '$start' AND EndDate >= '$end') OR
(StartDate BETWEEN '$start' AND '$end') OR
(EndDate BETWEEN '$start' AND '$end')
So I would think your event would catch the third filter, having an end date between Sept 1 and Sept 30.
29 August 2009 at 5:37am
In Silverstripe, you're always able to call a controller from the URL, as far as I know. It's better practice to declare a $url_segment variable in your controller to make this a little more secure, though. If you use the $allowed_actions array, you can limit which functions can be run from the URL, as well, so it's pretty secure.
Just checked in that change to give Announcements the same criteria. Want to test it?
29 August 2009 at 6:18am
Is this the wrong thread to post problems with the module?
29 September 2009 at 9:30pm
How can I localize $LiveCalendarWidget, this is what I'm looking for my home page but I have to translate some elements into polish.
I see some mnemonics likebut translating it in event_calendar/lang/pl_PL.php
<optgroup label="<% _t('LiveCalendarWidget.JUMPTOMONTH','Jump to...') %>" />
or mysite/lang/pl_PL.php has no effect. I did translation with CalendarWidget by changing into $lang['pl_PL']['CalendarWidget']['LOCALEFILE'] = 'date_pl.js'; but habe no idea how to do that with Live widget
30 September 2009 at 9:27pm
No one knows ?
30 September 2009 at 11:06pm
Ok as I see mnemonics are used from event_calendar/lang but only from en_US.php.
All other page elements are properly translated to polish language but $LiveCalendarWidget is not reacting.
I'm setting language in Page_Controller init method like this:
if ( ereg("^".Translatable::default_lang(), $_SERVER['HTTP_ACCEPT_LANGUAGE']) )
Page: 1 2
|Go to Top||Next >|