Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.theme.inc,v
retrieving revision 1.1.2.1.2.27
diff -u -p -r1.1.2.1.2.27 views_slideshow_singleframe.theme.inc
--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 4 Jun 2010 03:52:24 -0000 1.1.2.1.2.27
+++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 9 Jul 2010 23:01:37 -0000
@@ -82,14 +82,34 @@ function template_preprocess_views_slide
* @ingroup themeable
*/
function theme_views_slideshow_singleframe_no_display_section($view, $rows, $vss_id, $mode) {
+ // Retrive the number of itmes per frame
+ if (isset($view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']) && $view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'] > 0) {
+ $items_per_slide = $view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'];
+ }
+ elseif (isset($view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']) && $view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'] > 0) {
+ $items_per_slide = $view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'];
+ }
+ else {
+ $items_per_slide = 1;
+ }
+
// Add the slideshow elements.
$attributes['id'] = "views_slideshow_singleframe_teaser_section_" . $vss_id;
$attributes['class'] = 'views_slideshow_singleframe_teaser_section';
$attributes = drupal_attributes($attributes);
$output = "
";
- foreach ($rows as $count => $item) {
- $output .= theme('views_slideshow_singleframe_no_display_teaser', $item, $vss_id, $count);
+
+ $items = array();
+ $slide_count = 0;
+
+ for ($i = 0; $i < count($rows); $i++) {
+ $items[] = $rows[$i];
+ if (count($items) == $items_per_slide || $i == (count($rows)-1)) {
+ $output .= theme('views_slideshow_singleframe_no_display_teaser', $items, $vss_id, $slide_count);
+ $items = array();
+ $slide_count++;
+ }
}
$output .= "
\n";
@@ -101,7 +121,7 @@ function theme_views_slideshow_singlefra
*
* @ingroup themeable
*/
-function theme_views_slideshow_singleframe_no_display_teaser($item, $vss_id, $count) {
+function theme_views_slideshow_singleframe_no_display_teaser($items, $vss_id, $count) {
$current = $count + 1;
$classes = array(
'views_slideshow_singleframe_slide',
@@ -116,7 +136,25 @@ function theme_views_slideshow_singlefra
$attributes['id'] = "views_slideshow_singleframe_div_" . $vss_id . "_" . $count;
$attributes = drupal_attributes($attributes);
- return "$item
\n";
+ $output = "";
+ foreach ($items as $item_count => $item) {
+ $item_class = 'views-row views-row-' . $item_count;
+ if (!$item_count) {
+ $item_class .= ' views-row-first';
+ }
+ if ($item_count % 2) {
+ $item_class .= ' views-row-even';
+ }
+ else {
+ $item_class .= ' views-row-odd';
+ }
+ $output .= '
' . "\n";
+ $output .= $item . "\n";
+ $output .= '
' . "\n";
+ }
+
+ $output .= "
\n";
+ return $output;
}
/**
Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.views_slideshow.inc,v
retrieving revision 1.1.2.1.2.26
diff -u -p -r1.1.2.1.2.26 views_slideshow_singleframe.views_slideshow.inc
--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 7 Jul 2010 06:19:34 -0000 1.1.2.1.2.26
+++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 9 Jul 2010 23:01:37 -0000
@@ -32,6 +32,7 @@ function views_slideshow_singleframe_vie
'remember_slide' => array('default' => 0),
'remember_slide_days' => array('default' => 1),
'controls' => array('default' => 0),
+ 'items_per_slide' => array('default' => 1),
'pager' => array('default' => 0),
'pager_type' => array('default' => 0),
'page_hover' => array('default' => 2),
@@ -204,6 +205,13 @@ function views_slideshow_singleframe_vie
'#default_value' => $view->options['views_slideshow_singleframe']['image_count'],
'#description' => t('Determine if the Image Counter (1 of 4) should be displayed and if so whether they should appear before or after the slideshow.'),
);
+ $form['views_slideshow_singleframe']['items_per_slide'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Items per slide'),
+ '#default_value' => $view->options['views_slideshow_singleframe']['items_per_slide'],
+ '#description' => t('The number of items per slide'),
+ '#size' => 4,
+ );
$options = array(
'none' => 'none',
'blindX' => 'blindX',
Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.theme.inc,v
retrieving revision 1.1.2.1.2.36
diff -u -p -r1.1.2.1.2.36 views_slideshow_thumbnailhover.theme.inc
--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 4 Jun 2010 03:52:24 -0000 1.1.2.1.2.36
+++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 9 Jul 2010 23:01:38 -0000
@@ -98,12 +98,27 @@ function template_preprocess_views_slide
*
* @ingroup themeable
*/
-function theme_views_slideshow_thumbnailhover_no_display_section($view, $rows, $vss_id, $options, $teaser = TRUE) {
+function theme_views_slideshow_thumbnailhover_no_display_section($view, $rows, $vss_id, $options, $teaser = TRUE) {
+ // Retrive the number of itmes per frame
+ if (isset($view->display_handler->display->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide']) && $view->display_handler->display->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide'] > 0) {
+ $items_per_slide = $view->display_handler->display->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide'];
+ }
+ elseif (isset($view->display['default']->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide']) && $view->display['default']->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide'] > 0) {
+ $items_per_slide = $view->display['default']->display_options['style_options']['views_slideshow_thumbnailhover']['items_per_slide'];
+ }
+ else {
+ $items_per_slide = 1;
+ }
+
// Add the slideshow elements.
$attributes['id'] = "views_slideshow_thumbnailhover_teaser_section_" . $vss_id;
$attributes['class'] = 'views_slideshow_thumbnailhover_teaser_section views_slideshow_teaser_section';
$attributes = drupal_attributes($attributes);
+ $number_of_items = count($view->result);
+ $items = array();
+ $slide_count = 0;
+
$output = "";
foreach ($view->result as $count => $node) {
if ($view->display_handler->uses_fields()) {
@@ -126,9 +141,17 @@ function theme_views_slideshow_thumbnail
else {
$rendered = node_view(node_load($node->nid), $teaser, FALSE, FALSE);
}
- $output .= theme('views_slideshow_thumbnailhover_no_display_teaser', $rendered, $vss_id, $count);
+
+ $items[] = $rendered;
+ if ($number_of_items == $items_per_slide || $count == ($number_of_items - 1)) {
+ $output .= theme('views_slideshow_thumbnailhover_no_display_teaser', $items, $vss_id, $count);
+ $items = array();
+ $slide_count++;
+ }
}
- $output .= "
";
+
+ $output .= "\n";
+
return $output;
}
@@ -137,7 +160,7 @@ function theme_views_slideshow_thumbnail
*
* @ingroup themeable
*/
-function theme_views_slideshow_thumbnailhover_no_display_teaser($item, $vss_id, $count) {
+function theme_views_slideshow_thumbnailhover_no_display_teaser($items, $vss_id, $count) {
$current = $count + 1;
$classes = array(
@@ -153,8 +176,26 @@ function theme_views_slideshow_thumbnail
$attributes['id'] = "views_slideshow_thumbnailhover_div_" . $vss_id . "_" . $count;
$attributes['class'] = implode(' ', $classes);
$attributes = drupal_attributes($attributes);
+
+ $output = "";
+ foreach ($items as $item_count => $item) {
+ $item_class = 'views-row views-row-' . $item_count;
+ if (!$item_count) {
+ $item_class .= ' views-row-first';
+ }
+ if ($item_count % 2) {
+ $item_class .= ' views-row-even';
+ }
+ else {
+ $item_class .= ' views-row-odd';
+ }
+ $output .= '
' . "\n";
+ $output .= $item . "\n";
+ $output .= '
' . "\n";
+ }
- return "
$item
";
+ $output .= "
\n";
+ return $output;
}
/**
Index: contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_thumbnailhover/Attic/views_slideshow_thumbnailhover.views_slideshow.inc,v
retrieving revision 1.1.2.1.2.27
diff -u -p -r1.1.2.1.2.27 views_slideshow_thumbnailhover.views_slideshow.inc
--- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 7 Jul 2010 06:19:34 -0000 1.1.2.1.2.27
+++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.views_slideshow.inc 9 Jul 2010 23:01:38 -0000
@@ -39,6 +39,7 @@ function views_slideshow_thumbnailhover_
'remember_slide_days' => array('default' => 1),
'pager_event' => array('default' => 'hover'),
'controls' => array('default' => 0),
+ 'items_per_slide' => array('default' => 1),
'image_count' => array('default' => 0),
'sync' => array('default' => 1),
'advanced' => array('default' => ''),
@@ -238,6 +239,13 @@ function views_slideshow_thumbnailhover_
'#default_value' => $view->options['views_slideshow_thumbnailhover']['image_count'],
'#description' => t('Determine if Image Counter (1 of 4) should be displayed and if so whether they should appear before or after the slideshow.'),
);
+ $form['views_slideshow_thumbnailhover']['items_per_slide'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Items per slide'),
+ '#default_value' => $view->options['views_slideshow_thumbnailhover']['items_per_slide'],
+ '#description' => t('The number of items per slide'),
+ '#size' => 4,
+ );
$options = array(
'none' => 'none',
'blindX' => 'blindX',