[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/views_slideshow/ -> views_slideshow.module (source)

   1  <?php
   2  
   3  /**
   4   * @file
   5   * Provides Slideshow style options for Views.
   6   */
   7  
   8  /**
   9   * Implement hook_theme().
  10   */
  11  function views_slideshow_theme($existing, $type, $theme, $path) {
  12    return array(
  13      'views_slideshow_main_section' => array(
  14        'arguments' => array('id' => NULL, 'hidden_elements' => NULL, 'plugin' => NULL),
  15        'file' => 'views_slideshow.theme.inc',
  16      ),
  17    );
  18  }
  19  
  20  /**
  21   * Implements hook_views_api().
  22   */
  23  function views_slideshow_views_api() {
  24    return array(
  25      'api' => 2.0,
  26    );
  27  }
  28  
  29  /**
  30   * Implements hook_help().
  31   */
  32  function views_slideshow_help($path, $arg) {
  33    switch ($path) {
  34      case 'admin/help#views_slideshow':
  35        if (module_exists('advanced_help')) {
  36          $output = '<p>' . l(t('Click here to view the documentation for Views Slideshow'), 'admin/advanced_help/views_slideshow') . '</p>';
  37        }
  38        else {
  39          $output = '<p>' . t('Views Slideshow help can be found by installing and enabling the !help.',  array('!advanced_help' => l(t('Advanced Help module'), 'http://drupal.org/project/advanced_help'))) . '</p>';
  40        }
  41        return $output;
  42    }
  43  }
  44  
  45  /**
  46   * Views Slideshow: preprocess function for the slideshow.
  47   */
  48  function template_preprocess_views_slideshow(&$vars) {
  49    $options = $vars['options'];
  50    if (in_array($options['mode'], array('singleframe', 'thumbnailhover', 'menu', 'ddblock', 'slider'))) {
  51      $options['mode'] = 'views_slideshow_' . $options['mode'];
  52    }
  53    $vars['slideshow'] = theme($options['mode'], $vars['view'], $options, $vars['rows'], $vars['title']);
  54  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7