diff -up views_slideshow_thumbnailhover.orig/views-slideshow-thumbnailhover.tpl.php views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php --- views_slideshow_thumbnailhover.orig/views-slideshow-thumbnailhover.tpl.php 2009-09-27 00:20:50.000000000 +0200 +++ views_slideshow_thumbnailhover/views-slideshow-thumbnailhover.tpl.php 2009-09-29 12:00:54.687500000 +0200 @@ -6,11 +6,6 @@ * Views Slideshow: Thumbnail Hover */ - $base = drupal_get_path('module', 'views_slideshow_thumbnailhover'); - - $js = theme('views_slideshow_div_js', $rows, $options, $id); - drupal_add_js($js, 'inline'); - if ($options['thumbnailhover']['controls'] == 1) { print theme('views_slideshow_thumbnailhover_controls', $id, $view, $options); } @@ -18,19 +13,19 @@ if ($options['thumbnailhover']['image_count'] == 1) { print theme('views_slideshow_thumbnailhover_image_count', $id, $view, $options); } - - $teaser = ($options['thumbnailhover']['hover_breakout'] == 'teaser' ? TRUE : FALSE); + + $mode = $options['thumbnailhover']['hover_breakout']; $output = ''; $view_teasers = FALSE; // As we're using the 'thumbnail hover' mode, then we need to display all the view thumbnails. - $view_teasers = theme('views_slideshow_thumbnailhover_breakout_teasers', $rows, $id); + $view_teasers = theme('views_slideshow_thumbnailhover_breakout_teasers', $view, $rows, $id, $mode); if (!$options['thumbnailhover']['teasers_last']) { $output .= $view_teasers; } // These are hidden elements, used to cycle through the main div - $hidden_elements = theme('views_slideshow_thumbnailhover_no_display_section', $view, $rows, $id, $options['mode'], $teaser); + $hidden_elements = theme('views_slideshow_thumbnailhover_no_display_section', $rows, $id); $output .= theme('views_slideshow_main_section', $id, $hidden_elements, 'thumbnailhover'); if ($view_teasers && $options['thumbnailhover']['teasers_last']) { @@ -45,4 +40,3 @@ } print $output; -?> Only in views_slideshow_thumbnailhover/: views-slideshow-thumbnailhover.tpl.php.clean Only in views_slideshow_thumbnailhover/: views-slideshow-thumbnailhover.tpl.php.orig diff -up views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.module views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module --- views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.module 2009-09-27 00:20:50.000000000 +0200 +++ views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.module 2009-09-29 11:59:56.453125000 +0200 @@ -46,7 +46,7 @@ function views_slideshow_thumbnailhover_ 'file' => 'views_slideshow_thumbnailhover.theme.inc', ), 'views_slideshow_thumbnailhover_no_display_section' => array( - 'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL, 'teaser' => TRUE), + 'arguments' => array('rows' => NULL, 'id' => NULL), 'file' => 'views_slideshow_thumbnailhover.theme.inc', ), 'views_slideshow_thumbnailhover_no_display_teaser' => array( @@ -54,7 +54,7 @@ function views_slideshow_thumbnailhover_ 'file' => 'views_slideshow_thumbnailhover.theme.inc', ), 'views_slideshow_thumbnailhover_breakout_teasers' => array( - 'arguments' => array('items' => NULL, 'id' => NULL), + 'arguments' => array('view' => NULL, 'rows' => NULL, 'id' => NULL, 'mode' => NULL), 'file' => 'views_slideshow_thumbnailhover.theme.inc', ), ); Only in views_slideshow_thumbnailhover/: views_slideshow_thumbnailhover.module.orig diff -up views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.theme.inc views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc --- views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.theme.inc 2009-09-27 00:20:50.000000000 +0200 +++ views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 2009-09-29 12:13:28.796875000 +0200 @@ -46,7 +46,7 @@ function template_preprocess_views_slide /** * These are the slideshow elements themselves; not actually displayed, but used to give the html to the main element. */ -function theme_views_slideshow_thumbnailhover_no_display_section($view, $rows, $id, $mode, $teaser = TRUE) { +function theme_views_slideshow_thumbnailhover_no_display_section($rows, $id) { // Add support for the jQuery Cycle plugin. // If we have the jQ module installed, use that to add the Cycle plugin if possible. // That allows for version control. @@ -61,8 +61,8 @@ function theme_views_slideshow_thumbnail drupal_add_js(drupal_get_path('module', 'views_slideshow') .'/js/jquery.cycle.all.min.js', 'module'); } $output = '
' . "\n"; - foreach ($view->result as $count => $node) { - $output .= theme('views_slideshow_thumbnailhover_no_display_teaser', node_view(node_load($node->nid), $teaser, FALSE, FALSE), $id, $count); + foreach ($rows as $count => $item) { + $output .= theme('views_slideshow_thumbnailhover_no_display_teaser', $item, $id, $count); } $output .= "
\n\n"; return $output; @@ -92,18 +92,29 @@ function theme_views_slideshow_thumbnail /** * These are teasers that may be pointed at with a mouse to change the element directly. */ -function theme_views_slideshow_thumbnailhover_breakout_teasers($items, $id) { +function theme_views_slideshow_thumbnailhover_breakout_teasers($view, $rows, $id, $mode = 'views') { $output = '
' . "\n"; - $js = "$(document).ready(function() {\n"; - foreach ($items as $count => $item) { + + switch ($mode) { + case 'teaser': + $teaser = TRUE; + $objects = $view->result; + break; + case 'full': + $teaser = FALSE; + $objects = $view->result; + break; + case 'views': + $objects = $rows; + break; + } + + foreach ($objects as $count => $atom) { + // if mode is views we show rows from views if mode is teaser/full we show the node + $item = ($mode == 'views' ? $atom : node_view(node_load($atom->nid), $teaser, FALSE, FALSE) ); $output .= theme('views_slideshow_thumbnailhover_breakout_teaser', $item, $id, $count); - $js .= theme('views_slideshow_thumbnailhover_breakout_teaser_js', $id, $count); } - $js .= "})\n"; - drupal_add_js($js, 'inline'); - $output .= "
\n\n"; - return $output; } Only in views_slideshow_thumbnailhover/: views_slideshow_thumbnailhover.theme.inc.clean Only in views_slideshow_thumbnailhover/: views_slideshow_thumbnailhover.theme.inc.orig diff -up views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.views_slideshow.inc views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc --- views_slideshow_thumbnailhover.orig/views_slideshow_thumbnailhover.views_slideshow.inc 2009-09-28 23:37:38.000000000 +0200 +++ views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 2009-09-29 10:22:34.125000000 +0200 @@ -53,13 +53,14 @@ function views_slideshow_thumbnailhover_ $options = array( 'teaser' => t('Teaser'), 'full' => t('Full'), + 'views' => t('Views Row Style'), ); $form['thumbnailhover']['hover_breakout'] = array( '#type' => 'radios', '#title' => t('Hover breakout'), '#options' => $options, '#default_value' => $view->options['thumbnailhover']['hover_breakout'], - '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as a teaser or full node. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), + '#description' => t("Hover breakout determines how to display the breakout element of the %thumbnail mode, either as teaser, full node or same than main element through Views row style configuration. It is ignored in %single mode.", array('%thumbnail' => t('Thumbnail hover'), '%single' => t('Single frame'))), ); $form['thumbnailhover']['teasers_last'] = array( '#type' => 'checkbox', Only in views_slideshow_thumbnailhover/: views_slideshow_thumbnailhover.views_slideshow.inc.orig