Installing Calendar 2.x for Drupal 6
OBJECTIVE
In this handbook we will install and configure the Calendar module 2.x for Drupal 6.x. And use a calendar of upcoming events as an example.
rel="nofollow">
width="150px">
NOTE
This handbook is for absolute beginners. If you consider yourself an advanced user find the README.txt file that comes with the module. Or create a new handbook for advance users.
REQUIREMENTS
We assume that the following are already installed and configured properly.
- Drupal 6.x
- Calendar module version 2.2 or more recent.
- Views
- Date API (packaged with the Date module)
INSTALLING
- To install the module copy the 'calendar' folder to your sites/all/modules directory.
- Go to admin/build/modules. Enable the module.
Read more about installing modules at http://drupal.org/node/70151
CONFIGURING AND USING
- Go to
admin/settings/date-time/formatsUnder
Date formatssection. Set the 3 date formats to match your needs.Click on
Save configurationbutton. - Go to
admin/settings/date-timeSet the
Default time zone:field.Leave other setting to their default.
Click on
Save configurationbutton. - You must make a custom ‘event’ content type using CCK. To do so go to
admin/content/types/add - Under
Identificationsection fill the following fields. Without the “ ”.
Name = “Group Event” Type = “event” Description = “Create a new event to appear on the sites calendar of upcoming events” - Under
Submission form settingssection fill the following fields. Note that those settings are largely a matter of site needs and personal preference
Title = “Event” Body = “Details” - Under
Workflow settingssection decide to best fit your site. It is worth considering unchecking “Promoted to front page” if you expect to have numerous small events posted. - Under
Comment settingssection make decisions which are appropriate for your site. - Click on
Save content typebutton - On the next screen click on the
manage fieldslink next to your new content type. Note: In this example this screen can be found atadmin/content/node-type/event/fields - Add a new field with the following values. Feel free to modify to match your needs.
Label = “Date” Field name = “date” Type of data to store = “Date” Form element to edit the data (Widget type) = “Select List”Note: There is some debate over the correct
Form element to edit the data (Widget type). The widget type dictates the input UI and is really a matter of preference. It’s easy to change after the fact so try them all and see what you like best. - Click on
Savebutton - On the next page under
Group event settingssection. Leave theDefault valuefield toBlank.Set the
Default value:field toNow.
Note: End user can easily change this value when filling the form.Set the
Input format:field to a format that match your needs. In my caseMay 12 2010 - 1:00:00pmUnder
Global settingssection. CheckRequiredoption.Set the
Set the To Date:field toOptional.Leave all other options to their default settings.
- Click on
Save field settingsbutton. - Note: This is optional but on the next page you can of course add any number of additional fields to your event content type at this point using CCK. I've added location and contact information for my application and tied those to weather and profiles which is kind of cool (but way beyond this little write up) and testament to how amazing and powerful Drupal really is :)
- We are now going to create a first event. To do so go to
node/addIn this example click onGroup eventlink. - Fill out the form for your event. In this example we set a
From dateand aTo date - Click on
Savebutton. - In the following steps we will configure your calendar view.
Go toadmin/build/views - Click on
Enablelink located on the right side of thecalendarview item. - Click on
Editlink located on the right side of thecalendarview item. - The next screen is the view edit screen. With the
Defaultsview already selected. Click on below screenshot to clarify.
rel="nofollow">
width="150px">
Note: Many types of calendar views are available. Such as Calendar page, Calendar block, etc. But first we will just work with theDefaultsview to start. - In the
Fieldspanel. Click on the+button to add a field.
rel="nofollow">
width="150px">
Scroll down the list of filters. Then checkContent: Date (field_date) - From dateoption.Click on
Addbutton.On the next screen leave all options to their default settings. Then click on
Updatebutton. - Still in the
Fieldspanel. Click on theNode: Updated datelink.Click on the
Removebutton.Click on
Savebutton. - In the
Argumentspanel. Click onDate: Date (node)link.
rel="nofollow">
Uncheck
Node: Update dateoption.Check
Content: Date (field_date) - From dateNote: This set the start time of your event instead of the node update time as the argument for the view. - Click on
Updatebutton. - On the
Filterspanel click the+button to add a new filter.Scroll down the list of filters. Then check
Node: Typeoption.Click on
Addbutton.On the following screen leave
OperatortoIs one of.Then check
Group eventsoption. This will limit your calendar to only theGroup eventscontent type.Click on
Updatebutton. - On the
Sort criteriapanel click the+to add a new criteria.Scroll down the list of filters. Then check
Content: Date (field_date) - From dateoption.Click on
Addbutton. - On the next screen leave default settings to
Ascending.Then click on
Updatebutton. - Click on
Savebutton to save all your edits. - To test click on
View "Calendar page"link.
rel="nofollow">
width="150px">
- That's it. You have successfully install and configure the Calendar module 2.x for Drupal 6.x
rel="nofollow">
- Note that this handbook will at least get you to a working calendar of coming events for your site. Obviously you’ve got a ton of configuration options to play with form here.
This is a very powerful package. While it's not hard to setup it's got a lot of steps and many opportunities to go wrong. The key here is to set the argument / sort / filter bit of views configuration. This combination of modules seems to want to create a calendar widget for digging into the archives by default but it is easy enough to have it do otherwise.
On the next screen leave all options to their default settings. Then click on Update button.
SOURCES
http://drupal.org/node/326061#comment-1077193
http://www.drupaltherapy.com/node/76
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion