Gallery API

by Justin Bodeutsch

Galleries use one function for three pages:
* gallery list page (list of all galleries)
* gallery page (list of all photo's in the gallery)
* photo page (show one photo)

label: gallery
parameters:

display:auto
will be gallery list, gallery detail, or image detail depending on URL

display:list
will display gallery list page; with 'find_gallery' will display gallery detail page

display:detail
with 'find_gallery', will display a random image from a galler. Use 'show:_image__' etc

find_gallery:XXXX
with 'display:list' will show gallery detail page

howmany:number
only with gallery list page, limits number of galleries shown

order:[random|recent]
only with gallery list page

find_group:group name
only with gallery list page, will limit results to galleries identified to that group

 
 The three pages each use their own show tag
  • show_galleries: HTML TAGS ALLOWED
    • __image__ = display image in an img tag of one of the photos in the gallery
    • __title__ = display title of gallery
    • __titlelink__ = display the title as a link to the gallery
    • __postdate__ = display the date the gallery was posted
    • __promoimageurl__ = display the url of the promo image, will display random image if none is selected
    • __promoimageurlthumb__ = the thumbnail url of the promo image
    • __galleryurl__ = display the url of gallery
    • __numberofimages__ = number of images in the gallery
  • before_show_gallery: HTML TAGS ALLOWED
    • __title__ = display the title of the gallery
    • __description__ = display the description of the gallery
    • __numberofimages__ = number of images in the gallery
  • show_gallery: HTML TAGS ALLOWED
    • __image__ = display image in an img tag
    • __imageurl__ = display url of the image
    • __imagelinkurl__ = display the url of the page the image is linked to
    • __title__ = display title of image
    • __numberofimages__ = number of images in the gallery
  • show_photo: HTML TAGS ALLOWED
    • __image__ = display the full image in an img tag
    • __imageurl__ = display the url of the image
    • __imagelinkurl__ = display the url of the page the image is linked to
    • __gallerytitle__ = display the title of the gallery
    • __title__ = display title of image
    • __description__ = display the description of the image
    • __prev__ = display the previous image in the gallery
    • __next__ = display the next image in the gallery
    • __prevurl__ = display url for the the previous image in the gallery
    • __nexturl__ = display url for the the next image in the gallery
    • __homeurl__ = display the url of the images's gallery

Examples:

getContent("gallery","show_galleries:__image__ __title__","show_gallery:__title____image__","show_photo:__title____image__");

Monklet:

{tag="gallery"display="list"find_gallery="home-communities"
show_gallery="__image__"}