This plugin helps you in viewing pictures that are attached to a topic in a nice thumbnail
gallery. Clicking on a thumbnail zooms the image. You might navigate within your images using
a navigation toolbar to visit the next, previous, first or last image in your gallery.
Images and thumbnails are resized according to the given settings and are cached thereafter.
The order of images can be customized by putting a sequence number into the attachment comment.
An image attachment can be managed by clicking on the red dot in its title.
The plugin will generate the document relations "parent", "first", "last", "next", "previous"
for each image to improve navigation (only a few browsers support this, e.g. mozilla).
The image gallery is highly customizable using cascading stylesheets and html formats (see
below).
the comment of the image (with its sequence number stripped off)
$imgnr
the sequence number of the image
$date
the date when the image has been uploaded
$version
the version of the image attachment
$name
the filename of the image
$wikiusername
the wikiusername who uploaded the image
$username
the username who uploaded the image
$imageurl
the url path of the display image
$thumburl
the url path of the thumbnail image
$origurl
the url path pointing to the original image attachment
Query Parameters
The IGP will check for certain query parameters in the url. These are:
id=<n;>: distinguish multiple IMAGEGALLERYs in the same topic
filename=<name>: display the given file of the image set
refresh=on: recompute all images and thumbnails in the IGP cache
Each IMAGEGALLERY has an anchor, namely a <a name="igp<n>"/>, that
is used to scroll the display appropriately.
Customization
First of all this plugin should come with reasonable default values, so that
you will get a nice image gallery (with regards to my taste) right on.
There are several things that are customizable:
customize a gallery using a compination of the arguments described above
add custom cascading styles in a topic to format the gallery
alter the default cascading styles in the style.css file attached to this topic
customize the plugin settings below
Cascading Stylesheets
The plugin emits the following css classes (see the comments in the style.css file):
division for the complete output of the image gallery
igpThumbNails
division of all thumbnails
igpThumbNailsTable
table of thumbnail images
igpThumbNail
table cell of one thumbnail image
igpThumbNailTitle
table cell of the thumbnail title
igpPictureTable
table of the display image and the navigation bar
igpPicture
table cell of the display image
igpPictureTitle
division of the title of the display image
igpNavigation
table cell of the navigation bar
igpRedDot
span surrounding the red dot
igpAlert
span surrounding error messages
Adjusting the image sequence
By default the image gallery will display images in the order that they where uploaded.
This determines their natural order. When you want to change this order you can
prefix the comment of the attachment with a sequence number. For example: given a
picture whose comment is "My old bike" that should be put at position 12
in your image gallery then change the comment to "12 - My old bike". This
will put the image at the desired position. Sequence numbers don't necessarily need
to be unique, that is if there's another picture with a comment like
"12 - My new bike" then the natural order of the both is relevant. In general,
a picture will be put at position <nr> if its attachment comment has the format
<nr><space>-<space><comment>
Note, that the $comment variable will only display <comment> , that is with
<nr><space>-<space> stripped off.
Plugin Settings
Names and sizes for thumbnails (feel free to add additional entries or to modify these defaults)
Set TINY = 25x25
Set SMALL = 50x50
Set MEDIUM = 95x95
Set LARGE = 150x150
Set HUGE = 250x250
cascading style sheets
Set STYLE = /pub/TWiki/ImageGalleryPlugin/style.css
One line description:
Set SHORTDESCRIPTION = Displays image gallery with auto-generated thumbnails from attachments.
working around Image::Magick crashes reading svg image files
20 Mar 2006
added sort and reverse arguments; fixed updating thumbnails when a new image version is created
20 Feb 2006
added include, exclude and field arguments
16 Feb 2006
renamed thumbnail so that it does not interfer with auto-attachment
14 Sep 2005
don't strictly depend on normalizeFilename()
15 June 2005
new release
10 May 2005
fixed igp id clash error found by TWiki:Main/MartinCleaver; capture ImageMagick error messages; don't trust attachment info - check for attachment existence as well; added refresh query parameter to recompute images