370 likes | 500 Views
Join John Romine for a comprehensive session on leveraging Drupal to publish your events effectively. Learn about installing Drupal, configuring event content types, and creating intricate calendar and event list views. Gain insights into using CCK and Views modules to enhance content presentation and functionality. This session will cover database setup, module downloads, and theme customization, ensuring you have the tools to build user-friendly event pages and iCal feeds. Enhance your Drupal skills and streamline your event publishing today!
E N D
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 • field_location • feature
Create Database mysql> CREATE DATABASE cruller; mysql> CREATE USER cruller@localhost IDENTIFIED BY 'password'; mysql> GRANT ALL PRIVILEGES ON cruller.* TO cruller@localhost;
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';
Install Drupal in English % chmod g-w settings.php .
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]
Add Location: field_location • Added field_location, drag below Date • Drag Body above Menu settings
iCal feed: content example • LA Drupal iCal http://groups.drupal.org/ical/3002
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') )); ?>
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