Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1024 closed enhancement (fixed)

Add an input field image url picker function to ImageManager

Reported by: gogo Owned by: gogo
Priority: normal Milestone:
Component: Plugin_ImageManager Version: trunk
Severity: normal Keywords:

Description (last modified by gogo)

(Tracking ticket, commit to follow)

It would be useful for developers to "hijack" the ImageManager? plugin and use it as a generic image-picker dialog for input fields.

The commit which will follow will do this by adding a "Browse" button after the (usually text) field, and returning the URL of the image selected to the value of the field.

Example Usage

 <script type="text/javascript">_editor_url = '/url/to/xinha';</script>
 <script type="text/javascript" src="/url/to/xinha/plugins/ImageManager/image-picker.js" />
 <script type="text/javascript">
 <?php require_once('/path/to/xinha/contrib/php-xinha.php'); ?>
    $Conf = array
       'images_dir' => '/path/to/images', 
       'images_url' => '/url/to/images', 
       'show_full_options' => false, // Full options are not useful as a URL picker
       // See ImageManager for more configuration options !           

 window.onload = function() { new ImagePicker(document.getElementById('idOfTheInputField')); }

Change History (2)

comment:1 Changed 14 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 14 years ago by gogo

  • Description modified (diff)
Note: See TracTickets for help on using tickets.