Big Stock Photo Promo Code

Big Stock Photo offers nearly 3 million stock photos to choose from - royalty free, starting at $1 per photo. We're able to extend free photo credits to our visitors for a limited time. Click here and use promo code HW2333 when you sign up.

Attorney Approved Web Design Contract

Due to the popularity of our web development contract template, we're offering the contract, estimate, NDA and invoice templates for $199.50 $49.50 if you order by March 18. Click here to learn more.



Oct 15 2009

Drupal - Best Event Management System


Filed under: Content Management Systems » Drupal,
Tools:

What's the Best Way to Manage Events in Drupal?

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 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.

3) 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 setup 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.

Average: 4.7 (3 votes)
Select your preferred way to display the comments and click "Save settings" to activate your changes.

Repeating events

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!

Date module - Repeat API

Make sure that when you install the date module you install the date repeat option as well.

Problems displaying repeating events

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?

Repeating tab

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?

How to:

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?

Drupal - mail notifications

Check out the Drupal thread on working with mail and messaging for options.

Thanks for all the great

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

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.