Pictag 0.3.1 Copyright 2009 Janos Szatmary E-mail: jszatmary@users.sourceforge.net Web: http://pictag.sourceforge.net WHAT'S NEW 0.3.1 2009/12/13 Added directory image caching for faster load times after intial scan Fixed a bug that would cause thumbnail errors in root directory images 0.3.0 2009/12/01 Added configuration options to include HTML content in head and body Added debugging facility to trace permission issues and other problems Directories and images that are not readable are ignored Empty directories or those without images are ignored Restored the link to the last tag in a hierarchy Changed default style 0.2.0 2009/11/22 Added a URL shortening scheme to replace long query strings 0.1.2 2009/10/02 Fixed a bug that would cause certain paths to fail validation The current location query is now appended to the login/logout URLs Consolidated the hashing of query strings to one function 0.1.1 2009/03/06 Added configuration option for a login and logout URL for HTTP auth. Changed the current location in navigation to be plain text Fixed a small HTML validation problem 0.1.0 2009/02/24 Changed from GD via PHP to ImageMagick via CLI for image handling Changed configuration, which is incompatible with previous versions Added manual image transformation options for image views Added persistence to manual transforms when performed by authorized users Meta-data edit functions are hidden from unauthorized users Cached images are regenerated if the originals are newer Added a configuration option to expire cached images Tags in image views are sorted alphabetically Duplicate tags for a given image are ignored 0.0.1 2009/02/20 First public release ABOUT Pictag is a simple web photo gallery with automatic thumbnail generation and tagging capability. It's self-contained in a single file, uses the file system for gallery layout, and requires no stand-alone database (it uses SQLite) or no database at all. REQUIREMENTS Pictag needs a web server that can execute PHP scripts. It also needs access to the ImageMagick command line tools, and the SQLite database engine via PDO if tagging and persistence is desired. These prerequisites should already be available in most standard installations. If SQLite is not available, or fails, no meta-data capabilities (tagging etc.) will be available, but all other features will function normally. INSTALLATION Copy the script into the web server directory. CONFIGURATION The script contains some configuration options. These can be modified by editing "pictag.php". The options are fairly self-explanatory. The two most important ones are "DIR_ROOT" and "DIR_META". "DIR_ROOT" needs to be set to the directory where the images reside, and "DIR_META" needs to be a writeable directory where the image thumbnails and meta data can be stored. The paths to the ImageMagick command line tools "convert" and "identify" need to be set in "IMAGEMAGICK_CONVERT" and "IMAGEMAGICK_IDENTIFY" in order for Pictag to be able to generate thumbnails and provide other transformation functions. "CGI_HASH_KEY" should also be changed to some secure value. User authentication and authorization is performed through HTTP authentication via the web server, and a configuration directive. To configure authentication correctly both HTTP and HTTPS access should be available to the site. The HTTP side should have no web server authentication enabled. The HTTPS side should require whatever web server authentication is available, and should be configured with whatever users are desired. The user names with the chosen roles should then be added to the "USER_DESC", "USER_TAGS" and "USER_TRAN" configuration as comma separated values. In the described setup, users visiting the HTTP side of the site will not be prompted for credentials, and they'll be able to view the gallery, but will not be able to modify descriptions, tags, transforms etc. HTTPS visitors, however, will be prompted by the web server for appropriate credentials, which will be passed to Pictag. Pictag will then allow the configured users to edit meta data. This configuration layout can be used to administer Pictag in a pre-existing authenticated environment by simply adding the users with the desired roles to the appropriate Pictag configuration section. Although HTTPS is not required for an authenticated setup, without it user and password information may be sent in clear text. TODO Configuration functionality (define only meta directory in code) Admin functionality for authorized users; rename tags, dump/restore DB Optionally write description/tags to image meta data section (EXIF) If writing to EXIF, we'll need merge/update/sync between file and DB LICENSE The Clarified Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Distribution fee" is a fee you charge for providing a copy of this Package to another party. "Freely Available" means that no fee is charged for the right to use the item, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major network archive site allowing unrestricted access to them, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a distribution fee for any distribution of this Package. If you offer support for this Package, you may charge any fee you choose for that support. You may not charge a license fee for the right to use this Package itself. You may distribute this Package in aggregate with other (possibly commercial and possibly nonfree) programs as part of a larger (possibly commercial and possibly nonfree) software distribution, and charge license fees for other parts of that software distribution, provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.