> Notes > Culture > Technology



Cycle Thumbs Gallery


Here you find a system which

  1. crawls the current (or any given) directory and all the subdirectories below it
  2. gathers all the image files
  3. randomly chooses a few of them
  4. uses the chosen files to build the cycling slideshow
  5. links the slideshow to the real gallery (or whatever…)

Once you reload the page, new images are picked up. And should you upload new images in the meanwhile, they are automatically detected at page reload.

My programming skills are next to zero, so all I did myself was actually lift some lines of code from a few examples I found on the internet and paste them all together.
Most of the job is then done by jQuery and the jQuery Cycle plugin: to them goes all the praise and glory.

To my great surprise, the “loot & paste” approach worked well! …although not flawlessy…

Should you wonder: it’s all open-source, of course.
In case you want to try it, please download the zipped folder which includes all you need to have a working demo close to the one you can see here.
For the sake of simplicity, close to bare html is applied here, but galleries can be styled nice with a few lines of css code; see more at the jQuery Cycle site, please.

As I use Jason Molenda’s shell script to build my own galleries, you’ll find that the package here is set to grab all “-t.jpg” files, which are the thumbnails: you might easily override it, of course.

Share this page with your friends on your favorite social bookmarking site...