[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/js/htmlarea/plugins/UploadImage/ -> README (source)

   1  UploadImage for HtmlArea in eGroupWare
   2  -----------------------------------------------------------
   3  Original Author:          Xiang Wei ZHUO <wei@zhuo.org>
   4  Author for eGW:           Pim Snel <pim@lingewoud.nl>
   5  Last Updated:             Mon Sep 20 19:55:03 CEST 2004
   6  Requirements:             eGroupWare 1.x, htmlArea 3rc or higher
   7  Note:                     UploadImage only works as plugin for htmlArea in eGroupWare.
   8  -----------------------------------------------------------
   9  
  10  UploadImage adds an image_upload-icon in the htmlArea-toolbar. When the icon is clicked 
  11  the user can Select an image from the Upload Directory or upload an Image to the directory 
  12  the upload directory eGW-developer has specified. After insertion the image is shown in the 
  13  htmlarea. Future features will be: resizing images, cropping images, rotating images etc ....
  14  
  15  To use the plugin you have to do the following:
  16  
  17  // thirst setup the sessionvariables UploadImage Need
  18  $sessdata = array(
  19          'UploadImageBaseDir' =>  /path/to/eg/egw/images ,      // absolute path to the base directory
  20          'UploadImageBaseURL' =>   http://yourhost/egw/images,  // the complete URL to the base images directory
  21          'UploadImageMaxWidth' =>  500,                         // max, image width in pixels
  22          'UploadImageMaxHeight' => 500                          // max. image height in pixels 
  23          );
  24  
  25  $GLOBALS['phpgw']->session->appsession('UploadImage','phpgwapi',$sessdata);
  26  
  27  
  28  // then init the html class and call the htmlarea class-method with the UploadPlugin as argument
  29  if (!is_object($GLOBALS['phpgw']->html))
  30  {
  31      $GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
  32  }
  33  
  34  $htmlarea = $GLOBALS['phpgw']->html->htmlarea($field_name, $value,$style,false,'UploadImage',$custom_toolbar);
  35  
  36  -----------------------------------------------------------
  37  SECURITY WARNING!!!
  38  -----------------------------------------------------------
  39  When you are implementing the UploadImage plugin make sure 
  40  your UploadImageBaseDir is set correctly because else it 
  41  might give access to other directories apache has access to.
  42  
  43  
  44  -----------------------------------------------------------
  45  Known issues:
  46  - Create directory doesn't work
  47  - In some cases the OK and cancel buttons won't work anymore (javascript issue)
  48  


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7