Contents
Gallery2
PURPOSE
This Gallery2 parser is used to visualize a couple of images as a thumbnail gallery. Optional a description of an image could be added including WikiName. On default the image name and it's creation date is shown. If you click on a thumbnail you get the webnails shown. By a menue you are able to toggle between the slides. Optional you could get a flash animation of the selected images.
CALLING SEQUENCE
{{{ #!Gallery2 [columns=columns],[filter=filter],[mode=mode], [show_text=show_text],[show_date=show_date], [show_tools=show_tools], [sort_by_name=sort_by_name],[sort_by_date=sort_by_date], [sort_by_alias=sort_by_alias] [reverse_sort=reverse_sort], [only_items=only_items],[template_itemlist=template_itemlist], [album=album],[album_name=album_name],[front_image=front_image], [thumbnail_width=thumbnail_width],[webnail_width=webnail_width],[text_width=text_width], [image_for_webnail=image_for_webnail], [sequence_name=sequence_name],[sequence_fps=sequence_fps],[eo_info=eo_info] [border_thick=border_thick],[renew=renew],[help=help] * [image1.jpg alias] * [image2.jpg alias] }}}
KEYWORD PARAMETERS
columns: number of columns for thumbnails filter: regex to select images show_text: default is 1 description is shown, 0 disables this show_date: default is 1 date info from exif header if available is shown, 0 disables this show_tools: default is 1 icon toolbar is show, 0 disables this sort_by_name: default is 1, the images are sorted by name, but not if only_items is 1 sort_by_date: default is 0, if set to 1 the images are sorted to the modification time if they do have all the same time then the result is random sort_by_alias default is 0, if set to 1 and only_items is set to 1 it is used to order the images by the alias name reverse_sort: default is 0, if set to 1 the file list is reversed mode: default is 1 this means description below the image any other number means description right of image only_items: default is 0, if it is set to 1 only images which are described in listitem are shown dependend on the order of the items template_itemlist: default is 0, if set to 1 an item list is shown which could be copied into the script. album: default is 0 if set to 1 only the first image of a series is shown but slideshow over all images album_name: useful for album. default is 'album' use it as short name for the album. front_image: Useful for album. default is ''. The first image is shown in front of the album and slideshow. If set to an existing image name this is shown in front of album and slideshow. The slide show could start by this somewhere. border_thick: default is 1 this is the thickness in pixeln of the outer frame renew: default is 0 if set to 1 then all selected thumbnails_* and webnails_* removed. Afterwards they are new created. thumbnail_width: default is 128 webnail_width: default is 640 text_width: default is 140 (changes only for mode=2 useful) image_for_webnail default is 0 if set to 1 then the image is shown as preview and not the webnail sequence_name: default is '' if set this name is used for an image sequence with an duration of one image per second. sequence_fps: (frames per second) default is 1 it is not allowed to set values below 1 eo_info: default is 0 if set to 1 an info line about how to embed the flash is shown help: default is 0 if set to 1 a copy of the CALLING SEQUENCE is shown, (there are some new ideas around to show help to an user so this will be later replaced)
OPTIONAL INPUTS
itemlist : if it is used and only_items is 1 then only the images in this list are shown. The alias text is used always as description of the image instead of the file name
RESTRICTIONS
If you rotate an image at the moment the exif is destroyed. PIL ignores the exif header. This is not a quite big problem normally files with an EXIF header are right rotated. Current Moin versions do not have the possibility to move attachments. Because of the delete function of the gallery2image function which moves internal the file to a .bak file. Using this patch you could move the file back to an image file.
REQUIRED IMAGES
You have to install them into /wiki/img/ dir. /ModernImages
HISTORY
While recognizing how to write MacroMarket/MiniPage I got the idea to write a Gallery Parser. We have used in our wikis in the past the Gallery macro of SimonRyan. I have tried to modify it a bit to change it for 1.3 but my python skills weren't enough or it was easier to write it completly new. So this one shows now a way how a Gallery could be used by the parser and an action Macro. Probably it is a good example for others who like to know how to do this. For a full changelog, you can see ParserMarket/Gallery2/History