March 24, 2008

How to Display CiviCRM events on a Drupal Calendar:

Filed under: CiviCRM, Drupal — Soleer @ 9:52 am

How to Display CiviCRM events on a Drupal Calendar using CiviEvent’s iCal Feed and the Drupal Calendar Module:

  1. Pre-requisits: You’ll need an instance of CiviCRM running on Drupal, (we’re using Drupal 5.5 with CiviCRM 1.9) with CiviEvents Enabled.
  2. Download & Install the following Drupal modules:
    1. Calendar: http://drupal.org/project/calendar
    2. Views (required by Calendar): http://drupal.org/project/views
    3. Date (required by Calendar): http://drupal.org/project/date
  3. Go to your Module management screen ( Administer >> Site Building >> Modules )
    Screenshot 1

    1. Enable Calendar View
    2. Enable Calendar iCal
    3. Enable all other modules required by these
  4. Go to the “Administer Views” screen ( Administer >> Site Building >> Views)
    Screen shot 2

    1. Set ‘calender’ view status to ‘enabled’
    2. Click on the ‘add’ link next to calendar
    3. Screen Shot 3

    4. On the “Add a View” Screen, under Access, select all the roles you want to be able to view this calendar.
    5. Go to the bottom of the page and click save
    6. You will now see ‘calendar’ listed under ‘existing views’
    7. Click on the ‘calendar’ link listed in that same row or go to the calendar url, which should be http://www.yoursite.com/calendar (if you have drupal installed in the base directory) or http://www.yoursite.com/drupal/calendar (if you have drupal in it’s own directory).
  5. Go to your “Access Control” page. (Administer >> User Management >> Access Control)
    1. Under CiviCRM, make sure “register for events” is enabled for your anonymous role, and any other roles you are going to want to register for events.
  6. From the Calendar page, you should see the following:
    Screen Shot 4

    1. Click on the “iCal” tab, and insert the following information:
    2. Screen Shot 5

    3. Under “Expire iCal cache:” I recommend setting this to ‘0 sec’ for debugging purposes, and then scale back based on your traffic and update timing requirements.
    4. Set the Name as anything, I went with “civi” to keep it simple.
    5. Set the Url to your civi iCal feed.  Should be something like:  http://www.yoursite.com/civicrm/event/ical?reset=1&page=1  or http://www.yoursite.com/drupal/civicrm/event/ical?reset=1&page=1 .
  7. And that should be it!  Set up a test event, and make sure it shows up on your calendar page.

9 Comments »

  1. this was incredibly helpful

    thanks so much!

    Comment by rob — May 1, 2008 @ 4:27 am

  2. Thanks for this easy to follow tutorial, however all the times of my events are off by 7 hours (late). But if you click on the event, the time is correct.

    The when I view the iCal link it saying that an event that starts at 9 am is: ” DTSTART:20080503T160000Z ”

    I assume the T160000Z means 16:00 and zero seconds, im going to check global settings in CiviCRM, then search forums for issues with time.

    Comment by Jesse — May 2, 2008 @ 11:33 am

  3. Thanks for this - one problem I resolved - when putting in the ical url I had to switch to plain text editor - as my FCK editor didn’t like it.

    Comment by Chris — May 16, 2008 @ 12:01 am

  4. Hi this is binoy, iam using civicrm for the events.

    can u tell me what is the use of 4th procedure
    “Set the Url to your civi iCal feed. Should be something like:” ,
    Iam developing my site locally, i need to use civicrm with event calendar,
    But its calendar showing nothing.
    What may be the problem ,
    I follow your procedure,

    Comment by binoy — August 19, 2008 @ 7:51 am

  5. @Binoy,

    Running locally should be no problem. The ical feed will just be relative to your base drupal path. i.e. /drupal/civicrm/event/ical?reset=1&page=1. Good luck man!

    Comment by Soleer — August 25, 2008 @ 1:50 pm

  6. @Jesse

    I have no idea. Could be a problem with your server time settings? Did you figure anything out?

    Comment by Soleer — August 25, 2008 @ 1:52 pm

  7. hey,

    could you please guide me how can we do this in drupal 6.6. all i need is importing an ical feed in drupal calendar.

    Comment by ramki — November 4, 2008 @ 5:11 am

  8. Thanks. This was helpful.

    FYI, in the 5.2 Calendar module, the iCal and Setup tabs were moved to admin/settings/calendar . Took me a while to find that as it was only mentioned once at the end of a bug.

    Comment by Alex Neth — November 30, 2008 @ 3:29 am

  9. Hi,

    I am running into problems with this. I am trying to use drupal 5.x and CiviCRM 2.0 but I am finding problems getting the ical feed to show. I activate the calendar views, and then I go to admin/settings/ical and try to put in the feed. I click submit and the page clears showing no indication that the feed has been accepter (is this normal?) After that I attempted to add an event, but it didn’t show up on the calendar.

    What do I do?

    Comment by Jason — February 2, 2009 @ 10:55 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Who we are

Explore our history and character.

If you've ever been on a blind-date, odds are great that you know how disastrous "jumping before looking" can be. Feel free to do some online stalking here before you contact Soleer.

What We Do

"Girls only want boyfriends who have great skills." -Napoleon Dynamite

While we aren't looking to be your boyfriend and might not have "nunchuku skills," we do offer a number of other services and solutions to assist your organization.

What We’ve Done

As we say in Texas, "This ain't our first rodeo." Take a look at a sampling of some of our masterpieces, from logo design and brochure creation to webpage design and online community development.