Image Gallery
Features:
- Automatically generated thumbnails (GD2 required).
- Custom image captions.
- Making categories and uploading images via FTP.
- Customizable templates.
- No database requirement.
Downloads:
Version 1.0.3 (24 KB) - Some bug fixes 10 July 06
Demos:
Licence:
Installation:
- Extract all files to a directory on your server.
- Load
http://yoursite/PATH/TO/GALLERY/index.phpon a web browser. If you're able to see the "Example Folder" and its images as well as to navigate around, everything is DONE. Otherwise, ask your web host about your document root for later use.
Usage:
- Place all images and directories (categories) in the 'data/' folder. Any directory can have unlimited subdirectories.
- Image captions are written in a 'caption.txt' file placed directly in the folder that stores images to which the captions belong. The 'caption.txt' file is written in INI format as following
; this is a comment ; captions'd be enclosed in quotes file1.ext1 = "caption for file1" file2.ext2 = "caption for file2.ext2"
Configuration:
The 'index.php' source file should give you sufficient information to configure the gallery.
The following code is an example to display the gallery in a different PHP page.
<?php
// include the gallery script
include('PATH/TO/gallery.php'); // required
// create a gallery object
$gallery = new WingedGallery(); // required
// set the document root
$gallery->setDocumentRoot('/HOME/ME/PUBLIC_HTML');
// set a template in the 'template/' folder
$gallery->setTemplate('MY_TPL');
// set the URL of this page
// remember the trailing question mark (?)
$gallery->setURL('/index.php?');
// set the gallery name
$gallery->setGalleryName('My Gallery');
// set the size of the small thumbnail
$gallery->setSmallThumbSize(75);
// set the size of the big thumbnail
$gallery->setBigThumbSize(200);
// display the gallery
$gallery->display(); // required
?>
- Link to the gallery stylesheet in the <head> section:
<link rel="stylesheet" type="text/css" href="PATH/TO/GALLERY/template/MY_TPL/style.css" />