views_slideshow_thumbnailhover.theme.inc in Views Slideshow 6
Same filename and directory in other branches
Theme & preprocess functions for the Views Slideshow: ThumbnailHover module.
File
contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.incView source
<?php
/**
* @file
* Theme & preprocess functions for the Views Slideshow: ThumbnailHover module.
*/
/**
* Implement template_preprocess_hook_THEMENAME().
*/
function template_preprocess_views_slideshow_thumbnailhover(&$vars) {
$options = $vars['options'];
$base = drupal_get_path('module', 'views_slideshow_thumbnailhover');
drupal_add_js($base . '/views_slideshow.js', 'module');
drupal_add_css($base . '/views_slideshow.css', 'module');
$hover = 'hover';
if ($options['hover'] == 'hoverIntent') {
if (module_exists('jq')) {
$hover = jq_add('hoverIntent') ? 'hoverIntent' : 'hover';
}
else {
if (module_exists('hoverintent')) {
$hover = hoverintent_add() ? 'hoverIntent' : 'hover';
}
}
}
$num_divs = sizeof($vars['rows']);
$fade = $options['fade'] ? 'true' : 'false';
$teasers_last = $options['teasers_last'] ? 'true' : 'false';
$settings = array(
'num_divs' => $num_divs,
'timer_delay' => $options['timer_delay'],
'sort' => intval($options['sort']),
'fade' => $fade,
'fade_speed' => $options['fade_speed'],
'fade_value' => $options['fade_value'],
'hoverFunction' => $hover,
'hover_breakout' => $options['hover_breakout'],
'teasers_last' => $teasers_last,
'id_prefix' => '#views_slideshow_main_',
'div_prefix' => '#views_slideshow_div_',
'id' => $vars['id'],
);
drupal_add_js(array(
'viewsSlideshowSingleFrame' => array(
'#views_slideshow_main_' . $vars['id'] => $settings,
),
), 'setting');
/* $js = theme('views_slideshow_div_js', $vars['rows'], $vars['options'], $vars['id']);
drupal_add_js($js, 'inline');*/
}
Functions
Name | Description |
---|---|
template_preprocess_views_slideshow_thumbnailhover | Implement template_preprocess_hook_THEMENAME(). |