10928 Posts in 2612 Topics by 1809 members
|Go to End|
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:
-- Algebra I
-- Algebra II
I 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.
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:
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:
But 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?
12 July 2009 at 12:50pm
valid_rows = $$('#Form_EditForm_DateTimes_Wrapper ul li div.actions a.editlink');
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.
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.
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.
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.
|Go to Top|