Qdig:enhanced 04 - Quick Digital Image Gallery : Enhanced 04 README Copyright (C) 2006 Pedro Venda pjvenda at pjvenda org 0. GENERAL LICENSE INFORMATION --------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --------------------------------- see LICENCE file for more details get the license from the web here: http://www.gnu.org/licenses/gpl.html or http://www.gnu.org/licenses/gpl.txt or http://www.gnu.org/licenses/gpl.texi or http://www.gnu.org/licenses/gpl.tex --------------------------------- A full copy of this program along with this file can be downloaded from my website http://www.pjvenda.org 1. GENERAL INFORMATION ------------------- This file (README) contains all the information about Qdig:enhanced 04. Qdig:enhanced 04 is a patchset for Qdig-devel version 20060624. Qdig is an open source image gallery software for the web. This patchset implements a pack of features that I felt necessary for my purposes. 2. INCLUDED FILES -------------- LICENSE - the GNU Public License Agreement v2 README - this file qdig-devel-20060624.tar.gz - qdig devel version 20060624 qdig-enhanced-04.diffstat - patchset statistics of qdig:enhanced 04 qdig-enhanced-04.patch.gz - patchset of qdig:enhanced 04 qdig-enhanced-04.tar.gz - full source code for qdig:enhanced 04 3. FEATURE LIST ------------ * Link style alternative - from qdig.php?Qwd=./folder&Qif=test.jpg&... to /folder/test.jpg/... * metadata Captions (EXIF or IPTC) - if metadata['caption']['ena'] is true AND exif['ena'] or iptc['ena'], captions are displayed from the picture's metadata (IPTC caption takes precedence over EXIF if both are available. this behaviour will be configurable)) 4. INSTALLATION ------------ This patchset is distributed in its native form (a patch file) and in a full source form, since the base code is a development version of qdig it may not be allways available. * Native form: # unpack qdig-devel-20060624.tar.gz: (I've included a copy of qdig devel 20060624, but you may also be able to get it from sourceforge.net) $ tar zxf qdig-devel-20060624.tar.gz # change directory name $ cp -av qdig-devel qdig-enhanced-04 $ cd qdig-enhanced-04 # check if patchset applies cleanly: $ gunzip -c ../qdig-enhanced-04.patch.gz | patch -p1 --dry-run # apply patchset $ gunzip -c ../qdig-enhanced-04.patch.gz | patch -p1 # use software normally. see the qdig manual first and then take a look at the extra configuration options for qdig-enhanced-04 * Full source form: - unpack qdig-enhanced-04.tar.gz: tar zxf qdig-enhanced-04.tar.gz - use software normally. see the qdig manual first and then take a look at the extra configuration options for qdig-enhanced-04 5. EXTRA CONFIGURATION ------------------- Qdig:enhanced 04 has a couple of extra configuration options: Config option - File - Purpose $iptc['ena'] - index.php - Enable IPTC tag decoding; $metadata['caption']['ena'] - index.php - Enable caption extraction from metadata information (EXIF/IPTC); $qdig_base_url - index.php - Base path for directory style links; $dir_style_links - index.php - Enable directory style links; $iptc['disp']['ena'] - qdig-metadata.php - Enable IPTC data display; $metadata['caption']['precedence'] - qdig-metadata.php - Define metadata source precedence (in case there is a caption in EXIF and IPTC data, this setting defines which is used); 6. APACHE 2 mod_rewrite MAGIC -------------------------- Directory Style Links - one of the features of this patch - is used to change the linking style of the images in the gallery. What was onced linked as: /someplace/qdig.php?Qwd=./Album&Qif=picture.jpg&other_parms is now linked as: /photos/Album/picture.jpg/other_parms Well... of course this doesn't work by itself. There is one more requirement - mod_rewrite or something equivalent. mod_rewrite is not something to be taken lightly... so be sure to learn how to configure it before using this or have someone take a look at these lines and change them for your setup. THE ORDER OF THE RULES RELEVANT! # Qdig library rewrite: # - rewrite photos/ to someplace/ (may be ~user/) # - rewrite qdig.php requests to directory style # - qdig config should be as follows: # - $url_base_path="/someplace/" # - $qdig_url="/photos/qdig.php" # - $qdig_base_url="/photos/" RewriteEngine on RewriteRule ^photos/([a-zA-Z0-9]*\.php)?$ someplace/$1 [L] # optional rewrites: experimental fullscreen shortcut # RewriteRule ^photos/([a-zA-Z0-9_-]*)/([a-zA-Z0-9\._-]*)/full/(.*)$ someplace/qdig.php?Qwd=./$1&Qif=$2&Qtmp=FS&$3 [L] # RewriteRule ^photos/([a-zA-Z0-9_-]*)/([a-zA-Z0-9\._-]*)/full$ someplace/qdig.php?Qwd=./$1&Qif=$2&Qtmp=FS [L] RewriteRule ^photos/([a-zA-Z0-9_-]*)/([a-zA-Z0-9\._-]*)/(.+)$ someplace/qdig.php?Qwd=./$1&Qif=$2&$3 [L] RewriteRule ^photos/([a-zA-Z0-9_-]*)/([a-zA-Z0-9\._-]+)/?$ someplace/qdig.php?Qwd=./$1&Qif=$2 [L] RewriteRule ^photos/([a-zA-Z0-9_-]*)/?$ someplace/qdig.php?Qwd=./$1 [L] 7. TODO ---- * CAPTURE IPTC EXIF DATA - sort metadataCaptionStr with priorities and stuff - look for exif usage, evaluate iptc usage - don't act on ['ena'] on -metadata.php - do iptcBlock() - do iptcDump() - do metadataBlock() - do metadataDump() - take a look at Qtmp GET variable to display 'metadata' instead of 'exif' tables * SEPARATE CSS DATA FROM SCRIPT - add variable to include CSS file instead of using inline style data * INCLUDE $pre_data AND $post_data FROM FILES - use file_get_contents()