[pmwiki-users] Gallery (was: Costom markup for gallery page)
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 31 15:08:39 CST 2005
On Tue, Mar 29, 2005 at 01:32:33PM -0700, H. Fox wrote:
> I was tempted to post a request for converting that to v2 also. It
> would be nice to be able to include a caption that would appear on the
> large-photo page.
> I was thinking..
> (:gallery option=whatever:)
> Attach:Cat.jpg Caption for the cat photo.
> Attach:Dog.jpg Caption for the dog photo.
> ... but being able to do the large-version-page anywhere in the wiki
> is probably what you are going for.
We could certainly do a (:gallery:)...(:galleryend:) markup. However,
all of this got me to thinking about a slightly different approach for
building a gallery... so here's my current brainstorm:
1. Let's assume that we use something like the existing uploads mechanism
to upload image files into per-group folders (customizable). For purposes
of this discussion, let's call the upload folder a "gallery". We'll also
develop an improved version of the uploads page that makes it easier
to upload images in bulk.
2. Any page can contain a (:gallerylist:) markup, which displays
a thumbnail index of all of the image files in the folder, generating
thumbnails as needed. This works similar to (:attachlist:) and (:pagelist:),
except that it displays the images in a gallery format. (:gallerylist:)
may even become just a specialized form of (:attachlist:) or (:pagelist:)
with an appropriate 'fmt=' option.
Each thumbnail is annotated with basic information about the image
(configurable), but also becomes a link to a wiki page with the same
name as the image file minus its extension. Thus, an image of
pmwiki-32.gif would create a page link to [[pmwiki-32]], which
could hold more descriptive information about the page.
3. We also define a (:gallerypage:) directive, which when placed
on a page searches the current gallery for any images that would
result in links to the current page and displays them. Thus, someone
could put (:gallerypage:) in a GroupHeader and every page in the
group would begin with the full-size photos "matching" the current
pagename, followed by the text of the page itself. (If there are
no images matching the pagename, (:gallerypage:) is empty.)
4. (:gallerylist:) and (:gallerypage:) have options available to
control the output formatting, and/or cause the images to be read
from gallery directories other than the default for the current page.
So, what could this get us?
- Creating a gallery can be as simple as creating an index page with
(:gallerylist:), a GroupHeader or GroupFooter with (:gallerypage:),
and uploading image files.
- Image files can be annotated by full wiki pages, including
categories and links to other pages.
- Automatic thumbnail generation and indexing.
- We can use SearchWiki, (:searchresults:), (:pagelist:), etc., to
search a gallery for images with specific keywords or in certain
- It's fairly easy to create a WikiTrail through the images. Combined
with a WikiTrail slideshow feature, it's easy to create slideshows. :-)
- An author needing to disable a GroupHeader's (:gallerypage:)
on a specific page, or who needs to include text above the header
can easily do so with (:nogroupheader:) as well as a number of
Thoughts, comments, feedback?
More information about the pmwiki-users