Facebox

Component ID

1347884

Component name

Facebox

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module adds the Facebox modal lightbox into Drupal. For now, it calls the library (once downloaded and extracted separately), executes it on every page load for rel="facebox" elements, and automatically plugs in the close and load images parameters to where they live on the file system.

2 examples of how the rel attribute can be added through Drupal functions (otherwise, just use HTML):
1. Within an anchored image: <?php print l('<img src="x.jpg"/>', 'path-here', array('html' => TRUE, 'attributes' => array('rel' => 'facebox'))); ?>
2. Within a text link: <?php print l('Link', 'path-here', array('attributes' => array('rel' => 'facebox'))); ?>

This module was sponsored by a client of RayvanBros. A link to the client website where it is working will be added once launched.

Future Enhancements:

  • Add admin UI to:
    • Load only in certain conditions (e.g. Content Types)
    • Alter parameters on page load