ImgBrowz0r
ImgBrowz0r is a PHP class that can be used to display galleries of images stored in server side files. It scans a given directory for images with file name extensions of GIF, JPEG, and PNG image formats.
The class generates thumbnails which are used to display the gallery images in an HTML table. The thumbnails are presented as links to pages to show the full size images.
Features:
- Support for categories.
- Automatic thumbnail creation and caching.
- Random thumbnails for the category overview.
- Transparency in PNG and GIF images is preserved in the thumbnail.
- Valid XHTML 1.0 Strict output.
- Easy to integrate into any website or cms.
- Simple template support.
- Easy to style with CSS.
- Ability to configure time display and timezone.
If you experience problems, have questions or found a bug then feel free to contact me.
Demo
Here is a stand-alone demo: click click and here is an integrated demo: click click.
If you have ImgBrowz0r running at an other website please contact me. I’ll list it here so people can see it in an production enviroment and how it’s used and integrated.
Manual
Version 0.2:
A manual (PDF) is included in the download package. If the manual is outdated you can get a up-to-date version in the docs folder.
You can upgrade ImgBrowz0r 0.2.* by replacing the imgbrowz0r.class.php file.
Version 0.1.1
See the example file (index.php) in the download package.
Changelog
Version 0.2.2 – September 26th 2008:
- Better file check.
- Category names with non-latin characters now supported (see manual for more information). Patch provided by Serge Timakov.
- Fixed bug in make_thumb(). Thumbnails of square images (images with dimensions like 600*600px) weren’t resized.
- Removed ‘rename file if extension does not match image type’ feature.
- Added ‘IMGBROWZ0R_VERSION’ constant which contains the software version.
Version 0.2.1 – September 4th, 2008:
- Fixed bug. Thumbnails where created each time a category was visited.
Version 0.2 – September 3th, 2008:
- Tranparency of PNG and GIF images are now preserved in thumbnails.
- Better image type check (check if the image type matches the file extension, if not rename the file).
- The display() functions now displays the gallery instead of the constructor.
- Improved the make_thumb() function (makes the thumbnails).
- Fixed various bugs and cleaned up code.
Version 0.1.1 – June 4th, 2008:
- Use of gmdate() instead of date() in $this->format_time().
- mkdir() now makes thumbs folder with chmod 0777 instead of 0700 in $this->make_thumb().
- Fixed sorting bug in $this->view_categories(). Bug appeared when only one empty folder in the gallery folder.
- $this->g_category is now false instead of empty when $_GET[‘c’] is ot set.
- Removed unset()‘s right before the return from $this->view_categories() and $this->view_images().
- Made self::safe_url(), self::base64_url_encode(), self::base64_url_decode() and self::get_ext() static.