19 - Events Calendar Overview
Most active churches will have, at any given time, a number of special events going on that need to be communicated to members and potential visitors alike. From a facilities perspective often there are large meeting spaces that need to have an availability calendar so members planning an event know when a particular space is available. ExpressionEngine has some built-in calendaring capabilities that can, at times, meet these requirements. In this chapter I’ll provide an overview of the EE calendaring capabilities, talk about it’s strengths and weaknesses, and cover some options to the EE calendar.
ExpressionEngine Calendar Overview
I know a number of you have been waiting for me to get to this part of the site build—and it has me a bit worried as I’m afraid the expectation is that I’ll show how to build this really great full-featured event calendar that slices and dices event information like something from Ronco.
The EE calendar just isn’t that complex, however, so I want to do a bit of work to manage your expectations before plowing into the code. Let me lead off with an overview of the EE’s calendar function - a description I wrote in the comments on an earlier chapter in this series:
First - imagine a weblog. Now add an entry on the weblog. It goes in with a publish date. Many blogs have those little sidebar calendars that show you when posts were made - so if you posted an entry on the 6th of March that date would then become clickable. Clicking on it would filter your current view down to just the entries posted on that date.
Got it? Now - blow up that small calendar to be full-page, post some entries with future dates, and tell EE to show entries with future dates. Throw the title of the post on the full-page calendar view. Link the title to another template that can show more details for one event.
That’s the essential EE calendar capability. It’s basic weblog post information, plotted on a calendar view, with the ability to show entries with future dates, and link to another template that can show all the content for that one event.
There are a number of advantages to using EE for an event calendar. First - you can offer content administrators a consistent publish and edit process and interface. Entering an event is the same as a new ministry.
Second - you can take advantage of categories or relationships to group event content together with other content. I plan on doing that here, using relationships to tie an event to a ministry so that I can show specific upcoming events on a ministry page.
Third - you if go down the path of memberships on your site you can allow any registered member to submit a calendar event using a Stand-Alone Entry Form. Those entries can then take advantage of Custom Entry Status so that the new submission goes to “pending” status and doesn’t appear on the site. You can then implement an Entry Notification such that a calendar administrator would get an email when a new event is submitted. The calendar administrator would then review the event and if approved set the status to “Open” which would cause it to display on the site.
The native EE calendar doesn’t do recurring or multi-day events - but there is a third-party plugin that adds that capability - so you post an entry, some details about how it repeats, and then your event shows on the full-page calendar view multiple times.
The native weblog:calendar tag doesn’t support custom fields, which means that on the full-page calendar view you are limited to what can display for each event. Options are title, author, and entry_id. There are ways around this restriction that aren’t too hard, so I’ll cover one here.
EE’s calendar also doesn’t, inherently, work with categories. In other words, you can’t assign categories to the weblog driving your event calendar and then use native EE tags to link to a categorized view of the overall calendar. You can get to this functionality with a bit of php trickery, but for this series I’ve decided to stay within the bounds of native EE functionality only.
There is no native iCal support - although there seems to be some movement in the forums around it.
If native EE doesn’t meet your calendaring requirements the next option I’d suggest looking at is using a Google Calendar. There is a relatively new Google Calendar Plugin for pulling information from a public calendar to EE. However it doesn’t have much activity around it and I haven’t tested it—so don’t consider this link an endorsement.
Having Said All That
My plan here is to show the implementation of a simple event calendar using native EE tags. I’ll push the bounds a bit, showing how to use entry_id as a bridge to pull custom fields to the full-page calendar view. Other than that, this will be a very straightforward implementation.
In the Real World
My church started with an EE calendar - using the the repEEt plugin linked to above. I also implemented a Stand Alone Entry Form with workflow to allow calendar submissions by any registered member. It worked well when we had few events - but in the end having another location, more events, and ultimately issues relating to DST (some event times would respect DST, some wouldn’t) pushed us to use a Google calendar instead.