Changes in this Version
=======================
Feb. 20 - Fixed bug causing a bad URL to be generated under PHP 4.2 or later

Feb. 19 - Added UPLOAD_LIMIT configuration variable to enforce size limitations
          on uploads

Enhanced PHP Image Manager for htmlArea
=======================================

These scripts extend the "Insert Image" feature of Interactive Tools' htmlArea
to include a full-blown Image Manager allowing for:

        - Preview of existing images
        - Selection of existing images (rather than typing a URL!)
        - Uploading of new images (OPTIONAL)
        - Creating of new folders (OPTIONAL; below the "Image Root" ONLY!)
        - Deleting of images (OPTIONAL)
        - Deleting of EMTPY folders (OPTIONAL; below the "Image Root" ONLY!)
        - Support for GIF, JPEG and PNG image files
        - Dynamic adjustment to varying DPI settings in the user's browser

These scripts use the concept of an "Image Root" directory which it will manage.
You should NOT use a directory containing anything other than images as the
"root" because this COULD compromise your webserver's security.

These scripts require PHP 4.0.6 (or later) to be installed on your webserver
and have been developed and tested under htmlArea 2.03 fairly extensively. They
SHOULD work with htmlArea 2.x AS LONG AS the interface between the htmlArea
script and the "Insert Image" dialog is the same as 2.03.

The entire modification consists of 1 "replacement" file and 11 new files:

        - insert_image.html     (total replacement HTML)

        - config.inc.php        (Image Manager configuration)
        - lister.php            (Tree display and action script)
        - viewer.php            (Image preview script)
        - dpi.gif               (DPI detection image)
        - gif.gif               (GIF icon)
        - jpg.gif               (JPG icon)
        - png.gif               (PNG icon)
        - closed.gif            ("Closed" folder icon)
        - opened.gif            ("Open" folder icon)
        - indent.gif            (Tree indent icon)
        - readme.txt            (This file)

-------------------------------------------------------------------------------

To install this modification, perform the following steps:

        1. Make a backup copy of the original 'popups/insert_image.html'

        2. Unzip all of these files into the 'popups' directory

        3. Edit 'popups/config.inc.php' and specify:

           a. 'IMAGE_DIR' as the path from the filesystem root on your server
              to the directory which will be "managed" by these scripts

           b. 'IMAGE_URL' as the path from the document root on your webserver
              to the directory named in 'IMAGE_DIR' in step 3a. Do NOT include
              the hostname (http://my.host.com) portion in the URL; just the
              from the document root.

           c. 'SCRIPT_DIR' as the path from the filesystem root on your server
              to the directory which contains these scripts

           d. 'SCRIPT_URL' as the path from the document root on your webserver
              to the directory named in 'SCRIPT_DIR' in step 3c. Do NOT include
              the hostname (http://my.host.com) portion in the URL; just the
              from the document root.

           e. 'SUPPORT_CREATE' as either 'TRUE' or 'FALSE' (w/o quotes!) to
              indicate if you wish to allow creation of directories below the
              directory named in 'IMAGE_DIR' in step 3a

           f. 'SUPPORT_DELETE' as either 'TRUE' or 'FALSE' (w/o quotes!) to
              indicate if you wish to allow deletion of images and/or EMPTY
              directories below the directory named in 'IMAGE_DIR' in step 3a

           g. 'SUPPORT_UPLOAD' as either 'TRUE' or 'FALSE' (w/o quotes!) to
              indicate if you wish to allow uploading of images to directories
              below the directory named in 'IMAGE_DIR' in step 3a

           h. 'UPLOAD_LIMIT' as a size limit (in bytes) for uploaded images. If
              you do not wish to enforce a limit, specify '0' (w/o quotes!).

        4. If you disabled EITHER the 'CREATE' and/or 'UPLOAD' features, you
           will need to edit 'popups/insert_image.html' and match the HTML to
           your configuration choices.

           a. Choose the matching 'HTML' tag at the top of the file

           b. Remove the trailing '>' from the commented line(s) to match those
              features which you have disabled

        5. That's it!

-------------------------------------------------------------------------------

To uninstall this modification, perform the following steps:

        1. Restore your backup copy of 'popups/insert_image.html'

        2. That's it!

-------------------------------------------------------------------------------

If you run into any major issues with these scripts, please let me know at:

        dave@dsear.org
