<?php
/**
 * @file
 * An example module for how to create a module tutorial.
 */
 
 function tour_reservation_block_info() {
  $blocks['tour_reservation'] = array('info' => t('Package Tour Reservation'));
  return $blocks;
}

/**
 * Implements hook_block_view.
 */
 /*
function tour_reservation_block_view($delta = '') {
  global $user;
  $account = $user;
  $block['content'] = t('Hello @user from IP @host',array(
    '@user' => format_username($user), 
    '@host' => $account->hostname
  ));
  
  $result = db_select('node','a')
    ->fields('a', array('title'))
    ->execute();
  
  foreach($result as $node) { 
    $items[] = array(
      'data' => t($node->title)
    );
  }
  
  $block['content'] .= theme('item_list', array(
    'items' => $items
  ));
  
  return $block;
}
*/

/**
 * Implements hook_filter_tips().
 */
function _tour_reservation_filter_tips($delta, $format, $long = FALSE) {
  return t('More/Less script can be used in a content. (i.e. [more])');
}

/**
 * Implements hook_filter_info().
 */
function tour_reservation_filter_info() {
  $filters['tour_reservation'] = array(
    'title' => t('More (i.e. [more])'),
    'cache' => TRUE,
    'description' => t('Add more/less script on your content. (i.e. [more])'),
    'process callback' => '_tour_reservation_filter_insert_txt',
    'tips callback' => '_tour_reservation_filter_tips',
  );
  return $filters;
}

/**
 * Callback to connect to the main user hook to display a slideshow.
 */
function _tour_reservation_filter_insert_txt(
  $text, $filter, $format, $langcode, $cache, $cache_id
) {
  include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'tour_reservation') .
      '/tour_reservation.inc';
  return _tour_reservation_process_text($text);
}

/**
 * Implements hook_menu().
 */
function tour_reservation_menu() {
  $items = array();

  $items['tour_reservation/%'] = array(
    'title' => 'TOUR RESERVATION',
    'description' => 'Tour reservation',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('_tour_reservation_booking_form', 1),
    'file' => 'tour_reservation.inc',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );
  
  return $items;
}

  