School District Multisite Shared Calendar?

Events happening in the community are now at Drupal community events on www.drupal.org.
stuen93's picture

So we run our school district main page as well as a separate site for each of our schools with the multi site feature of Drupal. There is a main District site and then 9 more sites, one for each school with a separate database for each school. Each of these individual sites maintains their own calendar using the calendar and date modules. I was recently asked if we could have the calendar on the main district site fed by all of the individual site calendars. Using the feeds module has gotten me close but not quiet there. I could get the nodes to import as events but then without the date information it is really useless.

Anyone have any ideas on if we could do this and if so what direction I should go in?

Comments

can you literally share the calendar?

chrisakeley's picture

I'm not sure if this does what your looking for, but could you have all the sites use the same calendar tables?

maybe

stuen93's picture

I don't think so, the individual sites would all want their own separate calendar info. I suppose I could share the tables and then use views to only display the correct information on each site, that just seems sort of messy. The only site that needs more then it's own calendar is the main district site.

Feeds is the way to go

btopro's picture

If you use Views Bonus Pack on each of the sub-sites, you can have it export the date of the event as long as it's a CCK field. Just make sure that it'll export in the unix timestamp format so that it gets stored in the main site correctly. Make sure the event content type is the same in the district site as it is in the school sites.

This is the way that I've helped people transfer non-event (but still date based) data in the past so this should work. I don't know of a better way to go. Also make sure you send something that's unique for the GUID that it's asking for. I'd recommend maybe mapping the timestamp of creation of the node as that's almost guaranteed to be unique across all sites where the nid will probably not be.

virtually share?

chrisakeley's picture

Assuming all the districts are in one db and have table prefixes, another option would be set up a view for calendar events in the main district site, then write a custom hook to replace the SQL for that view with a big ol' query that uses UNION to include the same data from each of the prefixed tables.

mapping

stuen93's picture

btopro - When I do it that way I am not sure how to get the mappings correct. Should the cck fields show up as an option in the dropdown for mapping the fields for the import?

Yeah, need to make sure you

btopro's picture

Yeah, need to make sure you have the CCK fields in what you're trying to import into. Then in views bonus pack, you set the label for each field that's being exported and type that exact name in as the mapping name in your import site.

Consider RSS to federate your calendars out

zaglick's picture

I would consider taking a listen to this episode of Drupal Voices where they talk about using the feeds module to pull information in.

Drupal in Education

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week