I don't have it working. I've attached a .jpg with screenshots of what I've done. I'm not sure I'm allowing the embeddings correctly. Any assistance will be greatly appreciated.

CommentFileSizeAuthor
fading_slideshow_support.jpg187.08 KBcjschott2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cjschott2’s picture

Status: Active » Fixed

Nothing needs to be done with the .js file - that should be made clear in the documentation

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

arielberg’s picture

/*
maybe this would help:
(
global $base_path;
foreach ($files as $file) {
$file = preg_replace('/^\.\//', '/'.$base_path.'/', $file);
part has changed).
*/

<?php
/**
* Implementation of hook_menu().
*/
function fade_slideshow_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/fade_slideshow',
'title' => t('Fading Slideshow'),
'description' => t('Configure Fading Slideshows.'),
'callback' => 'drupal_get_form',
'callback arguments' => 'fade_slideshow_settings',
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM);
}

return $items;
}

/**
* Implementation of hook_settings().
*/
function fade_slideshow_settings() {

$form = array();

$form['fade_slideshow_instructions'] = array(
'#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
);
$number_of_slideshows = 6;
$i = 1;
while ($i <= $number_of_slideshows) {
$collapsed = false;
if ($i > 1) $collapsed = true;
$form['fade_slideshow_ss' . $i] = array(
'#type' => 'fieldset',
'#title' => t('Slideshow ' . $i . ' settings'),
'#collapsible' => true,
'#collapsed' => $collapsed,
);
$form['fade_slideshow_ss' . $i]['instructions'] = array(
'#type' => 'fieldset',
'#title' => t(''),
'#collapsible' => false
);
$form['fade_slideshow_ss' . $i]['instructions']['instructions'] = array(
'#value' => '

To embed this slideshow in a template, node or block simply insert this php code.
&lt;?php print fade_slideshow_show(' . $i . '); ?&gt;

',
'#weight' => -99
);
$form['fade_slideshow_ss' . $i]['fade_slideshow_image_dir_ss' . $i] = array(
"#type" => "textfield",
"#title" => "Image directory",
"#field_prefix" => t( "/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/'),
);
$form['fade_slideshow_ss' . $i]['fade_slideshow_width_ss' . $i] = array(
"#type" => "textfield",
"#title" => "Width",
"#size" => 4,
"#description" => t( "Set it to accommodate the largest image within the slideshow" ),
"#default_value" => variable_get( "fade_slideshow_width_ss" . $i, ''),
);
$form['fade_slideshow_ss' . $i]['fade_slideshow_height_ss' . $i] = array(
"#type" => "textfield",
"#title" => "Height",
"#size" => 4,
"#description" => t( "Set it to accommodate the largest image within the slideshow" ),
"#default_value" => variable_get( "fade_slideshow_height_ss" . $i, ''),
);
//$form['fade_slideshow_ss' . $i]['fade_slideshow_borderwidth_ss' . $i] = array(
// "#type" => "textfield",
// "#title" => "Border width",
// "#size" => 2,
// "#description" => t( "Width of border of the slideshow" ),
// "#default_value" => variable_get( "fade_slideshow_borderwidth_ss" . $i, '0'),
//);
$form['fade_slideshow_ss' . $i]['fade_slideshow_delay_ss' . $i] = array(
"#type" => "textfield",
"#title" => "Delay",
"#size" => 2,
"#description" => t( "Number of seconds delay between each image change." ),
"#default_value" => variable_get( "fade_slideshow_delay_ss" . $i, '3'),
);
$form['fade_slideshow_ss' . $i]['fade_slideshow_pause_ss' . $i] = array(
'#type' => 'radios',
'#title' => t('Pause on mouseover'),
'#default_value' => variable_get('fade_slideshow_pause_ss' . $i, 1),
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t('Enabeling this option will make the slideshow pause when the mouse is hovering over the image.'),
);
$form['fade_slideshow_ss' . $i]['fade_slideshow_random_ss' . $i] = array(
'#type' => 'radios',
'#title' => t('Random'),
'#default_value' => variable_get('fade_slideshow_random_ss' . $i, 1),
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t('Enabeling this option will show the images in random order.'),
);
$i++;
}

return system_settings_form($form);
}

function fade_slideshow_show($show) {

require_once('./'. drupal_get_path('module', 'fade_slideshow') .'/fade_slideshow.js.inc');
return theme('fade_slideshow_show', $show);;

}

function theme_fade_slideshow_show($show) {

$width = variable_get( "fade_slideshow_width_ss" . $show, '');
$height = variable_get( "fade_slideshow_height_ss" . $show, '');
$border = variable_get( "fade_slideshow_borderwidth_ss" . $show, '0');
$delay = variable_get( "fade_slideshow_delay_ss" . $show, '3') * 1000;
$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/') . '/');

$js = '

';
$js .= ' '; $js .= 'var fade_images_' . $show . '=new Array();'; $cnt = 0; global $base_path; foreach ($files as $file) { $file = preg_replace('/^\.\//', '/'.$base_path.'/', $file); $js .= 'fade_images_' . $show . '[' . $cnt . ']=["/' . $file . '", "", ""];'; $cnt++; } if ($random == 'R') { $js .= 'new fadeshow(fade_images_' . $show . ', ' . $width . ', ' . $height . ', ' . $border . ', ' . $delay . ', ' . $pause . ', "' . $random . '")'; } else { $js .= 'new fadeshow(fade_images_' . $show . ', ' . $width . ', ' . $height . ', ' . $border . ', ' . $delay . ', ' . $pause . ')'; } $js .= '

';
$js .= '

';

return $js;

}

function _fade_slideshow_explore_dir($path = '', $recursive = FALSE) {
// A list of image extensions. It should be on lower and
// upper cases to work on non GNU systems, like Solaris and Windows
$exts = array('png', 'gif', 'jpeg', 'jpg', 'bmp', 'PNG', 'GIF', 'JPEG', 'JPG', 'BMP');

// Get all files from a given path
$files = array();
foreach ($exts as $ext) {
$files = array_merge($files, glob("$path*.$ext"));
}

// If its a recursive scan, enter in all directories
// and scan for more image files
if ($dirs = glob("$path*", GLOB_ONLYDIR) and !empty($recursive)) {
foreach ($dirs as $dir) {
$files = array_merge($files, _fade_slideshow_explore_dir("$dir/"));
}
}

return $files;
}

RachelR-1’s picture

would probably help a hell of a lot more if you told us what to do with it... I'm just saying. Anyhoo, I have a similar problem I think. The whole thing just doesn't show up - does anyone actually know how to use this or is it now defunct like so many others?

Perhaps I should add that the code straight from DD works in a blank document outside Drupal, but cannot be hardcoded into the page template nor does the module seem to show anything in the pages although when viewing the source it appears to be there.

RachelR-1’s picture

Status: Closed (fixed) » Active

Can't figure it out - is it still a working module? Is it possible to get some decent instructions on this?

halftone’s picture

I spent days trying to get this working too. As you say, the page code seemed OK, but no image display resulted. Consigned to the great dustbin of Drupal until someone cleverer than me fixes it. Which is unlikely as all the clever people have charged ahead to newer versions of Drupal.

jpowell’s picture

The docs indicate that it works with v1.51 of the DynamicDrive Javascript, but the download on the site is now v2.1. There may be an incompatibility between the JS and the module.

drudancer’s picture

Issue tags: +Drupal 5, +Drupal 6, +dynamic drive ultimate fading (fade-in) slideshow, +php script, +drupal page

The following procedure works with Drupal 6.16 and dynamic drive’s ultimate fade-in slideshow(v2.1). I also got this to work with Drupal 5.22
Create a folder named fade on your pc. Install node++ or some other text editor on your pc.
Create a files folder on the same level as includes, misc, modules, profiles, scripts, sites and themes
on your Drupal website.

Step 1
Go to
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
Locate the javascript for fade-in slideshow version 2.1

Step 2
Copy the code that the page indicates should go into the head of the html document

/*********************************************** * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more ….. And paste it into a file in a folder called fade that you’ve created on your pc. I called my file fadhd.js. Step 3 Click on fadeslideshow.js, which is part of the 1 external file and 3 images referred to in the page. Copy the code and paste it into a file on your pc called fadeslideshow.js Right click on the 3 graphic images, x.png, restore.png, loading.gif, one by one and save them to the folder called fade somewhere on your pc Step 4 Review the files you should have in your folder. They are fadhd.js, fadeslideshow.js, x.png, restore.png, loading.gif. Step 5 Go to: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js and download the file jquery.min.js to your folder named fade Step 6 Open fadhd.js in a text editor. I use notepad++. Delete these two lines:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="fadeslideshow.js">
Step 7 Delete these two lines
</script>

<script type="text/javascript">
Which occur after the /*********************************************** * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) Explanation. Step 8 Go to the end of the file fadhd.js and eliminate the last line </script> SAVE the file. You shouldn’t have any <script> or </script> statements. Step 9 Upload the folder fade to the files folder on your Drupal 6.16 installation. Step 10 Go to a page in your drupal content where you want the slideshow, open it, and make sure php code is checked and saved under input format. I used the fckeditor. I had problems with the tiny mce editor which converted the <?php to <- - Step 11 On your page, click on the source button in the FCK editor, then enter the following code:
<?php
drupal_add_js("files/fade/jquery.min.js");
drupal_add_js("files/fade/fadeslideshow.js" );
drupal_add_js("files/fade/fadhd.js");
?>
<div id="fadeshow1"></div>
SAVE the page. Step 12 The code in step 11 will show only the first slideshow. If you want the second slideshow, just put in the rest of the code.
<div id="fadeshow2"></div>

<div id="fadeshow2toggler" style="width:250px; text-align:center; margin-top:10px">
<a href="#" class="prev"><img src="http://i31.tinypic.com/302rn5v.png" style="border-width:0" /></a>  <span class="status" style="margin:0 50px; font-weight:bold"></span> <a href="#" class="next"><img src="http://i30.tinypic.com/lzkux.png" style="border-width:0" /></a>
</div>
Step 13 You might get an error trying to show only one slideshow. In the file fadhd.js, The code,
var mygallery2=new fadeSlideShow({
	wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
		["http://i30.tinypic.com/531q3n.jpg"],
		["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
	],
	displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	descreveal: "always",
	togglerid: "fadeshow2toggler"
})
Needs to be replaced with
var mygallery2=new fadeSlideShow({
	wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
	
}) 
To allow the first slideshow to run without error. With this change the second slideshow will not run. Step 14 Content of the slideshow. You need to open fadhd.js and look at line 12 which should say var mygallery=new fadeSlideShow({ Then below that it should say:
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: [
		["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
		["http://i30.tinypic.com/531q3n.jpg"],
		["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
	], 
This content needs to be modified to show images from a file and folder of your choosing.
apaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -Drupal 5, -Drupal 6, -dynamic drive ultimate fading (fade-in) slideshow, -php script, -drupal page

I am closing this issue, since it's for a Drupal version no longer supported.