I'm using the following code in a block to display random pictures using 5.x-1.15 but it stopped working when I installed 5.x.-1.16:

  // This is where the random pictures are
  $sPics = "/path/to/random/pictures/";

  // Loop through the directory and get the file names
  $d = dir($sPics);
  while (false !== ($entry = $d->read())) {
    if ($entry != '.' && $entry != '..') { $aPics[] = $entry; }
  }
  $d->close();
	
  // Shuffle the file name array
  shuffle($aPics);

  // Write the slide show text
  $ssc_1 = "[slideshow:2, rotate=10, blend=10, name=pic_block, width=180, layout=none";

  foreach ($aPics as $sPic){ $ssc_1 .= ", img=|/family/files/rand_pics/".$sPic."|"; }
  
  $ssc_1 .= "]";

  // Present the show
  echo(slideshow_creator_process_text($ssc_1));

Thanks,

Wade

Comments

brmassa’s picture

Wade,

1* sorry for your long waiting for answers. i was in vacation.
2* the "bug" continues on 1.17?

best regards

massa

brmassa’s picture

Status: Active » Closed (fixed)