modal1Add my vote for this tag create new tag
, view all tags

Lightbox Plugin

TWiki hooks to the Lightbox Javascript package for better thumbnail clickthrough


Lightbox is set of Javascript and CSS files that provides improved image viewing functionality. When a user clicks on the image, the full size image will display without advancing the browser to a new page.


  • Attach images and thumbnails to a topic
  • Use one of the Lightbox TWiki Variable to display the thumbnail image


To add lightbox functionality to a TWiki topic, use

   %LIGHTBOX{ _options_ }%
   %BEGINLIGHTBOX{ _options_ }%

If successful, a dotted box with a clickable thumbnail should appear.

Option Default Comments
image '' The large display image
thumbnail '' The click-able thumbnail image
float 'right' thumbnail placement on topic page
border see below thumbnail border style
caption '' caption to appear in thumbnail img title tag and under large image

Note, TWiki-wide defaults can be set using

  • Set LIGHTBOXPLUGIN_BORDER = 1px dashed #22638C

  • IDEA! If your text is to short, the thumbnail will overlap use height to fix this.
   <div style="border:1px dashed #22638c;padding:4px;height:200px; ">


You type You get Simulated thumbnail
  caption="Rocket is ready for launch"
%LIGHTBOX{ image="Dsc05040.jpg" thumbnail="Dsc05040-thumb.jpg" caption="Rocket is ready for launch"}%

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the plugin home (see below)
  • Unzip LightboxPlugin.zip in the root of your twiki installation
    File: Description:
    data/TWiki/LightboxPlugin.txt plugin description
    lib/TWiki/Plugins/LightboxPlugin.pm plugin perl code
    pub/TWiki/LightboxPlugin/lightbox.css stylesheet
    pub/TWiki/LightboxPlugin/lightbox.js javascript
    pub/TWiki/LightboxPlugin/blank.gif empty image
    pub/TWiki/LightboxPlugin/close.gif close image button
    pub/TWiki/LightboxPlugin/loading.gif image loading animation
    pub/TWiki/LightboxPlugin/overlay.png overlay image
    pub/TWiki/LightboxPlugin/Dsc05040.jpg image example
    pub/TWiki/LightboxPlugin/Dsc05040-thumb.jpg image example
    pub/TWiki/LightboxPlugin/Dsc05040-simulated.jpg image example
  • Enable the plugin in configure or LocalSite.cfg
  • Test above example if the installation was successful

Plugin Info

  • Set SHORTDESCRIPTION = TWiki hooks to the Lightbox Javascript package for better thumbnail clickthrough

This TWiki extension includes v1.0 of Lightbox.

Plugin Author: TWiki:Main.HenriAanstoot, TWiki:Main.ScottHoge
Copyright: © 2006, TWiki:Main.HenriAanstoot
© 2006-2010 TWiki:TWiki/TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2010-11-09 - 19812 (2010-11-09)
Change History:  
2010-11-09: TWikibug:Item6530: Doc improvements, adding proper image example -- TWiki:Main.PeterThoeny
5 Apr 2007: Added blank.gif to the package
23 Mar 2007: Added plugin code with TWiki Variables
22 Sep 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1 (TWiki 4.0)
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/LightboxPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/LightboxPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/LightboxPluginAppraisal

Related Topic: TWiki:Plugins.ImageGalleryPlugin

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 LightboxPlugin.md5 r3 r2 r1 manage 0.2 K 2010-11-10 - 07:30 PeterThoeny  
Compressed Zip archivetgz LightboxPlugin.tgz r3 r2 r1 manage 113.1 K 2010-11-10 - 07:29 PeterThoeny  
Compressed Zip archivezip LightboxPlugin.zip r3 r2 r1 manage 116.8 K 2010-11-10 - 07:29 PeterThoeny  
Unknown file formatEXT LightboxPlugin_installer r1 manage 3.9 K 2010-11-10 - 07:30 PeterThoeny  
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.