Changes

Jump to: navigation, search

Editing help

526 bytes added, 20:41, 27 May 2011
Display a random image
== Display a random image ==
To display a random image from the complete repository of images on this site, add the following code on a page:  <nowiki><randomimage float="left" /></nowiki>
This code can be used to display a random image from the complete repository of images on the site:<br>
<span style="background:#f6f6f6;"><nowiki><randomimage float="left" /></nowiki></span><br>
An automatic caption will be pulled from the image descripion page.
<br clear="all">
To produce a random <randomimage float="left">Random image with a fixed caption, use the following example:</randomimage>
This example can be used to display a random image with a pre-defined caption, eg. 'A random image', for all images:<br><span style="background:#f6f6f6;"><nowiki><randomimagefloat="left">Add a standard caption here, e.g. Random A random image</randomimage></nowiki>  The <nowiki/span><randomimagebr clear="all"></nowiki> tag also supports the following attributes:
The <nowiki><randomimage></nowiki> tag supports the following attributes:
* size - set the image width (default is the user's thumbnail width).
* float - float the image; valid values are 'left', 'center' and 'right'.
* choices - limits the image selection to a list of images separated by a vertical bar. For example:
<randomimage size="150" float="left" choices="Augustiner_001.jpg|Augustiner-Keller_002.jpg|Augustiner-Keller_003.jpg" /> This example is a 150 pixels width image, aligned to the left and with a pre-defined array of named images to choose from:<br><span style="background:#f6f6f6;"><nowiki><randomimage size="100150" float="left" choices="Augustiner_001.jpg|Augustiner_002Augustiner-Keller_002.jpg|Augustiner_003Augustiner-Keller_003.jpg" /></nowiki></span>
== Table of Contents ==
Anonymous user

Navigation menu