How to Build the Best Event Management System in Drupal

To sustain this free service, we receive affiliate commissions via some of our links. This doesn’t affect rankings. Our review process.

If you’ve used Drupal before, you’ve no doubt come across the event module, which has been offered as an add-on Drupal since the early stages of Drupal. It provides basic event functionality, and a separate event repeat module can be used to create repeating events. The problem with the event module is that the code is relatively unstable, there are numerous versions out there that all use a different code base, and in general, the module is losing support.

Time to Dump the Event and Event Repeat Modules

So, it’s time for a new, stable, and more reliable event management system in Drupal. We’re going to show you how to use the more current CCK, Date, Calendar, and Views modules to create an event management system that is intuitive, efficient, and reliable. Not only that, but it offers the same functionality that the deprecated event module offered (such as repeating events), plus more. The best part is that your site won’t suffer from the infamous infinitely repeating events error, that has caused entire servers to crash due to an overload of SQL queries.

Using CCK, Date, Calendar, and Views to Manage Events

Whether you’re using Drupal 5.x, 6.x, or the soon to be released 7.x, the approach we’re about to outline is similar in all scenarios, but might involve a couple of settings or interface settings that look slightly different. If you’re having trouble, feel free to comment below. Now for a step by step approach on getting your new Drupal event management system up and running.

1) Installing the Modules

The first thing you’ll want to do is visit the Drupal project pages of the following modules, and download the latest stables releases corresponding to your Drupal version:

We’ve added the Token module to the list simply because an outdated token module can cause so many compatibility issues. Once you’ve downloaded the modules, upload them to your website, login to Drupal and enable them by browsing to example.com/admin/build/modules (Site Building -> Modules -> List or something similar). Once you’ve enabled the above modules, you’ll want to modify some settings

Date module settings – the first thing you’ll want to do is set the timezone for the date module. To do so, browse to Administer -> Site Configuration -> Date and Time. Adjust the settings according to your preferences.

2) Creating the Event Content Type

Next you’ll want to browse on over to Administer -> Site Configuration -> Content Types, and create a new content type called “event.” You can leave the default settings (Title, Body, etc.) as is, decide if you want to enable comments, etc. and then save your content type.

Adding the date field – next you’ll want to add a date field to your event content type. To do so click on the “add field” tab while editing your event content type. We’re going to name the field “date”, and for the input format we’ll pick “Date”, of type “text field with jquery pop-up calendar” (you can also select “text field with custom input format if you prefer to select the dates from a list, as opposed to the pop-up style calendar frequently used on airline booking sites).

Click the “create field” button to save your new date field. You should be taken directly to the date field settings page. If you’re not, say you’re taken to the “manage fields” tab, you may get the message that no fields are setup. Simply click the “add field” tab again, and under “add existing field” select the “field_date” field we just created, and click the “add field” button. If you’re still not seeing any fields under “manage fields”, update your site using example.com/update.php to make sure all your modules are up to date. Then, browse back to your content types and try adding the “field_date” back. It should work this time. However, if you’re not able to operate on the field – ie. delete it or edit its settings, you may need to delete the content type and start over (ie. create the event content type from scratch as described above). This time, if successful, you should be taken directly to the date_field settings area after adding it.

Configuring the date field – on the date settings page, you can pretty much leave things as is, with the following exceptions:

  • Under “data settings” check “required”
  • Under “data settings” -> multiple -> select “repeating”
    • Make the “to date” optional
    • Unselect “Second” from “granularity” if it’s not already
  • Change “time zone handling” to “site’s time zone”
  • Click the “Save field settings” button to save your work

3) Setting Event Paths (optional)

If you don’t already have it installed, you’ll want to install the Pathauto module. Under the pathauto settings, select “node path settings,” and enter something like the following as the “pattern for all event paths”: event/[yyyy]/[mm]/[title-raw]

Make sure to click the “save configuration” button at bottom. This will help you create SEF (Search Engine Friendly) url’s that will correspond to the date of your events. For example, if you create an event on October 15, 2009, titled “Example Event,” the URL for this page will look like example.com/2009/10/example-event in your browser’s address bar. This makes for an organized and intuitive approach to managing your event page addresses.

