Textpattern logo

Help?

image author

From Textbook

<txp:image_author />

The image_author> tag is a single tag that Textpattern will replace with the author's real name of the current image in an image_list, or the specific image if given an id or name.

Contents

Attributes

Tag will accept the following attributes (case-sensitive):

id="integer" [TODO]
An id assigned at upload of an image to display. The IDs can be found on the Images tab.
Default: unset.
name="image name" [TODO]
An image to display, given by its image name as shown on the Images tab. If both name and id are specified, the id takes precedence.
Default: unset.
section="section name"
Direct any linked author name to the nominated section instead of to the default (front) page.
Default: Unset.
this_section="boolean"
If set to 1, the linked author name will direct users to an author list in the current section.
Default: 0.
link="link type (boolean)"
Whether to hyperlink the author (1) or not (0).
Default: 0.
title="boolean"
Whether to display the author's real name (1) or login name (0).
Default: 1.
wraptag="tag"
(X)HTML tag (without brackets) to wrap around the author name.
Default: unset.
class="class name"
CSS class attribute to be applied to the wraptag.
Default: Unset.

Examples

Example 1: Add image author to gallery

<txp:image_list category="mammals">
   <a href="<txp:image_url />"><txp:thumbnail /></a>
   <div class="by">by <txp:image_author /></div>
</txp:image_list>

Other tags used: image_list, thumbnail

Example 2: Link to author list

<txp:image_list category="fish">
   <a href="<txp:image_url />"><txp:thumbnail /></a>
   <div class="by">by <txp:image_author link="1" /></div>
</txp:image_list>
What it does...
Displays thumbnails and author info for each image in the fish category. The authors' names are hyperlinked to site.com/author/image/User+Name.

Other tags used: image_list, thumbnail

Genealogy

Version 4.3.0

  • tag introduced

Translations [?]...

About Textbook