IMET Bratislava - A turnaj - 04.12.2010
//////////////////////////////////////////////////////////////
// Galleria v1.06 by la'dsasha (sasha@bittersweet2.com)
// Last edited June 13, 2002
// 1.02 created by DrTebi (DrTebi@yahoo.com)
//
// This script will automatically generate an index page with
// thumbnails, which link to the full size picture.
// All you have to do is this:
// 2. Create two directories: one with the full size images,
// and one with the thumbnails. Please remember the
// filenames of the images in both directories have to
// match, otherwise this script is useless!
// 3. Change some of the default variables below if you like,
// then save this script in the directory where the 'full'
// and 'thumbs' directories are, and browse your gallery...
// 4. If you want captions below the full size image
// names, add a 3rd directory and add text files named after
// your images, but with a .inc at the end like this:
// your_image_name.jpg.inc. Don't worry if there isn't a
// caption file for every image, since the script will ignore
// it if there isn't one.
//////////////////////////////////////////////////////////////
// Added image dimensions for all "img" tags. Images will
// now be linked to via $script?i=image_name, in case the
// directory contents change.
// editable variables ///////////////////////////////////////
// thumbnails title
$thumb_title = 1; // set to 1 if you want the image filename below the thumb, 0 otherwise
// full size images title
$full_title = 1; // set to 1 if you want the image filename below the the full size image, 0 otherwise
// how many thumbnails should appear per row?
$cols = 2; // 3 looks the best, but you may want more or less, depending on the size of your thumbnails
// how many thumbnails per page?
$max_thumbs = 72; // a multiple of $cols looks the best, or 0 for all thumbnails on one page
// just make sure your directory name is inside double quotes
//$dir = DirName("$PATH_INFO"); (trying...)
$full_dir = "images";
// thumbnail directory name
$thumbs_dir = $full_dir."/t"; // just make sure your directory name is inside double quotes
// full size image directory name
// captions directory name
$captions_dir = ""; // if you don't want captions at all, don't worry about this
// extension name
$ext = "php"; // just incase you are using a different extension name for your script; if your server is not set for "index.$ext to be the index page, put "0".
// captions extension
$cext = ".x"; // use whatever you're comfortable with
// end editable variables ///////////////////////////////////
// figure out this script's name
$script = $HTTP_SERVER_VARS['SCRIPT_NAME'];
if (basename($script) != "index.$ext") {
$script = basename($script);
}
// done to make the script pretty. will call itself as gallery_dir/?i=$i if it is an index page
else {
$script = "./";
}
// error function
function error_page($error) {
print " \n\n$error \n |
\n