random display order

65 views
Skip to first unread message

a...@vakalis.edu.gr

unread,
Apr 30, 2007, 4:24:34 AM4/30/07
to PHPSlideShow by zinkwazi.com
I don't see any evidence of this in the current download. How to I get
a random display order?

Apart from that this is a great idea.

Regards

fishermansblues

roc...@there.net

unread,
Jun 2, 2007, 9:52:39 PM6/2/07
to PHPSlideShow by zinkwazi.com
It appears that when you download from the main site you are not
getting the latest version of phpslideshow, you are getting v.9.9.1,
but the feature regarding random images is in v.9.9.2. I have written
to the author of the script asking how to get v.9.9.2. Maybe he will
fix the download link on his page.

-verbila


On Apr 30, 1:24 am, a...@vakalis.edu.gr wrote:
> I don't see any evidence of this in the current download. How to I get

> arandomdisplay order?

jwco...@gmail.com

unread,
Jul 6, 2007, 6:16:58 PM7/6/07
to PHPSlideShow by zinkwazi.com
I hacked the code to allow for random order and continuous display:

if (($auto == "1")) {
$next=rand(1,$number_pics+1)-1;
$auto_url = "&auto=1";
$meta_refresh = "<meta http-equiv='refresh' content='".$delay;
$meta_refresh .= ";url=".$path."?directory=".$path_to_images.
$auto_url."&currentPic=".$next."'>";
$template = str_replace("<META_REFRESH>",$meta_refresh,
$template);
$auto_slideshow = "<a href='$path?directory=
$path_to_images&currentPic=$currentPic'>$lang_stop_slideshow</a>\n";
$template = str_replace("<AUTO_SLIDESHOW_LINK>",
$auto_slideshow,$template);

Cole Johnson

unread,
Mar 12, 2016, 10:47:34 PM3/12/16
to PHPSlideShow by zinkwazi.com, jwco...@gmail.com
Confirmed this is working. For me I replaced lines 355-361 with the code listed here. Very nicely done!!!

What I replaced: if ($auto == "1") {
        $auto_url = "&auto=1";
        $meta_refresh = "<meta http-equiv='refresh' content='".$delay;
        $meta_refresh .= ";url=".$path."?directory=".$path_to_images.$auto_url."&currentPic=".$next."'>";
        $template = str_replace("<META_REFRESH>",$meta_refresh,$template);
        $auto_slideshow = "<a href='$path?directory=$path_to_images&currentPic=$currentPic'>$lang_stop_slideshow</a>\n";
        $template = str_replace("<AUTO_SLIDESHOW_LINK>",$auto_slideshow,$template);

Reply all
Reply to author
Forward
0 new messages