
The RandomSelection MediaWiki extension can be used to generate a random option from a given set.
Syntax
<choose> <option>Option 1</option> <option>Option 2</option> </choose>
This example will display a flag image corresponding to one of the Memory Alpha languages:
<choose> <option>[[File:us-flag.svg|18px]]</option> <option>[[File:bg-flag.svg|18px]]</option> <option>[[File:ca-flag.svg|18px]]</option> <option>[[File:de-flag.svg|18px]]</option> <option>[[File:fr-flag.svg|18px]]</option> <option>[[File:cs-flag.svg|18px]]</option> <option>[[File:pt-flag.svg|18px]]</option> <option>[[File:nl-flag.svg|18px]]</option> <option>[[File:es-flag.svg|18px]]</option> <option>[[File:sv-flag.svg|18px]]</option> <option>[[File:ru-flag.svg|18px]]</option> <option>[[File:zh-flag.svg|18px]]</option> <option>[[File:pl-flag.svg|18px]]</option> <option>[[File:ro-flag.svg|18px]]</option> <option>[[File:ja-flag.svg|18px]]</option> <option>[[File:uk-flag.svg|18px]]</option> </choose>
Note that you can weight the options. This example will give a 3x weighting to option 1:
<choose> <option weight="3">Option 1</option> <option>Option 2</option> </choose>
Links, images, and templates can all be included as options.
See Random Pic of the Day for an example of this extension in use.
Search • Namespaces • Page names • Shortcuts (keyboard) • Links (backlinks • piped • interwiki • redirects) • Categories • Supported browsers
New pages • Editing • Sections • Templates • Special characters • ISBN links • Edit summary • Minor edits • Edit conflicts
Wiki markup (HTML) • Tables (sorting) • Sections • Images (galleries) • Formulas • Poems and lyrics
Recent changes (enhanced) • Related changes • Watching pages • Diff • Page history • Edit summary • User contributions • Minor edits
Starting a new page • Renaming a page • Merging two pages • Protecting a page • Deleting a page • Edit conflicts
Parser functions • Variables • Magic words • Input boxes • Image maps • Random selections • Dynamic page lists • Tabview • Category trees • Ogg files