egroupware/phpgwapi/js/htmlarea/plugins/UploadImage
Pim Snel 2a5bd05ad0 UploadImage now works in IE too,
Code cleanup
IE resizing bug fixed
2004-09-28 21:06:25 +00:00
..
img - made UploadImage finally working 2004-09-20 20:40:50 +00:00
lang integrated the HTMLarea plugins into the eGW translation system 2004-08-29 01:26:17 +00:00
popups UploadImage now works in IE too, 2004-09-28 21:06:25 +00:00
CHANGELOG - made UploadImage finally working 2004-09-20 20:40:50 +00:00
README - made UploadImage finally working 2004-09-20 20:40:50 +00:00
upload-image.js UploadImage now works in IE too, 2004-09-28 21:06:25 +00:00

UploadImage for HtmlArea in eGroupWare
-----------------------------------------------------------
Original Author:          Xiang Wei ZHUO <wei@zhuo.org>
Author for eGW:           Pim Snel <pim@lingewoud.nl>
Last Updated:             Mon Sep 20 19:55:03 CEST 2004
Requirements:             eGroupWare 1.x, htmlArea 3rc or higher
Note:                     UploadImage only works as plugin for htmlArea in eGroupWare.
-----------------------------------------------------------

UploadImage adds an image_upload-icon in the htmlArea-toolbar. When the icon is clicked 
the user can Select an image from the Upload Directory or upload an Image to the directory 
the upload directory eGW-developer has specified. After insertion the image is shown in the 
htmlarea. Future features will be: resizing images, cropping images, rotating images etc ....

To use the plugin you have to do the following:

// thirst setup the sessionvariables UploadImage Need
$sessdata = array(
		'UploadImageBaseDir' =>  /path/to/eg/egw/images ,      // absolute path to the base directory
		'UploadImageBaseURL' =>   http://yourhost/egw/images,  // the complete URL to the base images directory
		'UploadImageMaxWidth' =>  500,                         // max, image width in pixels
		'UploadImageMaxHeight' => 500                          // max. image height in pixels 
		);

$GLOBALS['phpgw']->session->appsession('UploadImage','phpgwapi',$sessdata);


// then init the html class and call the htmlarea class-method with the UploadPlugin as argument
if (!is_object($GLOBALS['phpgw']->html))
{
	$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
}

$htmlarea = $GLOBALS['phpgw']->html->htmlarea($field_name, $value,$style,false,'UploadImage',$custom_toolbar);

-----------------------------------------------------------
SECURITY WARNING!!!
-----------------------------------------------------------
When you are implementing the UploadImage plugin make sure 
your UploadImageBaseDir is set correctly because else it 
might give access to other directories apache has access to.


-----------------------------------------------------------
Known issues:
- Create directory doesn't work
- In some cases the OK and cancel buttons won't work anymore (javascript issue)