10390 Posts in 2201 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1720 Views |
-
Event Calendar: problem with repeating events and question about categorizing events

3 July 2009 at 1:02pm
I'm just starting to work with Uncle Cheese's Event Calendar module in my first SilverStripe site. I have a couple of questions about how to do what I want with the module.
1) Repeating events
I've created a couple of events, and in the CMS I see a checkbox "Repeat this event". When I try to check the box, I receive the notification "To repeat an event, you must specify a date first." The events I am working with have dates assigned already. I'm curious about how to properly set up an event to be a repeating event.2) Categorizing events
I want to create my own class of events that facilitates categorizing events with a hierarchical category structure. For example, I want to have categories like this:-Math
-- Algebra I
-- Algebra II
-- Trig
-Science
-- Chemistry
-- PhysicsI want to assign a single category from either level to each event, and will then set up a filter so that if the user chooses to just see "Algebra I" courses they can do that, or they can choose "Science" and see all events in the "Chemistry" and "Physics" categories.
The last couple of sites I've built have been with Ruby / Rails and I can immediately envision how I'd implement this there (create a model for CourseCategory that has a self-join so another CourseCategory can serve as the parent of the current category, and then set up a CourseEvent model that has_one CourseCategory). Being new to SilverStripe, I'm interested in any advice about the "SilverStripe way" to do something like this. If I create a CourseCategory model that isn't a subclass of Page, is there any scaffolding that will make it easy enough to fill in values in the db for this class in the CMS? Or should I simply store the valid categories as private variables within my CourseEvent class and maintain them that way? Ideally there would be a way in the CMS to manage the categories, but I'm not sure with SilverStripe of the best way to go about this.
Any help or suggestions on either of these issues is appreciated.
-
Re: Event Calendar: problem with repeating events and question about categorizing events

4 July 2009 at 4:39am Last edited: 4 July 2009 4:39am
To repeat an event, you have only a single date/time assigned to the event. No more, no less.
You can extend the calendar filter to have any number of criteria to narrow the scope of your calendar view. Unfortunately, right now, it's just a one-to-one value comparison, e.g. "category = 'abc'" and it lacks the smarts to be aware of some sort of hierarchy in your category model. That's a little more complex, and it would required overloading at least these two functions in your Calendar subclass:
Calendar_Controller::Events();
Calendar::getFiltersForDB(); -
Re: Event Calendar: problem with repeating events and question about categorizing events

7 July 2009 at 5:16pm Last edited: 7 July 2009 5:17pm
I must be missing something here. I've read over the module documentation here:
http://doc.silverstripe.com/doku.php?id=modules:event_calendarBut in my installation (I've downloaded the latest http://silverstripe.org/assets/modules/trunk/modules-event_calendar-r51.tar.gz), the calendar "configuration" page does not have an "Event Description Behavior". See attached screen calendar_config.png.
My event creation screen is attached as event_create.png.
I end up with the screen in event_repeat_error.png which has one date + time, yet I cannot make this a repeating event.
What am I doing wrong?
-
Re: Event Calendar: problem with repeating events and question about categorizing events

12 July 2009 at 12:50pm
Did some investigating, and discovered that despite having a single date / time row defined for my event, line 106 of event_calendar/javascript/calendar_interface.js sees valid_rows as 0, which triggers the alert I'm seeing (preventing me from setting up a repeating event). The valid_rows variable probably should be set on line 79, but my page source does not show any li elements with class "data" within the "Form_EditForm_DateTimes_Wrapper" element. In case anyone else runs across this problem, I changed line 79 to
which does not address the root of the problem (the fact that the li elements don't have class "data" assigned), but it does seem to be working as a temporary fix until I've had time to look into the problem further.valid_rows = $$('#Form_EditForm_DateTimes_Wrapper ul li div.actions a.editlink');
If anyone has an idea why my li elements don't have class "data" or any other reason the original javascript doesn't work, please let me know. Would rather fix this with a more robust solution if possible.
-
Re: Event Calendar: problem with repeating events and question about categorizing events

14 July 2009 at 1:19am
That was a bug in a really old release of dataobjectmanager. When did you last update? I believe I started classing the li tags "data" dozens of releases back.
-
Re: Event Calendar: problem with repeating events and question about categorizing events

14 July 2009 at 5:41am
I installed SS about 2 months ago, so using those versions of the core and modules. I'll try updating dataobjectmanager and see if that fixes the problem.
-
Re: Event Calendar: problem with repeating events and question about categorizing events

14 July 2009 at 2:23pm
I downloaded a fresh dataobject_manager from svn, and changed my event_calendar from the stable release on the download page to the latest from the unstable svn (which makes me nervous about using on a production site), and the issue with repeating events is resolved. I'm not sure how I got an out-of-date version of dataobject_manager (if that was the culprit) since I installed from svn just a couple of months ago, but in any event, I think I have the latest now.
-
Re: Event Calendar: problem with repeating events and question about categorizing events

14 July 2009 at 3:41pm
Yeah, dataobject_manager gets updated at least once a week. Two months is an eternity.
I'm not sure why it's listed as unstable. I'll look into that. If it makes you feel any better, I have that SVN hooked up to many dozens of production sites. So if it breaks, trust me, I feel it, too.
| 1720 Views | ||
|
Page:
1
|
Go to Top |

