Lightbox Gallery

Activities ::: mod_lightboxgallery
Maintained by Picture of Andrew HancoxAndrew Hancox, Picture of Adam OlleyAdam Olley
This resource allows you to create 'Lightbox' enabled image galleries within your Moodle course. As a course teacher, you are able to create, edit and delete galleries. Smallthumbnails will then be generated, which are used for the thumbnail view of the gallery.
Latest release:
3699 sites
75 fans
Current versions available: 9

Clicking on any of the thumbnails brings that image into focus, and allows you to scroll through the
gallery at your leisure. Using the Lightbox scripts creates nice transition effects when loading and
scrolling through the images.

For Moodle 2.x+, YUI version:


Maintained by: Open LMS product team
Original plugin by: Paul Holden <pholden[at]greenhead[dot]ac[dot]uk>.

For the Moodle 1.9 jQuery version:

Moodle jQuery Lightbox Gallery v1.0.0 (16th Nov 11)


Ported to jQuery from:
Lightbox Gallery v2.2.1 (12th May 09)
by Paul Holden pholden[at]greenhead[dot]ac[dot]uk

Port performed by Andrew Hancox at Kineo.

External documentation URL:
Source control URL:
Bug tracker URL:
Website URL:


This plugin is part of set Lightbox Gallery.


Screenshot #0
Screenshot #1


Picture of Andrew Hancox
Andrew Hancox (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Tyron Delean
    Wed, Apr 30, 2014, 9:48 AM
    After doing a full code search, there are a number of them. Sorry for doing this in 3 comments, but I only fixed the ones I got warnings for originally. The additional ones are as follows:
    \edit\base_class.php line 44
    \db\upgrade.php lines 209 and 210
    rsslib.php line 52
    locallib.php line 157
    index.php line 68
    lib.php lines 116 and 193
    imageedit.php line 44
    comment.php line 47
    I think that's all of them.
  • Picture of Tyron Delean
    Wed, Apr 30, 2014, 10:01 AM
    IGNORE_MISSING should be MUST_EXIST in both user context cases.
  • Picture of Adam Olley
    Wed, Apr 30, 2014, 11:03 AM
    Hi Tyron,
    Correct on all counts I'd say. Lightboxgallery hasn't had much code cleanup lately. I'll be doing some cleanup to make it work nicer with 2.7. Given all the api changes/deprecations since 2.3.
  • Picture of Adam Olley
    Wed, Apr 30, 2014, 11:03 AM
    Hi Tyron,
    Correct on all counts I'd say. Lightboxgallery hasn't had much code cleanup lately. I'll be doing some cleanup to make it work nicer with 2.7. Given all the api changes/deprecations since 2.3.
  • Picture of Tyron Delean
    Wed, Apr 30, 2014, 3:05 PM
    Ok great, as long as you are aware of it. Best Regards.
  • Picture of Jez H
    Thu, May 22, 2014, 9:02 PM
    Great plugin, a great improvement on the previous version, much appreciated, thanks!
  • Just wondering . . .
    Fri, May 23, 2014, 8:50 AM
    Any idea on an ETA for a 2.7 version?
    Just curious, as we start the upgrade testing
  • Picture of Nicolas Dunand
    Fri, May 23, 2014, 8:07 PM
    Hi, I just filed a pull request on GitHub, fixing these deprecated get_context() calls. Deprecated add_to_log() calls still to be fixed.
  • Picture of Adam Olley
    Tue, Jun 3, 2014, 3:15 PM
    Hi all,

    I've begun work on getting lightboxgallery working on 2.7. Strictly speaking, it should already work, however several parts of it are using deprecated functions/api's that need updating.

    I've flagged the following bits as needing attention for a 2.7 version.
    a) context classes (thanks to @ndunand for the context fixes - they've been merged in now.)
    b) Port add_to_log calls to events.
    c) Migrate comments to core comment API - lightboxgallery doesnt do anything fancy that core comments cant handle.
    d) fullname requiring additional name fields from queries to {user}.

    (a) has already been done as noted. I've partly completed (b) and am working on (c). I expect to have these all finished and a 2.7 version available this week.
  • Picture of Adam Olley
    Wed, Jun 4, 2014, 12:32 PM
    I've uploaded a version marked as a release candidate for 2.7. It takes care of a, b and d above. I haven't done (c) as it would actually make a few places in the module slower or more clumsy. Something for the future anyway.

    I also updated the user_complete and user_outline modules in lib.php to not require use of the {log} table. Lastly, I updated the javascript used for the lightbox to the version @brum1975 made a pull request with.

    Please file an issue on github if you try out the 2.7 version and run into any problems.
  • Picture of Alexander Deichman
    Mon, Jun 9, 2014, 10:41 AM
    I just left a comment on the discussion forum for a new future request: social image gallery - ability to add comments to picture(like facebook). Is it possible? From php and db perspective, it sure looks like it is but I haven't really looked too close.
  • Picture of Richard Chui
    Mon, Aug 4, 2014, 2:41 PM
    Is it possible to use Lightbox Gallery for videos? Thanks.
  • Picture of Adam Olley
    Mon, Nov 24, 2014, 11:37 AM
    @Richard Chui, @Alexander Deichman: You might want to take a look at Media collection.

    It has a flickr-esque interface where you can like things and leave comments. It also supports audio, images and video.

    One difference it has from lightbox gallery, is that it lets any user create a gallery. But an update is coming soon to it that will allow you to limit creating galleries/items inside the collection to just the instructor (but allowing students to still comment).
  • Just wondering . . .
    Tue, Feb 17, 2015, 11:59 AM
    Will this work for Moodle 2.8+ ??

  • Picture of Adam Olley
    Thu, Feb 19, 2015, 7:37 AM
    Hi Derek,

    I'm not aware of any issues with running it on M2.8. And the only reason the current build isn't flagged as being available for M2.8 here is because I haven't had the time to do some proper testing to verify that for myself.

    If you go ahead and try it on a 2.8 and run into any problems; let me know, I'll be happy to look into them.
Please login to post comments