egroupware/phpgwapi/js/htmlarea/plugins/UploadImage
viniciuscb 0a28f3812e Some changes:
- Inclusion of the following javascript directories:
  * Connector: javascript object to interface xmlhttprequest object. This object allows
      asynchronous posts and support for messages while this post is being done, such as
      "wait, contacting server", etc.
  * JsAPI: general javascript functions and methods
  * jsolait: performs conversion from a xmlrpc message to a javascript object
  * xmlRpcMsgCreator: performs conversion from a javascript object to a xmlrpc message
  * dynapi: cross-browser class to draw layers

- Update in setup version: now is 1.0.1.008; Update your versions. There was made a
  change in phpgw_vfs2_files table in handling of modified files.

- Upgrade of vfs2 classes and PclZip class

- Changes in javascript object and common object to allow the javascript backend to
  applications to work (now just filescenter will use it...)
2005-06-18 20:43:14 +00:00
..
img - made UploadImage finally working 2004-09-20 20:40:50 +00:00
lang Some changes: 2005-06-18 20:43:14 +00:00
popups Some changes: 2005-06-18 20:43:14 +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 sevral fixes for IE and Mozilla 2004-10-08 10:15:51 +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)