4) Setting up the Calendar View

Now that we’ve got our event content type all set, you’re able to create events. The next step is to set up the calendar view so the events can be organized and seen in a calendar. Browse to Administer -> Site Configuration -> Views, and you’ll see a pre-created view entitled “calendar.” Click the “enable” button next to it, followed by the “add” button.

Adding a date field to your calendar view – Under “fields” you’ll want to select your date field under “add field” (usually Date: date (field_date)) and click the “add field” button. Once it’s added, change the “handler” to “do not group multiple values.” You can leave the remaining settings on their default values or tweak them to your liking, and then click the “save” button at the bottom of the page to add the calendar view.

By default, you’ll be able to access your event calendar at example.com/calendar. You can create an alias if you wish the URL to be different.

Putting It All Together – Creating a Repeating Event

That wraps it up – you’re all set. By browsing to Create Content -> Event (example.com/node/add/event), you can add an event. Left-click in the date field to have a calendar pop-up from which you can select the date. Then start typing the time in the time field, and it will automatically adjust to allowed values according to the time zone settings you determined at the beginning of this tutorial. One advantage to the CCK/Date/Calendar method of managing events is that you only have to enter a start time, the finish time is optional. Very handy if your event doesn’t have a finish time (with the old event module you’d have to enter the finish time the same as the start time).

To create a repeating event, simply select the frequency (every 1, every 2, etc.) and period (day, week, month, year), along with an end date (you can extend the range for start and end dates in the initial date field settings, described above). Adjust the remaining settings and hit the “submit” button to save your event. It’ll show up in your event calendar, and when you click on it you’ll get a nifty pop-up with a summary of the event. Click on the event title to browse to the event page with full event details.

Disclaimer: This website contains reviews, opinions and information regarding products and services manufactured or provided by third parties. We are not responsible in any way for such products and services, and nothing contained here should be construed as a guarantee of the functionality, utility, safety or reliability of any product or services reviewed or discussed. Please follow the directions provided by the manufacturer or service provider when using any product or service reviewed or discussed on this website.

Alex bring a series of in-depth articles on search marketing and content management systems as well as troubleshooting tips to We Rock Your Web's collection. He is an avid tennis player, nature enthusiast, and hiker, and enjoys spending time with his wife, friends, and dogs, Bella and Lily.

17
Leave a Reply

avatar
newest oldest most voted
Josh
The pathauto pattern of event/[yyyy]/[mm]/[title-raw] in the article did not work. I can’t see how it would though; it doesn’t have any idea where to get the Year and Month from. If it was able to get a year and month, it would be the year and month that the event was posted, not the year and month that the event is taking place.

