gallue

PHPGallue main features

The client-side tools gallupload and PyGallue are developed for uploading large numbers of images at once. The simple perl script gallupload runs from the command line, whereas the graphical uploader PyGallue is written in Python and will be developed towards a management utility for PHPGallue.

PHPGallue is split up into four parts: libbase, libgallue, gallue and setup

libbase

Libbase is a library providing classes on which the image management system is founded, but which may also be used in other projects. They are centered around some classes to map database rows to objects and this way to read and write database fields almost like native PHP properties. Libbase is published under the LGPL.

libgallue

Libgallue is the core of the image management system. It extends the object mapper classes of libbase and implements actions like "create a new image from file" or "put image xy into category foo". This way it encapsules the underlying database almost completely and provides a clean API.
It is very easy to create applications which make use of libgallue, for example a little image gallery for your homepage. Juliane Clausen's homepage uses libgallue as backend for the "Fotochronik" and "Galerie" sections. The code for the "Fotochronik" is only 162 lines long; the "Galerie" source code counts just 85 lines. Juliane uses the web interface gallue to manage these images. Therefore she doesn't worry about file uploads, about resizing and other annoying and error-prone stuff. But if she wanted, libgallue would provide an API for this, too. In fact, the web interface gallue is just the most sophisticated frontend for libgallue at the moment – you can create your own interface if you like.

You can integrate the image management system seamlessly into your own homepage. You can create your own navigation, write HTML code the way you like, use CSS layout or table layout, create an AJAX page or whatever you like, as long as you use PHP 5. You can write applications that don't run on a web server, too. I intend to write a few tutorials and demo pages to clarify the concepts of the library. At the moment the inline documentation of libgallue is almost complete. Libgallue is published under the LGPL.

gallue

Gallue is the web based user interface. It is implemented on top of libgallue and uses the DOM classes in PHP 5 to generate HTML or XHTML markup. The HTML structure is kept very simple, all formatting is done with CSS. The page validates as XHTML 1.1 and as HTML 4.01 strict. The content type actually delivered to the browser is determined by evaluating the "Accept: " HTTP header.

Gallue can export parts of the database as package that contains all meta information and can be imported by other instances of PHPGallue. Packages include static HTML pages so that you can view the contents of a package with any browser.

Some functionality provided by libgallue isn't implemented yet in gallue, like user comments or voting – nevertheless it is perfectly usable as image management tool. The web interface is published under the GPL. Have a look at the live demo!

Gallue comes with a script that generates Google sitemaps. Together with the "robots", the "keywords" and the "description" meta tags this helps Google and other search engines to index the web interface.

Gallue works with most current browsers:
OperaOS X 10.3.9: 8.0, 8.5Fully supported :-)
SafariOS X 10.3.9: 1.3.1, 1.3.2Fully supported :-)
KonquerorDebian unstable (AMD 64): KDE 3.5.0Fully supported :-)
Internet Explorer 6XP Prof. SP 2Partially supported :-| (no transparent PNGs, some minor CSS flaws)
Internet Explorer 7 Beta 2XP Prof. SP 2Partially supported :-| (some minor CSS flaws)
Mozilla Firefox1.5.0.4 and earlier versionsPartially supported :-| (Problems with text direction rtl and multimedia objects)

Dillo, w3m, links and lynx can't display the gallue web frontend correctly because they don't support CSS. I guess that using an image gallery with a text-based browser doesn't make much sense anyway... I guess that the page needs some improvements regarding accessibility. Feel free to participate with your ideas and your code :-)!

setup

This part mainly consists of the setup and update wizard setup.php and the setup manual INSTALL which make installing PHPGallue much easier. setup.php intelligently guesses configuration options and guides the user step-by-step through the setup process. In most cases updates will work with a minimum of user interaction – setup.php will update the configuration files and table structures independently as needed.