Elgg  Version 1.11
lightbox.php File Reference

Go to the source code of this file.


 $js_path = elgg_get_config('path')
 Elgg lightbox. More...

Variable Documentation

$js_path = elgg_get_config('path')

Elgg lightbox.


Call elgg_load_js('lightbox') and elgg_load_css('lightbox'). Then apply the class elgg-lightbox to links.

Advanced Usage

Elgg is distributed with the Colorbox jQuery library. Please go to http://www.jacklmoore.com/colorbox for more information on the options of this lightbox.

You can change global options by overriding the js/lightbox/settings view.

You may apply colorbox options to an individual .elgg-lightbox element by setting the attribute data-colorbox-opts to a JSON settings object. You can also set options in the elgg.ui.lightbox.bind() method, but data attributes will take precedence.

To support a hidden div as the source, add "inline: true" as a data-colorbox-opts option. For example, using the output/url view, add: 'data-colorbox-opts' => '{"inline": true}',

Overriding with a different lightbox

In a plugin, override this view and override the registration for the lightbox JavaScript and CSS (

See also

Definition at line 115 of file lightbox.php.