hypejunction / elgg_lightbox
Enhanced lightbox for Elgg
Package info
github.com/hypeJunction/elgg_lightbox
Language:JavaScript
Type:elgg-plugin
pkg:composer/hypejunction/elgg_lightbox
6.0.0
2026-05-13 09:35 UTC
Requires
- php: >=8.1
- composer/installers: ^2.0
- elgg/elgg: ^6.0
This package is auto-updated.
Last update: 2026-05-13 09:38:07 UTC
README
Lightbox component for Elgg
Features
- Converts lightbox to AMD module
- Custom imageless theme
Usage
As an AMD module:
define(function(require) { var lightbox = require('elgg/lightbox'); var spinner = require('elgg/spinner'); lightbox.open({ html: '<p>You are welcome</p>', onClosed: function() { lightbox.open({ onLoad: spinner.start, onComplete: spinner.stop, photo: true, href: 'https://www.petfinder.com/wp-content/uploads/2012/11/122163343-conditioning-dog-loud-noises-632x475.jpg', }); } }); });
You can also add .elgg-lightbox or .elgg-lightbox-photo class to your HTML elements (with a href or src) attribute.
Additional parameters can be passed with data-colorbox-opts as a json_encoded object.
Note that for the rel options to take effect, you will need to call a colorbox on a selector, e.g.
require(['elgg/lightbox'], function() { $('.elgg-lightbox-photo').colorbox({photo: true}); });
Notes
- This drop
elgg.ui.lightboxnamespace. Use AMD module instead.
Compatibility
| Plugin version | Elgg version |
|---|---|
| 7.0.0 | 7.x |
| 6.0.0 | 6.x |
| 5.0.0 | 5.x |
| 4.0.0 | 4.x |
| 3.0.0 | 3.x |