Extending Omni Gallery

Onmi Gallery  is designed for easy extension, from within the Omni Gallery package, through third party packages, through application classes and through Omni Gallery Elements. Omni Gallery uses the same plugin system as many of my other packages.

Some ideas for further plugin image selectors:

  • Alternative file manager file storage locations, such as Amazon S3
  • External sources of files such as Facebook and Instagram

The advantage of using Omni Gallery as a basis for integrating new image selectors is that you only need to implement the image selector plugin and in many cases the elements common to existing image selectors can be re-used to further simplify the process. Once you can select the images, any of Omni Gallery's display widgets can be used to present them.

New display widgets are generally even easier to implement. Most JavaScript gallery and carousel scrpits have similar markup and configuration parameters, so development is usually a simple matter of copying and editing an existing diplay widget plugin to configure the required assets and map fairly standard edit dialog options onto the JSON used to configure the third party JavaScript.

For many specilased slider and lightbox requirements, you don't need to code a complet widget. You can use many existing Display Widgets and Lightbox Overlays to display your own custom elements using Omni Gallery Elements.

You can also use the design patterns Omni Gallery uses to integrate with templates for the core Image Slider and core Page List to directly integrate with existing gallery or slider block views. If you decide to do such, make sure you have the correct license for the existing block you 'borrow' the view template from.

If you have a requirement for image selection or display widgets not already covered by Omni Gallery, let me know and I can provide you with implementation assistance. If there are enough requests, I may even build it into the main Omni Gallery addon.

Developers of themes and other gallery and slider addons are welcome to provide Omni Gallery integration. Contact me if you would like to discuss integration opportunities.

JavaScript Events

Many of the third party gallery JavaScript libraries integrated to Omni Gallery Display Widgets and Lightboxes have their own JavaScript events.  Please refer to the respective third party documentation.

Omni Gallery provides the additional events as below

Lightbox

When the Lighbox is disabled because the window or device is narrower than the responsive threshold for showing a lightbox

omni_not_lightbox - fired on each gallery link to the lightbox during initialisation.

omni_not_lightbox_click - fired when an element that would have opened a lightbox is clicked.

These events can be used to code alternate behaviour when a device is below the responsive lightbox limit. For example, to implement an expander.

JSON Data

From v9.0.5, Omni Gallery image sources have an option to select additional image information to attach to images. In supporting display widgets and overlays this data is then JSON encoded and incorporated as an html data attribute data-additional-info for each item.

Display widgets and lightbox overlays which do not support the data-additional-info attribute are:

  • Core Image Slider
  • Core Page List
  • Vegas Background

All other display widgets and lightbox overlays support rendering the data-additional-info attribute and will embed JSON encoded information as configured by Additional Information by an Image Source.