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
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
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
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