Categories:
Author:
Current version:
0.1
About It:
Get it:
Rate it:
Flag it:
If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
rcb_image_index
Description
Image output plugin. Functions like <txp:image_index /> with a few distinct advantages:
- form attribute gives complete control over output. The form uses tokens (e.g. {url}, {caption}, etc.) to easily output image attributes
- select from multiple categories, a single category or all categories
- select images with thumbnails, without thumbnails, or either
Tag attributes
- c=“category name[, additional categories, . . .]”
- Restrict to articles from specified image category/ies.
- Default: unset, retrieves from all image categories.
- To select from currently viewed category, set c attribute to c=’<txp:category />’
- form=“form name”
- the form that will be used to display each record in the result set
- dateformat=“PHP format character(s)”
- How the date will be displayed in the form
- For formatting options see http://uk3.php.net/manual/en/function.date.php
- Default: j M Y
- thumb=“integer”
- Whether to select only those images which have thumbnails (1), only those without thumbnails (0), or either (2)
- Default: 1
- limit=“integer”
- The number of images to skip
- Default: 0
- offset=“integer”
- The number of images to display
- Default: 0
- sort=“sort value(s)”
- How to sort resulting list
- Default: date desc
- label=“label text”
- Label for the top of the list
- Default: unset
- labeltag=“label tag”
- Wraptag for label for top of the list
- Default: unset
- wraptag=“tag”
- (x)HTML tag to be used as the wraptag (without brackets)
- Default: unset
- break=“tag/text”
- Wrap tag (without brackets) or text to be used as the line break
- Default: unset
- class=“class name”
- CSS class attribute applied to wraptag
- Default: unset
Form tokens
You can use the following tokens in your form:
- {id} – image ID
- {name} – original image filename including extension
- {category} – image category name
- {ext} – file extension
- {w} – image width (px)
- {thumbw} – thumbnail width
- {h} – image height
- {thumbh} – thumbnail height
- {alt} – alternative text
- {caption}
- {date} – posted date. Format determined by dateformat attribute declared in tag (see above)
- {author}
- {dims} – image dimensions, e.g. width=“800” height=“600”
- {thumbdims} – thumbnail dimensions, e.g. width=“100” height=“100”
- {url} – image URL
- {thumburl} – thumbnail URL
Example
Tag:
<txp:rcb_image_index form=“gallery” wraptag=“ul” break=“li” class=“gallery” />
Form (‘gallery’):
<a href=”{url}”><img src=”{thumburl}” {thumbdims} alt=”{alt}” /></a><p>{Caption}, posted {date}</p>
The above example is ideal for integration with many javascript lightbox/gallery scripts, which usually require a thumbnail image to link directly to the full-sized image.
Keywords/tags:
Initially released:
28th May 2009
Posted here:
28 May 2009