is it possible to enable this so that i can have multiple slideshows..say..one for member pics..another for some images of wildlife..and so on..

means the slideshow shld be able to take different pics from diff folders for diff slideshow..

so we have Slideshow 1
Slideshow 2
Slideshow 3

like that...

Comments

justin3’s picture

here's a hack to achieve multiple blocks- if you do this you'll have to re-setup your initial couloir block- but that's not too hard.

I removed the 'path setting' in favor of a default, which you can set to taste. This is because the multiple blocks have paths like this:
slideshow block 1 path = files/couloir_slideshow1
slideshow block 2 path = files/couloir_slideshow2

So here's the hack:
copy the following code to couloir_slideshow.module, replacing the same bit, starting at line 194
(don't copy the < ? php ? > tags- they're just for highlighting)

<?php

function couloir_slideshow_block($op='list', $delta=0) {
 
  // listing of blocks, such as on the admin/block page
  $block = array();
if ($op == "list") {
      for ($i=1; $i <= variable_get('couloir_slideshow_number', '1'); $i++) {
        $blocks[$i]['info'] = t('Couloir Slideshow '.$i);
      }
	return $blocks;
  } else if ($op == 'view') {
// Set default path
$imagepath = 'files/couloir_slideshow'.$delta;

?>

just below this delete a few more lines, #204 & 210
$settings[imagepath] .... &
$imagepath= variable_get('couloir_slideshow_imagepath', 'files/couloir_slideshow');

then at about line 263, replace $form['couloir_slideshow_imagepath'] with

  $form['couloir_slideshow_number'] = array(
    '#type' => 'select',
    '#title' => t('Number of Slideshows'),
    '#description' => t('The total number of Slideshow (blocks) you want.'),
    '#default_value' => variable_get('couloir_slideshow_number', '1'),
    '#options' => drupal_map_assoc(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)),
  );

if you already have a slideshow running, remember to rename that image folder to: your_default_path1

hope this helps someone

goosemoose’s picture

Justin,

Thanks, this is exactly what I was looking for. One change I made that might help others. If you are running multistes change the line:

$imagepath = 'files/couloir_slideshow'.$delta;

to

$imagepath = conf_path() . '/files/couloir_slideshow'.$delta;

And you're set :)

Any chance these changes will make it into the next version of the module?

Dominic

ComputerWolf’s picture

Assigned: Unassigned » ComputerWolf
Status: Active » Closed (fixed)

I have slightly modified the changes done by Justin to allow you to still choose a file path and then append the slideshow number to the end of the folder. These changes have been added to version 5.x-1.3. However, you will still need to modify the code as stated by Dominic if you want to apply the mulitisite setup.