January 2009 Archives

I’ll admit it: I am a Drupal newbie. We chose it for our CMS last year, but we haven’t really been using it as a CMS as much as a place to dump and view our internal key indicator reports.  But finally! Ah, yes… we finally have a feature request that is actual content management - an event calendar.

Imagine my surprise when I go looking for an event calendar module and find nothing. How could such a huge CMS not have a simple event calendar? A big part of this misunderstanding was that I didn’t understand Drupal - at all. I still don’t really, but figuring this feature out has helped a lot.

One thing to realize is that Drupal is a content management system. So (eventually) it would make sense to create event content and display that content in a specific way. I surprisingly couldn’t find much documentation on this, so below are the steps I took to get my event calendar up and running. They’re kind of abbreviated, so just ask if you need any clarification. Keep in mind this was a learning experience, so if you have any tips for me, I would like those as well. ;)

  1. ## Install Modules
    • View
    • Date
    • CCK
    • Calendar
    • Don’t forget to give yourself permissions to administer these modules and enable them!
  2. ## Create Calendar Event Content Type
    1. Name: Event
    2. Type: event
    3. Title Field Label: Event
    4. Body Field Label: Details
    5. Do not promote to front page.
    6. Save
    7. Go to Manage Fields for Event in the content type list
    8. Add a field called Date of type fieldeventdate with a textfield/popup calendar+repeat selector. Configure it to be required and blank by default, have a reasonable format, and to hide the repeat options by default.
    9. Add a field called Location of type field_event_location that is a single-row text field. Configure it to be 100 chars long and required.
  3. ## Set up A Calendar View
    1. Go to Administer > Views
    2. Enable the default calendar view and clone it.
      • View Name: a_calendar
      • View Description: Calendar
    3. Change the title to “Whatever you want Calendar”
    4. Change Arguments > Date: Date (Node: Updated date) to Content: Date (field_event_date value) Scroll down a bit to see the checkboxes (under Date fields)
    5. Add a sort criterion for Content: Date (field_event_date value)
    6. Add a filter for Node: Type is one of Event
    7. Click the Calendar page side-tab and change the path to “a_calendar”
    8. Click the Calendar block side-tab and change the block settings admin to “A Calendar”
    9. Save the view.
    10. Navigate to ?q=a_calendar to make sure it is working.
  4. ## Set up Roles
    1. Add a new role called Calendar_User and add the following permissions:
      • Edit/view field_event_*
      • (Create | delete own | edit own) event content
    2. Give this role to whoever you want to create event entries. (Let’s call them eventries for fun)
  5. ## Add a link somewhere and enjoy!
Powered by Movable Type 4.21-en

Recent Comments

  • Leandro Nuñez: Hey, thanks for the great share. Is there a way read more
  • Justin: cool plugin. how would you go about creating then wiring read more
  • Anil: Nice plugin. I wanted to add some validation and stop read more
  • reigel: look cool... It would be okay if it can validate read more
  • glompix: @derby We actually do use Subverison for our version control, read more
  • derby: I use xperl, dominos, and titan bar to customize my read more
  • derby: Thanks for the script. I was looking for some AJAX read more
  • A. burton: how do you set up a search for events created read more
  • NANERPUSS: LEXINGTON GOONTUCKY :hfive: read more
  • Matt: This is a great walkthrough. I am also using the read more