View Full Version : Try to mod Conveyor Belt script

03-06-2009, 03:35 AM
1) Script Title: Conveyor Belt slideshow script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm

3) Describe problem: No problem with the script. Works as advertised.
This is the random picture software that gets parked in your picture folder. All you have to do is at the end of the directory path put> rotate.php. It goes out when it's invoked and ramdomly gets a pictures and returns it.

If you don't want to download the code here's a link to where It's posted. The rest of the thread is me playing around with it and can be ignored.

Now in the conveyor belt there are 5 paths to images to put in the belt display. What I have done is to ignore the clickable part and change the directory path to end with the rotate.php call.
It's getting the images just fine.
I have 5 folders with each one having a copy of the rotate.php file. Each directory path is independant. You can't have more than one call for the rotate.php from different links. One link, one php file, one folder.

The problem is when the belt hits the end of the run it uses the same five images to show again.
My question is, is there a way to clear the display program so that it runs through each link like it's the first time?

03-06-2009, 03:59 AM
I believe that trick of PHP would only work as the page loads. And, if it really is random, even if you could get it to repeat, there would be no telling whether or not the same images would get selected anyway. That's what random is. If that's OK with you, the new images would still have to load, there probably wouldn't be enough time for that once the conveyor is in motion. And if the widths are different, it will throw off the conveyor.

In my opinion you should just settle on which images you want in the conveyor. Use those. Most folks won't care if they get shuffled around or not. They will not be on the page often enough for it to make a difference.

03-06-2009, 04:38 AM
Oh well, nothing ventured, nothing learned...
Back to the drawaing board.

After thought: It doesn't work as I would have liked it to but the viewer gets 5 new images when they come back to the index page when it's running. So it doesn't get stale.