In essence, this feature boils down to having a calendar view that's restricted to only showing event nodes from group X. So you could go to (for example) event/group/34 and see a calendar only showing group 34's events (obviously, only if they were either public or you were a member of the group).
Initially, I was thinking we could do this easily once the group-based taxonomy feature was completed. But after talking w/ Moshe about this, he seemed to indicate that this would only solve it from a UI perspective, not a back-end perspective.
Since this is a feature that I know I personally have been asked about a ton (we're currently coding this as a part of BuyBlue's OG enhancements), I figured I'd place an issue up here in the interim to get feedback on approaches. Any thoughts?
Comments
Comment #1
thetrickyt commentedI think that it will be possible to do this once/if the patch to enable the Events module for Views is committed (http://drupal.org/node/49157).
This should expose event start/end date information to the Views module. Using this with the OG_group id already exposed, you should be able to create something pretty simply. Of course this would only give you a table list view by default - but you do have the choice of then themeing the View too.
I've done a simialr thing to this to create a 'Group News' page. The only problem I've still not managed to solve yet is to maintain the Group's theme when the View is presented - it always defaults to the main site theme.
Comment #2
karens commentedI'm in the process of making improvements to the views patch. The original patch allowed for you to add events fields to a view and some basic filters that use either a drop-down selector or a jscalendar to select a date or date range. Views also will take arguments from the url, so now I'm in the process of adding in changes that will allow you to do exactly what you mention here -- go to event/views/2005 and see only events from 2005 or event/views/12 and see events from taxonomy term 12, etc. It's very powerful. I'm stuck at the moment on something that may be a bug in core that is garbling queries if you are using any sort of node access and try to do queries that use FROM_UNIXTIME which is needed for many of the views handlers. Merlin is going to see if it is indeed a problem in core. Once that is worked out, the sky's the limit on views :-)
By the way, in views you are not limited to table views. In the view you can select to see your view as a table, a list, a teaser list, or as full nodes, so there are lots of possiblities. The default view is set up as a table, but that is easily changed.
Comment #3
dwwi'm interested in this, too. no insights yet (no time at the moment to think about this), but wanted to post so i could track the discussion. ;)
Comment #4
webchickI've uploaded a start to my sandbox here: http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/sandbox/we...
Turns out, event module includes an API call to create custom calendars called event_get_calendar. You pass in a custom list of nodes and it displays them.
The module is "kind of" working in that it shows the events in the right place, but there are still some bugs to work out in that it's displaying whichever is the last node in all X places. I suspect some logic problem in event_get_calendar but haven't been able to dig too closely yet.
Comment #5
hintbw commented#1 - I'm a n00b drupalite (from the programming angle in particular) but I believe I've found the problem with the group calendar view not maintaining the group them. See this post in the issue tracker for og calendar for how I solved this with the default og calendar view.
In response to webchick on #4, I tried following some of the event module's calls to generate the event nodes and here is what I found (perhaps so somebody else much more capable than me can figure it out). First the node object generated and displayed by the og_calendar module is missing the event_current_date property (I don't know how critical this is as it is seems to be a generated value at the time of the page display, but it's missing nonethelss) when compared with event node objects viewed through the normal event module.
Secondly, apparently because the og_calendar events are missing that event_current_date property, when the calendar is generated it defaults to a 1/1/1970 setting. Also, as near as I can tell within the event_get_calendar function it is failing on row 908 of the event module to output a properly themed calendar_date_box.
I'll pick things up from there later unless somebody else is able to figure something else out.
Comment #6
killes@www.drop.org commentedThere's a og_calendar module now.
Comment #7
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.