Sorry.. I need to update the templates, as well. With the removal of the CollapseDatesAndTimes() function, there is no longer a <% control Times %>
Just use
<% if AllDay %>All day<% else %>$_Times<% end_if %>
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Sorry.. I need to update the templates, as well. With the removal of the CollapseDatesAndTimes() function, there is no longer a <% control Times %>
Just use
<% if AllDay %>All day<% else %>$_Times<% end_if %>
Uncle Cheese,
First off, this has been working great for me. I'm launching two client sites running Event Calendar in the next couple of weeks.
I'm having trouble, though, figuring out how to make a widget-like "upcoming events" list on my homepage? Currently I'm querying CalendarDateTime for StartDate >= today, but it's not pulling in any of the recurring events that have a start date previous to today.
What's the best way to go about this? Thanks for your help.
Glad it's working for you! If you can pass that along to the Silverstripe bigwigs, I'd appreciate it. Right now the chosen calendar module is far less robust than what this offers.
You'll be happy to know that I've anticipated the need for modular event listings.
DataObject::get_one("Calendar")->upcomingEvents(5);
or.. if you want to refine it
->upcomingEvents(5, "Category = 'Foo'"); .. or whatever.
That did it! Thanks again!
ps - I'll post the sites on here once they launch so you can see it in the "wild"
Wow! This is a very good and long awaited module!
Thanks for all the good work.
Maybe I found two bugs:
1) Recurring events are repeated infinitly. I would expect them to end at the End date I entered (if it isn't a bug, consider it a feature request ;-))
2) After entering a date in the exeptionsfield, the field doesn't show up anymore on a next visit.
Both cases happen in 2.3RC3
And a very minor thing: the month,year of the calendar popup is in white. So on mouse out (when the orange background changes to white) it will disappear. At least this happens in FF.
But anyhow: thank you alot!!!
Cool! Thanks for your feedback. I'm hoping all of this eventually gets back to the SS team and it gets listed as an unsupported module. To answer your questions, repeating events currently do not have an end date. It's just a hole in the code that will be filled eventually. For whatever reason I skipped over it until everything becomes a bit more stable.
I'll definitely look into the exceptions, though.
on 2.3 rc4 i received an "saving error" when i am trying to publish or save an event. following email:
Error: Couldn't run query: insert into `CalendarEvent_versions` SET `Recursion` = 0, `CustomRecursionType` = 0, `DailyInterval` = 1, `WeeklyInterval` = 1, `MonthlyInterval` = 1, `MonthlyRecursionType1` = 0, `MonthlyRecursionType2` = 0, `MonthlyIndex` = 1, `ClassName` = 'CalendarEvent', `Created` = null, `LastEdited` = null, `Start` = null, `End` = null, `Content` = null, `Title` = null, `StartTime` = null, `EndTime` = null, `Location` = null, `EventType` = null, `MonthlyDayOfWeek` = '0', `CalendarID` = '0', `RecordID` = 301, `Version` = 2, `AuthorID` = 3 Unknown column 'ClassName' in 'field list'
At line 394 in /Users/tobiaszeller/Sites/sivis_rc4/sapphire/core/model/MySQLDatabase.php
user_error(Couldn't run query: insert into `CalendarEvent_versions` SET `Recursion` = 0, `CustomRecursionType` = 0, `DailyInterval` = 1, `WeeklyInterval` = 1, `MonthlyInterval` = 1, `MonthlyRecursionType1` = 0, `MonthlyRecursionType2` = 0, `MonthlyIndex` = 1, `ClassName` = 'CalendarEvent', `Created` = null, `LastEdited` = null, `Start` = null, `End` = null, `Content` = null, `Title` = null, `StartTime` = null, `EndTime` = null, `Location` = null, `EventType` = null, `MonthlyDayOfWeek` = '0', `CalendarID` = '0', `RecordID` = 301, `Version` = 2, `AuthorID` = 3 Unknown column 'ClassName' in 'field list',256) line 394 of MySQLDatabase.php MySQLDatabase->databaseError(Couldn't run query: insert into `CalendarEvent_versions` SET `Recursion` = 0, `CustomRecursionType` = 0, `DailyInterval` = 1, `WeeklyInterval` = 1, `MonthlyInterval` = 1, `MonthlyRecursionType1` = 0, `MonthlyRecursionType2` = 0, `MonthlyIndex` = 1, `ClassName` = 'CalendarEvent', `Created` = null, `LastEdited` = null, `Start` = null, `End` = null, `Content` = null, `Title` = null, `StartTime` = null, `EndTime` = null, `Location` = null, `EventType` = null, `MonthlyDayOfWeek` = '0', `CalendarID` = '0', `RecordID` = 301, `Version` = 2, `AuthorID` = 3 | Unknown column 'ClassName' in 'field list',256) line 102 of MySQLDatabase.php MySQLDatabase->query(insert into `CalendarEvent_versions` SET `Recursion` = 0, `CustomRecursionType` = 0, `DailyInterval` = 1, `WeeklyInterval` = 1, `MonthlyInterval` = 1, `MonthlyRecursionType1` = 0, `MonthlyRecursionType2` = 0, `MonthlyIndex` = 1, `ClassName` = 'CalendarEvent', `Created` = null, `LastEdited` = null, `Start` = null, `End` = null, `Content` = null, `Title` = null, `StartTime` = null, `EndTime` = null, `Location` = null, `EventType` = null, `MonthlyDayOfWeek` = '0', `CalendarID` = '0', `RecordID` = 301, `Version` = 2, `AuthorID` = 3) line 418 of Database.php Database->manipulate(Array) line 117 of DB.php DB::manipulate(Array) line 830 of DataObject.php DataObject->write() line 641 of LeftAndMain.php LeftAndMain->save(Array,Form,HTTPRequest) line 228 of Form.php Form->httpSubmission(HTTPRequest) line 107 of RequestHandler.php RequestHandler->handleRequest(HTTPRequest) line 121 of RequestHandler.php RequestHandler->handleRequest(HTTPRequest) line 122 of Controller.php Controller->handleRequest(HTTPRequest) line 262 of Director.php Director::handleRequest(HTTPRequest,Session) line 106 of Director.php Director::direct(admin/EditForm) line 115 of main.php
do you have any idea what i am doing wrong. because i really need this function / module - it is really great!
thanks
tobias
Yikes. What a mess. I can't even guess as to what would be causing that. Maybe that version of SS stores the classname in the versions table? I have no idea why it would be trying to add that field to _versions. Is 2.3 RC4 the one that is available for download now? I'll try upgrading my installation and see what happens.