Populate slideshow with 5 random images from directory
I've been searching for a clean way to get 5 random images from an images folder and use them in a slideshow.
Is there a reliable work around?
There are free tools that will rename all the files for you in a directory to a specific formula as well - if you're set up to use webdav, it would then be really simple to re-upload the renamed files...
Server-side scripting isn't possible with WA. Your options are to either add all the file names from the directory to an array manually and use that in your script, or if you have access to another server that allows server-side scripting, to upload the images there.
If you have a lot of images, there are free programs that will create a list of all the file names in a directory and save it to a text file, which will make it easier to create the array.
Thanks for the response, but that's not quite what I'm looking for.
To use the plugin I would have to change all of the file names to be sequential, like:
slide_01.jpg, slide_02.jpg and slide_03.jpg and so on...
Also it looks like it would need some significant modification to get it to load a given number of random images from a directory, rather than loading all images in the directory.
To get the what I'm after, I'm thinking, I'll have to use a server side approach, but I keep getting 504 access denied when trying Ajax requests, and Wild Apricot's editor just comments out PHP...
Look for something using Jquery should do the trick - something like this perhaps?
I've used it successfully elsewhere, but not on a WA site, so it might do the trick!