zoolJoomLibs.mediaImageChooser — comfortable image choosing in Joomla! 1.5


This is an extension for developers that allows users of your application to choose images in HTML Forms with Joomla's Media Manager.


  • Basic support for com_media's "folder" parameter (thanks to Cristiano Cucco's idea).
  • Now it is possible to use mediaImageChooser without a previewer widget.
  • Now previewer hasn't got default width and height. So your pictures will be shown at full size now by default. But you still can pass width and height parameters as attributes to mediaImageChooser::imagePreview() method.
  • Few bugfixes (#19665, #19684) and enhancements.
  • Initial release.



  • install zoolJoomLibs.Base plugin and publish it
  • install zoolJoomLibs.mediaImageChooser plugin (publishing is not necessary)


At first import zoolJoomLibs.Base plugin:

 if (!JPluginHelper::importPlugin('zoolJoomLibs', 'base')) {
     JError::raiseError(2001, 'Please, install and publish zoolJoomLibs.Base first.');

Import mediaImageChooser class:

 if(!zjl_import('mediaImageChooser')) {
     JError::raiseError(2001, 'Please, install zoolJoomLibs.mediaImageChooser first.');

Then add behavior for mediaImageChooser on your page:


or, with custom blank image:

JHTML::_('mediaImageChooser.behavior.all', '/path/to/blank/image.png');

Also don't forget to add "modal" behavior:


After that you are ready to use this class:

 // ...
 // Start of a form goes above
 // ...
 $image_chooser = new mediaImageChooser('form_var_name', 'path/to/current/image.png');
 // Show the inputbox
 echo $image_chooser->inputBox();
 // Show the "browse button"
 echo $image_chooser->button();
 // Show the image preview box
 echo $image_chooser->imagePreview();
 // Output javascript that prepares all elements for work
 echo $image_chooser->start();
 // ...
 // The rest of a form goes below
 // ...


You can browse autogenerated documentation here.


Please, discuss mediaImageChooser in the Forum and report bugs in the Bug Tracker.

Post your comment


No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments

Интернет реклама