Soft » 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.
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:
JHTML::_('mediaImageChooser.behavior.all');
or, with custom blank image:
JHTML::_('mediaImageChooser.behavior.all', '/path/to/blank/image.png');
Also don't forget to add "modal" behavior:
JHTML::_('behavior.modal');
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.
No one has commented on this page yet.