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.26 diff -u -p -r1.1.2.1.2.26 views_slideshow_singleframe.theme.inc --- contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 18 May 2010 05:16:07 -0000 1.1.2.1.2.26 +++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 29 May 2010 06:59:01 -0000 @@ -25,6 +25,25 @@ function template_preprocess_views_slide $options['views_slideshow_singleframe'] ); + // We need to go through the current js setting values to make sure the one we + // want to add is not already there. If it is already there then append -[num] + // to the id to make it unique. + $slideshow_count = 1; + $current_settings = drupal_add_js(); + foreach ($current_settings['setting'] AS $current_setting) { + if (isset($current_setting['viewsSlideshowSingleFrame'])) { + $current_keys = array_keys($current_setting['viewsSlideshowSingleFrame']); + if (stristr($current_keys[0], '#views_slideshow_singleframe_main_' . $vss_id)) { + $slideshow_count++; + } + } + } + + if ($slideshow_count > 1) { + $vss_id .= '-' . $slideshow_count; + $settings['vss_id'] = $vss_id; + } + drupal_add_js(array('viewsSlideshowSingleFrame' => array('#views_slideshow_singleframe_main_' . $vss_id => $settings)), 'setting'); $hidden_elements = theme('views_slideshow_singleframe_no_display_section', $view, $rows, $vss_id, $options['mode']); 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.35 diff -u -p -r1.1.2.1.2.35 views_slideshow_thumbnailhover.theme.inc --- contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 18 May 2010 05:16:07 -0000 1.1.2.1.2.35 +++ contrib/views_slideshow_thumbnailhover/views_slideshow_thumbnailhover.theme.inc 29 May 2010 06:59:01 -0000 @@ -27,6 +27,25 @@ function template_preprocess_views_slide $options['views_slideshow_thumbnailhover'] ); + // We need to go through the current js setting values to make sure the one we + // want to add is not already there. If it is already there then append -[num] + // to the id to make it unique. + $slideshow_count = 1; + $current_settings = drupal_add_js(); + foreach ($current_settings['setting'] AS $current_setting) { + if (isset($current_setting['viewsSlideshowThumbnailHover'])) { + $current_keys = array_keys($current_setting['viewsSlideshowThumbnailHover']); + if (stristr($current_keys[0], '#views_slideshow_thumbnailhover_main_' . $vss_id)) { + $slideshow_count++; + } + } + } + + if ($slideshow_count > 1) { + $vss_id .= '-' . $slideshow_count; + $settings['vss_id'] = $vss_id; + } + drupal_add_js(array('viewsSlideshowThumbnailHover' => array( "#views_slideshow_thumbnailhover_main_" . $vss_id => $settings)), 'setting');