Bill Slaughter

Randomize the Images for Display

3 posts in this topic

Hi.

It is impossible. Please open file /mod_bt_simpleslideshow/mod_bt_simpleslideshow.php

Find this line

$numberOfPhotos = count($photos);

add this line right below it

$photos = shuffle($photos);

Enjoy it.

Share this post


Link to post
Share on other sites

Hi, first of all thanks for this graeat extension.
I applied the suggested modification in order to randomize the slideshow and now the code is:

$numberOfPhotos  = count($photos);
$photos = shuffle($photos);
if (count($photos) == 0) {
    echo JText::sprintf('NOTICE_NO_IMAGES', $module->id);
    return;
}

but, after apllied, in the slideshow area i see this warning:

Warning: Invalid argument supplied for foreach() in /web/htdocs/www.easyflyitaly.com/home/efi/modules/mod_bt_simple_slideshow/mod_bt_simple_slideshow.php on line 273

and no image are displayed

Any suggestion ?

Thanks in advance

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now