
Drupal Tutorials
Events listing system using Date, CCK and Views modules - Part 1
Prerequisites
It is assumed you have good basic Drupal knowledge and already have the Date, CCK and Views modules installed on your site.
It is assumed you have good basic Drupal knowledge and already have the Date, CCK and Views modules installed on your site.
Rate this tutorial
Comments (5)
Sunday, November 23, 2008
By admin
This tutorial was originally requested by droople.
In this tutorial we will be creating an events listing system using CCK, Date and views as opposed to using the events and calendar modules.
I'm going break this tutorial up into 3 parts so it's manageable. In part 1 I'm going to check we have the right modules installed and then look at the CCK setup of our events system.
Module Installation
For this tutorial you've probably worked out we're using the CCK, Date and Views modules, but these modules all contain other "sub" modules so i'll quickly run through which ones you need and don't need.
On your Modules page (http://yoursite.com?q=admin/build/modules) verify you have the following modules installed:
CCK
Content
Text
Date/Time
Date
Date API
Date Popup
Date Timezone
Views
Views
Views UI
If you got those modules installed you're ready to begin.
CCK Setup
Ok the first thing we need to do is create a new content called "event".
Step 1 - Create your content type
- Go to http://yoursite.com?q=admin/content/types/add
(admin > Content management > Content Types > Add content type) - In the add content form input the following:
Name: Event
Type: event (lowercase)
Title field label: Event Name
Body field label: Event Description
The other fields can be adjusted to whatever preference you like. - Click the "Save content type" button at the bottom, your new content type is now saved. You're now ready to add fields to it.
Step 2 - Add new fields to your content type
- At your content type admin page (admin/content/types) click the edit link under "operation" for the event content type we just made.
Then you click the "Add field" tab along the top. - We are going to now add a start and an end date for our events, so:
Start Date
Name: Start Date
Field Type: datestamp > Text Field with jquery pop-up calendar(If you don't see a "Text Field with jquery pop-up calendar" option go to the modules page and make sure you have the "Date Popup" module install under Date/Time).
- On the next screen everything can stay as it is minus the following:
Widget settings > Default value: Now
Data settings > Required: True (check the box)Now repeat steps 1 to 3 exactly the same but change the Name (on the first form screen) to End Date rather than Start Date.
- Great! Our events now have a start and an end date, optionally you can now tweak the form order by going to http://yoursite.com?q=admin/content/types/event/fields and adjusting the weight of each form item
Step 3 - Add some events
Let test out our new event content type by adding some new events.
Go Create Content > Event and add 5-6 events.
Well done you've completed part 1 and CCK is all set up and ready to use!
Next up we'll look at using Views to create an events list page.
Next up we'll look at using Views to create an events list page.
External Resources
Date Module - http://drupal.org/project/dateCCK Module - http://drupal.org/project/cckViews Module - http://drupal.org/project/views
Date Module - http://drupal.org/project/dateCCK Module - http://drupal.org/project/cckViews Module - http://drupal.org/project/views
Comments (5)
Login or register to post comments
Part 1,quiet straight
By droople on Sunday, November 23, 2008Part 1,quiet straight forward.
Thank you Tom
Hello,I am trying to set up
By Katy on Friday, December 19, 2008Hello,
I am trying to set up an Events Calendar with Drupal 6.8 and the RC6 versions of Date and Calendar. Would you please provide a step by step recipe? I would really appreciate it.
I think the above tutorial is specifically written for Drupal 5, is that correct?
Yes, I find myself in the
By pablokenfold on Thursday, January 8, 2009Yes, I find myself in the same position as Katy. I have checked, checked and checked, modules are installed and permissions upt o date, and I do not see a "Text Field with jquery pop-up calendar" on datestamp fields.
Hi,Yes this is for Drupal5
By admin on Thursday, January 8, 2009Hi,
Yes this is for Drupal5 (it was requested by Droople to be Drupal 5) but it should be a very similar process for Drupal6.
I'll put the events calendar tutorial on the todo list 
As for the pop-up calendar it's part of the date module package for Drupal 5 (version 5.2), it's a module called date pop-up, here's the version i used http://drupal.org/node/342848.
Let me know how you get on, more than happy to help!! 
Tom
I created a repeating event
By Abby on Monday, January 25, 2010I 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 25st, I'd like the event details to only list Thursday Jan 21st inchiriere roba, not every Thursday.





Delicious
Digg
StumbleUpon
Facebook
Google
Yahoo
Technorati


















