Current status: not available for Drupal 6.x, 7.x or 8.x

Event module is not a currently active project. Last release was for Drupal 5. Discussions are ongoing about taking over the namespace of the module and restarting development at Drupal 8.

Information below is preserved, but page is marked as deprecated. This may change if a new project starts up (08/2016)

Instructions referring to Drupal 5.x-2.x branch of Event module

The major visible difference is that the 5.x-1.x branch includes an extra module called "basicevent". Basicevent provides a ready made content type for your events. This module is automatically turned on when you enable the Event module, so it doesn't matter if you explicitly enable it. Basicevent is no longer used in the 5.x-2.x version, which uses the new ability in Drupal 5.x to make new content types, but your existing content types will be automatically converted so there is no issue in using it in 5.x-1.x.

While the event content type created by basicevent cannot be deleted through the UI, you can go back to the module screen and disable the basicevent module, which will get rid of it. Make sure you do this before creating any content with it as that content will become unusable. Once basicevent is disabled, you will need to create your own event content type to use. Note that if you disable basicevent, it will re-enable itself if you ever run the event module install again.

Overview

The event module allows for any type of content to be event enabled, which means content can have a start and end time and appear in calendars. The ability to event enable any content type combined with the ability to create new types of content make it possible to create unlimited types of calendars.

Using Event

Step 1 - Install and configure

Download, install and enable the latest version of Event from the Event project page See Installing contributed modules for help.

You can configure the event module at administer > settings > events. There are two sections in the configuration.

  1. Event overview: This has general settings for events about how they are viewed and filtered.
  2. Timezone handling: This is where you set how time zones are handled as well as whether you want times displayed with a 12 hour or 24 hour clock.
  3. You also need to make sure you have your site's timezones set up at admin/settings/date-time. If you have no timezone set, you will get a warning when you try to add an event.

Step 2 - Set up content type(s)

The event module comes with a pre-set content type called "Event". This content type is already event enabled and ready to be used. If you only need one event content type and don't need any extra fields, you can skip to step 3.

If you would like more event content types, you create them in the normal way at administer > content management > content types > add content type.

You'll notice that there is now a new option labeled "Show in event calendar: All views, Only in views for this type, never". To make this an event enabled content type, choose one of the first two options. You can also event enable existing content types in this way. As of Drupal 5.x, this is part of core and does not require any extra modules.

If you have the CCK module installed, you have the option of adding extra fields to your events. You can add them to the pre-made Event type or to any that you create. This is useful if you want to add a field for, say, event cost. You can find out more about adding fields in the CCK handbook pages.

If you have the location module installed, you can enable it on your event types to allow people to enter the event's location. Adding Gmap lets you map your events as well.

Step 3 - Creating events

To create a new event, select your event type from the create content menu. In addition to the normal title and body and any fields you may have added, you'll see a place to enter the start and end dates. If you enabled all day events, you'll see a checkbox for that as well. Clicking the "All day" checkbox will turn off the boxes for entering times and set the times to 00:00 - 23:59 in the database. This is the way the event module recognizes that an event is all day.

Note: If you have the jscalendar module from jstools enabled, you will see a different view for the start and end dates. Instead of the separate textboxes, there is one textbox for each with a button for the popup calendar.

Some examples:

  1. To enter an event that is all day on May 25, 2007: Check the all day box and enter May 25, 2007 into both the start and end dates.
  2. To enter an event that is all day from May 25, 2007 to May 28, 2007: Check the all day box and enter May 25, 2007 into the start date and May 28, 2007 into the end date.
  3. To enter an event that is from 9 to 5 on May 25, 2007: Do not check the all day box. Enter May 25, 2007 09:00am into the start date and May 25, 2007 05:00pm into the end date. (If using 24 hour time, use 17:00 instead)
  4. To enter an event that is from 9 to 5 every day from May 25, 2007 to May 28, 2007: Do not check the all day box. Enter May 25, 2007 09:00am into the start date and May 28, 2007 05:00pm into the end date. (If using 24 hour time, use 17:00 instead)
  5. Multiple date events with multiple times are not possible with just the Event module. See the Event Repeat module for options.

Step 4 - Displaying events

There are various ways to view your events:

  1. The calendar page is automatically linked to at the bottom of every event enabled node. The URL for is is ?q=event and it takes parameters in the URL such as "?q=event/2007/05/27/month/". This page gives the options of showing events by month, week, day, and also in a table or list view.
  2. In administer >> build >> blocks you can enable the calendar block and the upcoming events block
  3. If you have the "Event Views" module enabled, you will see three default views - event_date, event_js, and event_select. These offer a filtered list of of your events with the filters exposed for the user to choose. You can also make your own views based on these or completely custom to be able to show your events however you want.

Event module theming tricks

If you want to hide the Start, End, or Timezone displays, you can do so by using CSS declarations. Here's a few examples for hiding it on one node, all nodes, or just selected nodes:

Hiding Start & Stop times for all event nodes

Add a line to your style.css file (found in /sites/all/themes/zen/style.css, for example) that looks just like this:

div.event-start, div.event-end {
  display:none;
}

Hiding displayed times for one event node

Duplicate the node.tpl.php file that's found in your theme's directory /sites/all/themes/zen/node.tpl.php for example, and call the new file node-x.tpl.php where x represents the node number you want to affect. Copy one of the following inline CSS declarations:

// Hide the Start time

<style type="text/css">
  div.event-start { display:none; }
</style>

// Hide the End time

<style type="text/css">
  div.event-end { display:none; }
</style>

// Hide the Timezone

<style type="text/css">
  div.event-tz { display:none; }
</style>

// Hide the Start AND End times

<style type="text/css">
  div.event-start, div.event-end { display:none; }
</style>

// Hide all three times

<style type="text/css">
  div.event-nodeapi { display:none; }
</style>

This inline css has to come just before the <?php print $content ?> in your node.tpl.php file. Take note, however, that this trick will only work if your current theme has support for node-1.tpl.php templates. If it doesn't work as expected, see the page on adding this functionality to your theme.

Related modules

  1. Event repeat: allows you to create recurring events.
  2. RSVP: users can create and manage RSVPs associated with events
  3. Signup: Places a signup form at the bottom of an Event node.

Comments

batigolix’s picture

the above mentioned method for hiding start and end dates seems a bit wacky

i'm sure there are more elegant ways to theme the node event page

momper’s picture

yes - are there themable functions instead of "display:none" ...

rreck’s picture

Does anyone know a way I might create events in separate tool and then import them like I do with book in the bibliography module?

batia’s picture

hi!
how i can set events count per day on month view page?

lusse’s picture

As the subject says. The day preview looks much better than the node view and I would like the links to point to the day view instead. Anyone that knows how to achieve this?

stodge’s picture

"The event module allows for any type of content to be event enabled, which means content can have a start and end time and appear in calendars"

Any more info on this? I'm writing a custom content type that needs a start and end date; how would I use the Event module programmatically in the way quoted?

wanderingstan’s picture

It says that there is an API for "allow other modules to store and work with date data", but I can find no documentation on this. I would simply like to create an event node problematically from a custom module. I've looked through the code and see no explicit API functions, but some that could be useful to other modules. (However none for creating event nodes.)

Zoologico’s picture

JSTools' JSCalendar is deprecated in D6.

Is there a way to set the date and time of the Event using that functionality?

cbullock’s picture

I want to modify the block display piece in event.theme to show the date of the event instead of how many days to the event. I have tried inserting a number of different values in place of $node->event['timeleft'] to no avail. Any ideas?

Steel Rat’s picture

I don't see the Date Picker files anywhere in the archive for Event. When I try to enable Date Picker I get error messages that several files are missing, that I should download them and place them in the Date Picker module folder. Except there is no date picker module folder, and no mention of Date Picker in the documentation.

agorry’s picture

datepicker is hiding inside a folder labeled "contrib" in the event module

So put all the files inside modules/event/contrib/datepicker and it will work.

marknt15’s picture

How can I create an event for myself only? After I create an event for myself then it will only be viewable by me.
Does creating an event will create a public event? How can I set the event's visibility to the event creator only?

Fatih Omruuzun’s picture

Does anyone know how to change the location of start & end dates of an event? They are displayed right after the Page Title, I want them to be display at the end of the page...
Regards...

Dave Martin’s picture

Hi, I tried installing Event module under Drupal 6 and had one or two problems - I stupidly disabled the modules before deleting a couple of dummy events and now can't get to the events to delete them - keep getting an error message "warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'event_node_form' was given in /home/davemar/domains/gccdm.org.uk/public_html/includes/form.inc on line 372."

Now I need to delete these events - can anyone help please?