sites/all/modules/views_slideshow/contrib/views_slideshow_singleframe
@@ line 55 in views_slideshow_singelframe.theme.inc,

I think there is a } misplaced for the if statement if ($settings['num_divs'] > 1). Makes it only effective for $singleframe['controls'] and not $singleframe['pager'] or $singleframe['image_count']

  // Only show controls when there is more than one result.
  if ($settings['num_divs'] > 1) {
    if ($singleframe['controls'] == 1) {
      $vars['controls_top'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
    }
    elseif ($singleframe['controls'] == 2) {
      $vars['controls_bottom'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
    }
  }
  if ($singleframe['pager'] == 1) {
    $vars['pager_top'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
  }
  elseif ($singleframe['pager'] == 2) {
    $vars['pager_bottom'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
  }
 
  if ($singleframe['image_count'] == 1) {
    $vars['image_count_top'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
  }
  elseif ($singleframe['image_count'] == 2) {
    $vars['image_count_bottom'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
  }
}

I suggest the following change.

  // Only show controls when there is more than one result.
  if ($settings['num_divs'] > 1) {
    if ($singleframe['controls'] == 1) {
      $vars['controls_top'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
    }
    elseif ($singleframe['controls'] == 2) {
      $vars['controls_bottom'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
    }
-  }
  if ($singleframe['pager'] == 1) {
    $vars['pager_top'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
  }
  elseif ($singleframe['pager'] == 2) {
    $vars['pager_bottom'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
  }
 
  if ($singleframe['image_count'] == 1) {
    $vars['image_count_top'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
  }
  elseif ($singleframe['image_count'] == 2) {
    $vars['image_count_bottom'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
  }
+ }
}

I realize its a minor change and is also associated with a template_preprocess function but I'd rather not have to move this code and forever maintain it through future versions, just to have the pager not show up when only one node makes up my slideshow.

Thanks

Comments

redndahead’s picture

Status: Active » Closed (won't fix)

Sorry, but this won't get fixed. I know there would be people who would still like the counter and pager to be shown. The controls were the only ones that made absolutely no sense to show.

cybermache’s picture

Version: 6.x-2.3 » 6.x-3.x-dev
Category: bug » feature
Priority: Normal » Minor
Status: Closed (won't fix) » Active

How about adding it as an option within views then? Changing Category to 'feature request' and Status to 'active' to get some feed back on this idea.

If changing the hard code is not an option how about adding something like a select box titled "Display when slide count = 1". I'm sure others would find this feature useful. Maybe in a future version or 6.x or 7.x?

Thanks for entertaining my inquiries.

redndahead’s picture

Title: Misplaced } in views_slideshow_singleframe.theme.inc » Create an option for which widgets to show when javascript is not enabled
Version: 6.x-3.x-dev » 7.x-3.x-dev
kenorb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

thumbnailhover and singleframe have been removed. They were pretty much the same thing anyway.

See:
#1211384-4: Views slideshow for 7 seems to be missing singe frame and thunbnail hover
https://drupal.org/node/903244 (3.x - Views Slideshow Tutorial)