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 10 Jul 2010 22:01:35 -0000
@@ -82,14 +82,33 @@ 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 = "
";
+
+ $items = array();
+ $slideshow_count = 0;
foreach ($rows as $count => $item) {
- $output .= theme('views_slideshow_singleframe_no_display_teaser', $item, $vss_id, $count);
+ $items[] = $item;
+ if (count($items) == $items_per_slide || $count == (count($rows)-1)) {
+ $output .= theme('views_slideshow_singleframe_no_display_teaser', $items, $vss_id, $slideshow_count);
+ $items = array();
+ $slideshow_count++;
+ }
}
$output .= "
\n";
@@ -101,7 +120,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 +135,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.28
diff -u -p -r1.1.2.1.2.28 views_slideshow_singleframe.views_slideshow.inc
--- contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 10 Jul 2010 06:26:49 -0000 1.1.2.1.2.28
+++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 10 Jul 2010 22:01:35 -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),
'pager_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',