| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @file 5 * Views Slideshow: ThumbnailHover has options for working with node views. 6 * 7 * The ThumbnailHover mode adds two parts to the view: the first part is a 8 * series of items displayed as a list, the second part is either a full node 9 * or a node teaser. The slideshow will synchronize the two, so that the 10 * 'active' item will correspond to the single full/teaser item. The slide show 11 * can be set to advance automatically or on mouse hover/click. 12 */ 13 14 /** 15 * Implements hook_init(); 16 */ 17 function views_slideshow_thumbnailhover_init() { 18 // If the jQ module is installed, use that to add the jQuery Cycle plugin. 19 // This allows different versions of the plugin to be used. 20 $js = FALSE; 21 if (module_exists('jq')) { 22 $loaded_plugins = jq_plugins(); 23 if (!empty($loaded_plugins['cycle'])) { 24 $js = jq_add('cycle'); 25 } 26 } 27 28 // Otherwise, we'll add the version included with this module. 29 if (!$js) { 30 drupal_add_js(drupal_get_path('module', 'views_slideshow') . '/js/jquery.cycle.all.min.js'); 31 } 32 33 $module_path = drupal_get_path('module', 'views_slideshow_thumbnailhover'); 34 drupal_add_js($module_path . '/views_slideshow.js', 'module'); 35 drupal_add_css($module_path . '/views_slideshow.css', 'module'); 36 } 37 38 /** 39 * Implements hook_theme(). 40 */ 41 function views_slideshow_thumbnailhover_theme($existing, $type, $theme, $path) { 42 return array( 43 'views_slideshow_thumbnailhover' => array( 44 'arguments' => array('view' => NULL, 'options' => array(), 'rows' => array(), 'title' => ''), 45 'template' => 'views-slideshow-thumbnailhover', 46 'file' => 'views_slideshow_thumbnailhover.theme.inc', 47 ), 48 'views_slideshow_thumbnailhover_controls' =>array( 49 'arguments' => array('vss_id' => '', 'view' => NULL, 'options' => array()), 50 'file' => 'views_slideshow_thumbnailhover.theme.inc', 51 ), 52 'views_slideshow_thumbnailhover_control_previous' =>array( 53 'arguments' => array('vss_id' => '', 'view' => NULL, 'options' => array()), 54 'file' => 'views_slideshow_thumbnailhover.theme.inc', 55 ), 56 'views_slideshow_thumbnailhover_control_pause' =>array( 57 'arguments' => array('vss_id' => '', 'view' => NULL, 'options' => array()), 58 'file' => 'views_slideshow_thumbnailhover.theme.inc', 59 ), 60 'views_slideshow_thumbnailhover_control_next' =>array( 61 'arguments' => array('vss_id' => '', 'view' => NULL, 'options' => array()), 62 'file' => 'views_slideshow_thumbnailhover.theme.inc', 63 ), 64 'views_slideshow_thumbnailhover_image_count' => array( 65 'arguments' => array('vss_id' => '', 'view' => NULL, 'options' => array()), 66 'file' => 'views_slideshow_thumbnailhover.theme.inc', 67 ), 68 'views_slideshow_thumbnailhover_breakout_teaser' => array( 69 'arguments' => array('item' => NULL, 'vss_id' => NULL, 'count' => NULL), 70 'file' => 'views_slideshow_thumbnailhover.theme.inc', 71 ), 72 'views_slideshow_thumbnailhover_no_display_section' => array( 73 'arguments' => array('view' => NULL, 'rows' => NULL, 'vss_id' => NULL, 'mode' => NULL, 'teaser' => TRUE), 74 'file' => 'views_slideshow_thumbnailhover.theme.inc', 75 ), 76 'views_slideshow_thumbnailhover_no_display_teaser' => array( 77 'arguments' => array('item' => NULL, 'vss_id' => NULL, 'count' => NULL), 78 'file' => 'views_slideshow_thumbnailhover.theme.inc', 79 ), 80 'views_slideshow_thumbnailhover_breakout_teasers' => array( 81 'arguments' => array('items' => NULL, 'vss_id' => NULL), 82 'file' => 'views_slideshow_thumbnailhover.theme.inc', 83 ), 84 ); 85 } 86 87 /** 88 * Implements hook_help(). 89 */ 90 function views_slideshow_thumbnailhover_help($path, $arg) { 91 switch ($path) { 92 case 'admin/help#views_slideshow_thumbnailhover': 93 if (module_exists('advanced_help')) { 94 $output = '<p>' . l(t('Click here to view the documentation for Views Slideshow Thumbnailhover'), 'admin/advanced_help/views_slideshow_thumbnailhover') . '</p>'; 95 } 96 else { 97 $output = '<p>' . t('Views Slideshow Thumbnailhover help can be found by installing and enabling the !advanced_help.', array('!advanced_help' => l(t('Advanced Help module'), 'http://drupal.org/project/advanced_help'))) . '</p>'; 98 } 99 return $output; 100 } 101 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |