It is a free photo gallery written in PHP. This script inspired by simplicity of brilliant MySQL client Adminer from Jakub Vrána. It is completely in only one file. It is very simple to upload it anywhere to hosting and use it in a few seconds. And why don't use this idea for web photo gallery?
*) Support for some formats depends on browser compatibility and support of HTML5 standards.
The selection of albums, lightbox-like preview of photo and details of photo with GPS geotag and maps.
Actual minified version:
Download current version of SiGal
Other download options (older versions):
Modified BSD License (http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Here you can see some planned features:
More on GitHub...
This is common how-to:
That is all! Now you can access via your favorite browser to URL where is your index.php.
If you are not happy with default configuration, you can modify it by creating file config.php in a same dir as your index.php. Here is minimal exmaple with doc:
<?php /** Directory with pictures. */ $conf['dir'] = 'pictures'; /** Directory for caching thumbnails (must be writeable!).*/ $conf['cache'] = 'cache'; /** URL to default album and picture icon. May be absolute or relative. */ $conf['defaultIcon'] = '?static=defico'; /** Name of file with definition of title image. */ $conf['icotitlefname'] = '000.nfo'; /** Name of file with defined usernames/passwords for locked/private albums. */ $conf['lockfname'] = '000.lock'; /** Width of thumbnail. */ $conf['thumb_x'] = 160; /** Height of thumbnail. */ conf['thumb_y'] = 120; /** Width of middle size picture - the view size. */ $conf['middle_x'] = 800; /** Number of characters of shortened image title. */ $conf['imgTitleLen'] = 16; /** Title of whole gallery. */ $conf['galTitle'] = 'SiGal gallery'; /** String shown in bottom of each page. Designed to some words about legal use of photos. */ $conf['legal_notice'] = 'No photos can be distributted without written permission of their author (<a href="http://gimli2.gipix.net">Gimli2</a>).'; ?>
Be sure, that file with usernames and passwords (default: 000.lock) is unaccessible through browser! It can be done simply by creating .htaccess file with this content:
<FilesMatch ".*\.(lock|nfo)$"> Order Allow,Deny Deny from all </FilesMatch>
For better performance set caching header in .htaccess file like this:
<FilesMatch "\.(jpg)$"> <IfModule mod_headers.c> eETag None Header unset Last-Modified der unset ETag Header set Cache-Control "public" Header set Expires "Sun, 15 Oct 2023 13:04:13 +0200" </IfModule> </FilesMatch> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 </IfModule>
You can redefine all CSS in file ownstyle.css which should be beside your index.php.
In given album directory simply create text file 000.nfo and put the name of selected title file (eg. car.jpg) in it.
In given album directory simply create text file 000.lock and put there next string without quotes: "username:password". If you want more users, add each on separate line. The duplicities in usernames are permited. In that case the user has more than one password. Warning: The passwords are NOT encrypted!
Many things can be redefined or configured. Consult documentation of attributes and explore inner parts in sources. ;-)