Module Description
The Drupal Slimbox2 module is a wrapper that integrates the lightweight Slimbox2 jQuery plugin with a Drupal site seamlessly and automatically. Once installed and activated, you can add lightbox effects to hyperlinks by adding a rel="lightbox" or rel="lightbox-series" attribute to your link.

NOTE FOR DRUPAL 8 | 9 | 10 users with the latest version of Slimbox2: The latest code recommends using Composer to manage the Slimbox 2.05 library which is slightly different than the earlier version in that it uses an autoload script. If you are upgrading from the 8.x version to the 2.x version make sure that you use composer to manage the Slimbox library according to the README.md file.

Why another lightbox plugin? Good question. With the availability of Colorbox, Lightbox2 and Fancybox, why would there be interest in another image lightbox utility?

The answer is simplicity... I wanted a simple plugin that I could install and just start using. I don't need multiple styles of lightboxes, I just want a module with a tiny code footprint that will let me easily create links to images with a lightbox effect. As a bonus, the Slimbox2 jQuery plugin is also a very small piece of code when compared with the other plugins. It's about 4k which is less than half the size of the others, so it's a win-win.

About the Slimbox2 jQuery plugin (from the Slimbox2 web page) Slimbox2 is a 4 KB visual clone of the popular Lightbox2 script by Lokesh Dhakar, written using the jQuery javascript library. It was designed to be very small, efficient, standards-friendly, fully customizable, more convenient and 100% compatible with the original Lightbox2.

More information about the Slimbox2 plugin can be found here: http://www.digitalia.be/software/slimbox2

Dependencies:


* Libraries API
* Slimbox2 Jquery plugin.

Note: The D8 branch (under development) does not require the Libraries API module.

Installation Drush (Recommended):


* Install the Libraries API module: drush en libraries -y
* Install this Slimbox2 module: drush en slimbox2 -y
* Upload the Slimbox2 plugin to /site/all/libraries: drush slimbox2-plugin

Installation Manually:


* Get the Slimbox 2 plugin from https://github.com/cbeyls/slimbox/releases/tag/2.05
* unpack the Slimbox 2 plugin and rename to slimbox2
* Upload the slimbox2 plugin to your Drupal site's libraries folder. Usually found at: /sites/all/libraries/ Full path with slimbox2: /sites/all/libraries/slimbox2
* Install the Libraries API module https://drupal.org/project/libraries
* Install this Slimbox2 module https://drupal.org/project/slimbox2
* Activate Libraries and Slimbox2

D8 Use the stable Drupal 8 branch.

As mentioned above you'll need to add the Slimbox2 jQuery library. You can get it HERE. Rename it to slimbox2 and place it in the root Libraries folder. The resulting path will look like this: /libraries/slimbox2

Read the README.txt file for more details.

Usage Create a hyperlink to the image that you want to see in a lightbox and add a rel="lightbox" attribute to your link. For example once the slimbox2 module is installed, if you have an image at /sites/default/files/images/big-image.jpg, you could link to it with a "lightbox" effect with the following HTML markup.

<a href="/sites/default/files/images/big-image.jpg" rel="lightbox">lightbox link</a>

For lightbox series adjust the links as follows: (rel="lightbox-series")

<a href="/sites/default/files/images/big-image1.jpg" rel="lightbox-series">lightbox link</a> <a href="/sites/default/files/images/big-image2.jpg" rel="lightbox-series">lightbox link</a> <a href="/sites/default/files/images/big-image3.jpg" rel="lightbox-series">lightbox link</a> <a href="/sites/default/files/images/big-image4.jpg" rel="lightbox-series">lightbox link</a> <!-- The rel="lightbox-series" could be anything as long as it prefixed with "lightbox-" --> * See the README.txt file for more information.

Disclaimer I don't know the author of the Slimbox2 jQuery plugin and have only developed this module because I have found it simple to use. I hope others find this module useful and easy to use.

Note: The Slimbox2 module is an efficient, lightweight solution to adding lightbox links, lightbox image series and lightbox galleries to a Drupal site but where it shines in simplicity, it is limited to a single lightbox style and only applies the lightbox effect to images at this time. For a more feature oriented module, with options to applying lightbox effects to nodes and other media, I would suggest looking at the Colorbox module and its related modules.

Project Usage
55
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The Slimbox2 module aims to provide a simple and lightweight solution for adding lightbox effects to images on a Drupal site using the Slimbox2 jQuery plugin.
Data Name
slimbox2

OPENAI CHATBOT

OPENAI CHATBOT

14:37:25
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.