function setDefault(&$var, $DefaultValue)
{
if (!IsSet($var))
{
$var = $DefaultValue;
}
}
//
// Set default configuration if not set in configuration file
//
setDefault($thumbnails_columns, 3);
setDefault($thumb_prefix, "thumb_");
setDefault($normal_prefix, "normal_");
setDefault($generate_thumbnail_images, 1);
setDefault($thumbnail_image_resolution, "160x120");
setDefault($thumbnail_image_jpeg_quality, 80);
setDefault($max_thumbnail_images_to_generate, 10);
setDefault($generate_normal_images, 1);
setDefault($normal_image_resolution, "640x480");
setDefault($normal_image_jpeg_quality, 80);
setDefault($allowed_pictures, array("jpg", "jpeg", "gif"));
setDefault($allowed_movies, array("avi", "mov", "mpg", "mpeg"));
setDefault($allowed_documents, array("doc", "htm", "html", "pdf"));
setDefault($language, "english");
setDefault($showexifinfo, False);
setDefault($albumnavigation, True);
setDefault($picturenavigation, True);
setDefault($showdescriptions, True);
setDefault($showalbums, True);
setDefault($addwatermark, False);
//
// Legacy support
//
if (!IsSet($pictures_dir)) $pictures_dir = $topdir;
if (!IsSet($pictures_url)) $pictures_url = $topurl;
// Normal image resolution
$normalImgResArray = explode("x",strToLower($normal_image_resolution));
$iNormalImageWidth = $normalImgResArray[0];
$iNormalImageHeight = $normalImgResArray[1];
// Thumbnail image resolution
$thumbImgResArray = explode("x",strToLower($thumbnail_image_resolution));
$iThumbnailImageWidth = $thumbImgResArray[0];
$iThumbnailImageHeight = $thumbImgResArray[1];
// Nr of thumbnail images that are created on this page request
$iNrOfThumbnailImagesCreated = 0;
//
// Initialise the thumbnail directory and url if it is not set
//
if (!IsSet($thumb_dir)) $thumb_dir = $pictures_dir;
if (!IsSet($thumb_url)) $thumb_url = $pictures_url;
?>
IMGP1585_edited-1.jpg - picture 8 of 40
Direct link
Kingtech Modified SilverMine(tm) 2.62betaA - Content Copyright (c) 2001-2011 Kingham Technology Pty Ltd