Skip to content

A simple PHP slideshow that displays photos from a subdirectories in a random order

License

Notifications You must be signed in to change notification settings

c0f/SimpleRandomPhotoSlideshow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Simple Random Photo Slideshow

This is a simple slideshow programme that scans a directory for images and displays them in a random order.

The scanned directory can contain images or subdirectories containing images.

The slideshow is configured using variables at the top of the slideshow.php file:

  • $interval - this sets the number of seconds a photo is displayed before the next photo is displayed.
  • $photoDir - this is the path where photos or directories of photos are stored. This must be relative to the slideshow.php file.
  • $photoExt - the file extension that will be search for. Only one extension is supported but it is not case sensitive.
  • $rescanAfter - this is the number of minutes after which $photoDir will be rescanned.
  • $backgroundColor & $textColor - the background and text colors.

Acknowledgements

I am not an experienced PHP developer and this programme would not work without a block of code from Stack Overflow that is used to scan directories. The getDirContents() function was written user2226755 and is available at:

https://stackoverflow.com/questions/24783862/list-all-the-files-and-folders-in-a-directory-with-php-recursive-function

About

A simple PHP slideshow that displays photos from a subdirectories in a random order

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages