how to start the slideshow randomly

37 views
Skip to first unread message

Evan

unread,
Jul 30, 2009, 9:04:18 PM7/30/09
to PHPSlideShow by zinkwazi.com
Hi,

I have two newbie question?.

how can I randomly start the slideshow? ie, randomly choose pics to
show.

and how to auto start, since i am using php file as my index page, so
using the &auto=1 is not my option.

actually, i am trying to make a website that similar to http://www.greglawler.com/.

thanks .

veram

unread,
Jul 30, 2009, 9:14:23 PM7/30/09
to PHPSlideShow by zinkwazi.com
I don't know how you would modify the code to run a random slideshow,
but if I understand your second question correctly and you want to use
phpslideshow as your home page with an auto-start slideshow, all you
need to do is rename phpslideshow.php to index.php. It will run just
the same.

prathibha preethi

unread,
Sep 5, 2009, 7:13:29 AM9/5/09
to PHPSlideShow by zinkwazi.com
even i am facing the same problem.. can anyone help it out...

BandonRandon

unread,
Sep 6, 2009, 11:21:23 PM9/6/09
to PHPSlideShow by zinkwazi.com
I know having a random slideshow order is on the "todo" list. This is
something I played with for a bit and got it to half work but it
wasn't something I was really that interested in so i stopped trying.
I know it can be done though it'll just take some work. Not sure your
comfort level in php.

As for your second question, I don't see why you can't manually change
the line that says:
$auto = isset($_GET['auto']) ? strip_tags($_GET['auto']) : '';
to
$auto = "1";

the only problem I see with this is then the slideshow would always be
on and there would be no way to stop the slideshow. This of course
could be fixed with an if statement I'm sure if you changed the auto
variable to something like.
if(isset($_GET['auto'])){
$auto = strip_tags($_GET['auto']);
}
else{
$auto = "1";
}

then you updated the link of the next, prev links to add auto=0 to the
link structure that would then stop the slideshow when auto was set as
anything but "1"

Another option (again you would have the same problem as there being
no way to stop the slideshow unless you updaated the code a bit) Would
be using an .htaccess file to either redirect index.php to index.php?
auto=1 using either mod_rewrite or a straight forward redirect.

Hope that helps a bit
Brooke
Reply all
Reply to author
Forward
0 new messages