Presentation is loading. Please wait.

Presentation is loading. Please wait.

Publishing your Events with Views & CCK DrupalCamp LA 2010 August 7-8, 2010 John Romine /publishing-your-events-views-cck.

Similar presentations


Presentation on theme: "Publishing your Events with Views & CCK DrupalCamp LA 2010 August 7-8, 2010 John Romine /publishing-your-events-views-cck."— Presentation transcript:

1 Publishing your Events with Views & CCK DrupalCamp LA 2010 August 7-8, 2010 John Romine jromine@gmail.com http://2010.drupalcampla.com/sessions /publishing-your-events-views-cck

2 Publishing your Events with Views & CCK Install Drupal Event content type Calendar view Event list view field_location feature

3 Create Database mysql> CREATE DATABASE cruller; mysql> CREATE USER cruller@localhost IDENTIFIED BY 'password'; mysql> GRANT ALL PRIVILEGES ON cruller.* TO cruller@localhost;

4 Download and configure Drupal % wget http://drupal.org/files/ projects/drupal-6.17.tar.gz % tar zxvf drupal-6.17.tar.gz % mv drupal-6.17 cruller % rm drupal-6.17.tar.gz % cd cruller/sites/default % cp default.settings.php settings.php % chmod g+w settings.php. % vi settings.php $db_url = 'mysql:// cruller:password@localhost/cruller';

5 Install Drupal in English % chmod g-w settings.php.

6 Download contributed modules Unpack modules in sites/all/modules % drush dl cck views date calendar devel Project cck (6.x-2.7) downloaded [success] Project views (6.x-2.11) downloaded[success] Project date (6.x-2.4) downloaded [success] Project calendar (6.x-2.2) downloaded[success] Project devel (6.x-1.21) downloaded[success]

7 Contributed modules: CCK

8 Contributed modules: Date/Time

9 Contributed modules: Devel & Views

10 Date and time configuration

11 Date and time: Add format

12 Add content type: Event

13 Add Date: field_date

14 field_date: Event settings

15 field_date: Global settings

16 Add Location: field_location Added field_location, drag below Date Drag Body above Menu settings

17 field_location: Event settings

18 field_location: Global settings

19 Create content > Event

20 Home page teaser view

21 Enable pre-made Calendar View

22 Calendar view settings

23 Content: Date – From date Node: Type = Event

24 Calendar: Month view

25 Calendar: iCal feed

26 iCal feed: Add Body & Location, Exclude from display

27 iCal feed: Style options

28 iCal feed: content example LA Drupal iCal http://groups.drupal.org/ical/3002

29 Calendar: Upcoming Block

30 Calendar page: fixes

31 Add a new view: events

32 Events page

33 Events archive

34 Events: attachment

35 Events archive page

36 Theme: link field_location to map cp modules/cck/theme/content-field.tpl.php to your theme folder cp content-field.tpl.php content-field-field_location.tpl.php edit content-field-field_location.tpl.php OLD: NEW: <?php print l($item['view'], http://maps.google.com', array('query' => array('q' => $item['view']), 'attributes' => array('target' => '_blank') )); ?>

37 TODO: Improve Date display/input Date and time formats (M j, Y g:ia) Date Popup: Timepicker (jQuery) field_date: –label (display fields: inline, views label: none) –years back and forward (-100:+100) calendar view events view


Download ppt "Publishing your Events with Views & CCK DrupalCamp LA 2010 August 7-8, 2010 John Romine /publishing-your-events-views-cck."

Similar presentations


Ads by Google