After playing around with it for some time, I managed to get a pattern that works. This is for the field field_date; however it uses Entity API (you’ll need to install it, http://drupal.org/project/entity) which you reference by using dashes instead of underscores. So the field name is still field_date, but a dash is used when referencing it (so field-date.) The pattern that I used in pathauto that worked for me is:

events/[node:field-date:0:custom:Y]/[node:field-date:0:custom:m]/[node:title]

I hope this helps anyone else who has been trying to do this. This will make the URL based on the event date not the date the event was posted.

Anonymous
I have a calendar displaying many events, multiple events per day at 5 different venues (taxonomy terms)

Do you have any experience getting multiple events occurring in One Day to order by taxonomy term?

DAY 1

Event X at Venue 1 (taxonomy 1)

Event F at Venue 2 (taxonomy 2)

Event L at Venue 3 (taxonomy 3)

Day 2

Event Q at Venue 1 (taxonomy 1)

Event U at Venue 2 (taxonomy 2)

Event M at Venue 3 (taxonomy 3)

I would like events to always be ordered TAXONOMY 1, 2, 3 within a day…and so on. I’m having a lot of trouble getting views to respect a sorting other than Date (time of event).

Anonymous
Thanks for the great post. This is a great start but I have a few comments:

First of all, I would suggest once you enable the Calendar view that comes default with the Calendar module, to Clone it and use the cloned view instead of the original. Then, disable the original Calendar view to return it to a safely unaltered state for later reference if your new ones gets messed up.

Next, it’s important that the Pattern for all Event paths refers to the from date of the actual event and not the date the node was created. For example, I may create an event today April 6, 2011 (2011-04-06) but the actual event that I’m listing is starting in a week from now (2011-04-13). In this case, I (personally) want the path to reflect the start of the event and not when I made the posting. With my CCK field called

field_date_range

the Pathauto Pattern for all Event paths is:

event/[author-uid]/[field_date_range-date]/[title-raw]

(Note I have the author-uid in there because I have multiple users who post events, so I need this degree of separation for later).

For Views, I adjusted the Fields to also read the event’s start date – since the updated date is not very useful. The view of Calendar Page had its path changed from ‘calendar’ to ‘event’ to match my Pathauto settings. Lastly, I switched the argument positions around so they are the following order:

User: Uid Date:

Date (node) Content: Event Date Range (field_date_range) - From date

This setup allows linking to an event from the Views calendar or from anywhere else to be consistent – for example: www.mysite.com/event/3/2011-04-13/my-wonderful-event. Hope this helps out.

~Raj

PureWebMedia.biz

Anonymous
I love Drupal, but they’re developers have seriously dropped the ball when it comes to event management/ calendar systems. I realize that date + CCK + calendar provides a relatively solid, node-based event management system with a fairly good looking calendar. But – the repeating event system is totally flawed (it merely creates “aliases” to the base node event, which lists the original date, thereby confusing users looking to access details on a date in the future).

I’m willing to sponsor management of a solid event management/ calendar module. I know there’s got to be some developers out there willing to jump on this boat, I can’t imagine the demand’s not there…

Anonymous
I really liked it. It is exactly what I need. Thanks.

Anonymous
I filled in all the fields as you mentioned here. I am a new guy to Drupal so can anyone help me? How can I fix the event and how can I use it in our website. Thanks in advance.

Anonymous
Is there a way to do an event management with an event payment option?

We Rock Your Web
Yes, simply install a payment module such as Ubercart and set up payment links on your event pages. You could also access protect pages (there are many modules that provide different levels of access protection) and make them available only to users that have submitted payment.

Anonymous
In the input format, it should be selected as “Text Field with Repeat Options”

Anonymous
Thanks for all the great information. I am glad I ran across your blog. I look forward to reading your next post.

Anonymous
How could I get the events that I put on the calendar to be emailed to my membership or subscribers at a determined “alarm” time?

We Rock Your Web
Check out the Drupal thread on working with mail and messaging for options.

Anonymous
I created a repeating event and when I click on the event title the full event details display a list of every day on which the repeating event occurs. So say I setup an event that repeats every Thursday. If I click on the event link for Thursday January 21st, I’d like the event details to only list Thursday Jan 21st, not every Thursday.

I downloaded and installed the date repeat node generator but then you can’t edit all the repeating dates easily. Do you have any recommendations?

We Rock Your Web
If you click on the title of the event, you should get the event details for that event only, not a list of all the repeating events. Is that what’s happening?

Anonymous
I get everything setup but when you click on the link from the calendar to the repeating event instead of displaying the date and time of the single event taking place on that day. I see the date and time of every instance of the repeat event. I’m using Drupal 6.14 with Calendar 6.x-2.2, Date 6.x-2.4, Pathauto 6.x-1.3, Token 6.x-1.12, Views 6.x-2.8, and cck 6.x-2.6. The urls for the repeating event are all the same because they’re all associated with one node. I’ve tried the date repeat node generator but once I have several nodes generated for a repeat event there is no easy way to edit all the separate nodes at once.

Any help is appreciated!!

Thanks

Anonymous
I don’t see any forms for selecting frequency or period as the article suggests. It would be nice to be able to repeat an event. Otherwise, this is a great article. Thanks!

We Rock Your Web
Make sure that when you install the date module you install the date repeat option as well.