You are here

function views_slideshow_thumbnailhover_init in Views Slideshow 6.2

Implements hook_init();

File

contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module, line 17
Views Slideshow: ThumbnailHover has options for working with node views.

Code

function views_slideshow_thumbnailhover_init() {

  // If the jQ module is installed, use that to add the jQuery Cycle plugin.
  // This allows different versions of the plugin to be used.
  $js = FALSE;
  if (module_exists('jq')) {
    $loaded_plugins = jq_plugins();
    if (!empty($loaded_plugins['cycle'])) {
      $js = jq_add('cycle');
    }
  }

  // Otherwise, we'll add the version included with this module.
  if (!$js) {
    drupal_add_js(drupal_get_path('module', 'views_slideshow') . '/js/jquery.cycle.all.min.js');
  }
  $module_path = drupal_get_path('module', 'views_slideshow_thumbnailhover');
  drupal_add_js($module_path . '/views_slideshow.js', 'module');
  drupal_add_css($module_path . '/views_slideshow.css', 'module');
}