diff -up sites/all/modules/fade_slideshow/fade_slideshow.info sites/all/modules/fade_slideshow_6.x/fade_slideshow.info --- sites/all/modules/fade_slideshow/fade_slideshow.info 2008-09-01 08:50:17.000000000 -0500 +++ sites/all/modules/fade_slideshow_6.x/fade_slideshow.info 2009-02-24 06:57:33.000000000 -0600 @@ -1,8 +1,9 @@ name = Fading Slideshows -description = Wrapper for Ultimate Fade-in slideshow found at http://dynamicdrive.com/dynamicindex14/fadeinslideshow.htm +description = Wrapper for Ultimate Fade-in slideshow package = Image -; Information added by drupal.org packaging script on 2008-09-01 -version = "5.x-1.1" + +version = "6.x-1.1" +core = "6.x" project = "fade_slideshow" datestamp = "1220277017" diff -up sites/all/modules/fade_slideshow/fade_slideshow.module sites/all/modules/fade_slideshow_6.x/fade_slideshow.module --- sites/all/modules/fade_slideshow/fade_slideshow.module 2008-09-01 08:45:17.000000000 -0500 +++ sites/all/modules/fade_slideshow_6.x/fade_slideshow.module 2009-02-24 06:57:33.000000000 -0600 @@ -2,19 +2,18 @@ /** * Implementation of hook_menu(). */ -function fade_slideshow_menu($may_cache) { +function fade_slideshow_menu() { global $user; $items = array(); - if ($may_cache) { - $items[] = array( - 'path' => 'admin/settings/fade_slideshow', +// if ($may_cache) { + $items['admin/settings/fade_slideshow'] = array( 'title' => t('Fading Slideshow'), 'description' => t('Configure Fading Slideshows.'), - 'callback' => 'drupal_get_form', - 'callback arguments' => 'fade_slideshow_settings', - 'access' => user_access('administer site configuration'), + 'page callback' => 'drupal_get_form', + 'page arguments' => array('fade_slideshow_settings'), + 'access arguments' => array(user_access('administer site configuration')), 'type' => MENU_NORMAL_ITEM); - } +// } return $items; } @@ -30,6 +29,15 @@ function fade_slideshow_settings() { '#value' => '
This module supports up to 6 slideshows for your site. Complete the section(s) below for each slideshow you want to implement and then use the php code provided to embed your slideshow in a template, node or block.

', '#weight' => -99 ); + + $form['base_path'] = array ( + '#type' => 'textfield', + '#title' => 'Base path', + '#size' => '30', + '#default_value' => variable_get("fade_slideshow_base_path", '/sites/default/files/'), + '#description' => t('Base directory where slideshows are located. Be sure to include opening and closing slashes!'), + ); + $number_of_slideshows = 6; $i = 1; while ($i <= $number_of_slideshows) { @@ -53,7 +61,7 @@ function fade_slideshow_settings() { $form['fade_slideshow_ss' . $i]['fade_slideshow_image_dir_ss' . $i] = array( "#type" => "textfield", "#title" => "Image directory", - "#field_prefix" => t( "/files/" ), + "#field_prefix" => variable_get("fade_slideshow_base_path", '/sites/default/files/'), "#size" => 70, "#description" => t( "Directory where the source images for this slideshow are located." ), "#default_value" => variable_get( "fade_slideshow_image_dir_ss" . $i, 'slideshow_images/'), @@ -107,9 +115,21 @@ function fade_slideshow_settings() { } -function fade_slideshow_show($show) { +function fade_slideshow_theme() { - require_once('./'. drupal_get_path('module', 'fade_slideshow') .'/fade_slideshow.js.inc'); + return array( + 'fade_slideshow_show' => array( + 'arguments' => array('show' => NULL) + ) + ); +} + +function fade_slideshow_show($show) { + + global $base_url; + + drupal_add_js( drupal_get_path('module', 'fade_slideshow') .'/fade_slideshow.js'); +// require_once('./'. drupal_get_path('module', 'fade_slideshow') .'/fade_slideshow.js.inc'); return theme('fade_slideshow_show', $show);; } @@ -123,7 +143,7 @@ function theme_fade_slideshow_show($show $pause = variable_get('fade_slideshow_pause_ss' . $show, 1); $random = variable_get('fade_slideshow_random_ss' . $show, 1) ? 'R' : ''; - $files = _fade_slideshow_explore_dir('.' . $base_path . '/files/' . variable_get( "fade_slideshow_image_dir_ss" . $show, 'slideshow_images/') . '/'); + $files = _fade_slideshow_explore_dir('.' . $base_path . variable_get("fade_slideshow_base_path", '/sites/default/files/') . variable_get( "fade_slideshow_image_dir_ss" . $show, 'slideshow_images/') . '/'); $js = '
'; $js .= ''; $js .= '
';