Dumped Photos PHP Script

I don't think you need to know much PHP to use this script, except maybe if you want to modify it. Give it a try anyway and I'll help you out if you're stuck.

I bet you've already come upon directories of "dumped" photographs or pictures. You find yourself facing a raw directory listing of files (often named something like img0003789_03a.jpg if you're lucky). Not much fun!

This script allows the person dumping the photographs (you, I presume) to do just as little work as before: just create a directory and drop your *.jpg files in it. But it adds nicer presentation and navigation to the photos in the directory: you can easily view them all in one go (no more clicking on 30 photographs to find the one you want), one per page, or as a directory-like text-only listing.

Actually, I lied a bit. You need to spend about 30 extra seconds per directory to create an index.php page containing the following line:

<?php include($_SERVER['DOCUMENT_ROOT'] . "/dumps/dumps_engine.php"); ?>

Or something like that.

What to see it work? Haven't clicked on any of the links above? Hop off straight away to my dumped galleries and look at the cat, for example. Nice, huh? And I didn't have to do more than stick my photographs in a directory and add the index.php page described above.

Of course, I've included the top and bottom templates I use on the rest of the site.

Here is the source code of the script I am using. And here is a portable version of the script that you can just stick on your site and use as-is.

The script assumes the "root directory" for your dumped galleries is "/dumps/". You can change that in the script easily (change the value of $dumps_root_directory).

Of course, if you want to work on the layout or integrate your own includes it will take a bit of initial preparation before first use. But remember, this is meant as an alternative to dirty "directory-listing"!

Modify the script as much as you like and redistribute your versions if you want, but please leave the little credit note somewhere (at least in the comments).

I'm aware these instructions are a bit raw. Give it a try and get back to me with any problems. I'll help you out (I love walking people through stuff!) and update this page so that it can benefit other people.

Waiting to hear from you!

::: discussion ::: (1)

This site will look much more pretty in a browser which supports web standards, but it is accessible to any browser or Internet device. Browsers which do not support CSS will get this message, even if they are otherwise standards-compliant. Do you want to upgrade?

French - français! Ce site aura l'air bien plus joli dans un navigateur conforme aux standards du web, mais il est accessible avec n'importe quel navigateur ou dispositif Internet. Désirez-vous faire une mise à jour?