1 / 37

Publishing your Events with Views & CCK

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. Publishing your Events with Views & CCK. Install Drupal Event content type Calendar view Event list view

makani
Download Presentation

Publishing your Events with Views & CCK

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 dateNode: 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: <?php print $item['view'] ?> • 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

More Related