zoolJoomLibs.mediaImageChooser — comfortable image choosing in Joomla! 1.5

Description

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

Changelog

0.02:
  • 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.
0.01:
  • Initial release.

Downloads

Installation

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

Usage

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
 // ...

Documentation

You can browse autogenerated documentation here.

Support

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

Post your comment

Comments

No one has commented on this page yet.

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


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