I don’t know if anyone would be interested in this, but I wrote a really (REALLY) simple image gallery script. You can view it at the URL pictures.timskoch.com. It has not got many features, but I wanted total control over how the gallery was displayed, and I found that difficult to do when I used other people’s ‘bells-n-whistles’ scripts. Here’s how it works: You put it in your root picture directory. When called, it looks through all subdirectories (and sub-sub, etc…) and finds images prefixed with a “_”. It assumes these are thumbnails, and builds a table using all of the images for which there is a full-sized version.
The resulting page references a “style.css” stylesheet, giving you control over how the page is displayed. There are a few features which are set by flags in the begining of the script:
- The script can warn you when it finds orphaned thumbnails (thumbnails without bigger images)
- The scipt can include all non-thumbnailed imaged
- The script can include a link only to non-thumbed images (same as above, but loads faster)
- A list of directories within the current directory are listed
- A bread-crumb trail nav-bar is listed at the top, with a link back to your blog
- You can send arguments to the script telling it to either
- Start in a particular directory (actually, the script itself uses this feature recursively for navigation)
- Highlight a particular thumbnail (useful for linking to directories from elsewhere)
You can see it in action at timskoch.com. It’s not much – I know it may be too bare-bones for most people, but if anyone is interested email me or post here and I’ll send you the code.
- The topic ‘Short, simple and sweet image gallery…’ is closed to new replies.