ImageGalleryAdv

<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Implement an improved support for image galleries as described in ImageGalleryPlain.

One might ask, why not use an existing gallery solution? It is the combination of Wiki and gallery that makes the difference. Setup a gallery very easily and refing the image descriptions as wiki pages.

Setup

  • download Attach:GalleryAdv.zip and extract into your local directory.
  • create a new Wiki Group e.g. MyGallery
  • create a <yourgroup.php> file and include GalleryAdv.php there. This makes the group to be a Gallery:
      <?php include_once("local/GalleryAdv.php"); ?>
  • Create a Thumbnail page. This can be the HomePage
    • Note that this can even be the WebMenu page.
  • Create GroupHeader similar to (make sure to end the GroupHeader with a new line
     ---- 
     .imagetrail HomePage
     || align=center width="100%"
     || Attach:ImageGalleryAdv.jpg Δ ||
     ----
  • Add the first images to the thumbnail page by .image <imagename> <size> <title> .image img01 100 Over the rainbow
  • The thumbnail page now shows the files to be uploaded. Upload the file in its maximum desired size. Usually this is the size as it is shown on the image page. The thumbnail file is generated on the fly.

available markup

    .imagetrail <HomePage>       -- generate a WikiTrail with images
                                        similar to <|HomePage|>


    .image <name> <size> <title> -- display a thumb entry on the gallery
                                    home page

                                    also create an image trail entry

The following parameters apply:

<name>the base name of the image without extension. It will be used to create the appropriate files.
<size>this is the size in pixels. If the image does not exist in the desired size, it will be generated and added to the attachments. The size is included in the filename. Specific values might be auto, thumb, original
<title>the title of the image
<HomePage>This page is used to control the navigator sequence. Works similar to PmWiki/WikiTrails

This markup can be used in the following way:

  • collect the gallery home page
  • generate default image pages

Examples

Such a gallery runs at http://www.weichel21.de/weichel/pmwiki.php/FavoritePhotos/Thumbs

Discussion

See Development/ImageGalleryAdv for the original specification.

Urgent improvements:

  • .image markup requires one line per thumbnail. Should be replaced by something which also works inline. I tried it, but could not make it work due to lack of skills.
  • There should also be a specific markup for the image pages, which allow to adjust scaling and to avoid the naming convention being used in GroupHeader.

Further improvements see Development/ImageGalleryAdv.

Contributors

  • Bernhard Weichel
  • Christian Weichel who impelemented the function to rescale images.
  • Patrick Michaud reviewed Development/ImageGalleryAdv and gave very helpful hints.

History

19-Feb-2004
Updated with automatic thumbnail generator
07-Sep-2003
First Implementation

pmwiki-2.3.38 -- Last modified by {{Bernhard Weichel}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons