With images API you can generate the image and the image gallery for an item and also the upload forms for both of them.

image

Left: Default image with the "edit" button. Right: Image with "edit" button.

image gallery

Up: Default image gallery with no images and the "add images" button. Down: Default image gallery with images and the "add images" button. 


API example

Item image
jimport('oniscore.image'); //import images libraries

$imageHTML  = onisImage::imageHTML($petition, 'petition', CCOMPONENT);

Generate the HTML code:

onisImage::imageHTML($itemData, $item, $component);
  • $itemData - item data;
  • $item - unique item name;
  • $component - component name;

You can change HTML code here:

components/component_name/templates/default/images.item.php

Item image gallery
jimport('oniscore.image'); //import images libraries

$galleryHTML  = onisImage::galleryHTML($petition, 'petition', CCOMPONENT);

Generate the HTML code:

onisImage::galleryHTML($itemData, $item, $component);
  • $itemData - item data;
  • $item - unique item name;
  • $component - component name;

You can change HTML code here:

components/component_name/templates/default/images.gallery.php


Preferences

image preferences

From the component preferences you can change a few options about the image and image gallery:

  • image folder - folder where item image will be uploaded;
  • max image size - maximum file size of the image an user can upload for the item, not bigger than the upload_max_filesize defined in your php.ini;
  • gallery images folder - folder where gallery images will be uploaded;
  • gallery image size - maximum file size of each image an user can upload in the gallery, not bigger than the upload_max_filesize defined in your php.ini;
  • gallery images limit - maximum number of images an user can upload, 0 for unlimited;

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries.
Onis is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Onis does not sell it's products on 3rd party sites. Any website offering Onis products for sale are not licensed versions and should be considered a scam. Never download our products from file sharing websites like rapidshare, torrents or warez forums. We have received reports of malicious versions of our software containing viruses, extra code, and even once installed, delete your database, steal sensitive information such as passwords, and credit card information. There is only one place to get the full and safe licensed versions of our software and you're looking at it! Enjoy.