Template:Infobox/Doc: Difference between revisions

From questden
Jump to navigationJump to search
m (Switchover to Template:Doc)
(Document new feature)
Line 10: Line 10:
;author:Quest author; will be linked to as a wiki node, even if it has whitespace.
;author:Quest author; will be linked to as a wiki node, even if it has whitespace.
;image:Quest image, without namespace. Will be thumbnailed to fit. Optional.
;image:Quest image, without namespace. Will be thumbnailed to fit. Optional.
;imageext:Post number on the board to take the image from. Use this '''or''' <code>image</code>, not both. You can override the board with <code>imageextboard</code>, but should never need to. Optional.
=== Special cases ===
=== Special cases ===
;authorext:Extra authors; this is appended after the primary author, so if you need to use it you probably want something like <code><nowiki>and&amp;nbsp;[[Dave]]</nowiki></code>, or <code><nowiki>et.&amp;nbsp;al.</nowiki></code>. Optional.
;authorext:Extra authors; this is appended after the primary author, so if you need to use it you probably want something like <code><nowiki>and&amp;nbsp;[[Dave]]</nowiki></code>, or <code><nowiki>et.&amp;nbsp;al.</nowiki></code>. Optional.

Revision as of 12:59, 18 September 2011

This is a template documentation page. It is transcluded into place.

Purpose

Template Quest by LionsPhil
0.png

This is the template for making a neat infobox for a quest, as shown on the right. Put it at the top of quest pages. It automatically adds the page to Category:Quests, to Category:Series Quests if it has multiple threads, and will add Template:Noauthor and Template:Nolink if appropriate. You'll still need to list Category:Running Quests and Category:Image Quests as appropriate.

Usage

Parameters (all are optional, although at least author and thread1 are expected):

Metadata

title
Title of the quest. Defaults to the current page name; normally you should leave it to do this.
author
Quest author; will be linked to as a wiki node, even if it has whitespace.
image
Quest image, without namespace. Will be thumbnailed to fit. Optional.
imageext
Post number on the board to take the image from. Use this or image, not both. You can override the board with imageextboard, but should never need to. Optional.

Special cases

authorext
Extra authors; this is appended after the primary author, so if you need to use it you probably want something like and&nbsp;[[Dave]], or et.&nbsp;al.. Optional.
dead
Set this to something non-blank to put the quest in Category:Dead Quests instead of Category:Quests and keep it off the main list. The rough metric for this is if a quest only had graveyard threads and never got off the ground.

Threads

All thread parameters must be numbered, starting from 1. For example, thread1=500|thread2=600….

threadN
Post numbers for the threads of the quest.
threadNname
Optional 'name' for the thread, e.g. "Chapters 1–2". If the first thread is named, a numbered list is used to automatically provide the thread numbers.
disthreadN
Post numbers for discussion threads.

Specials

For example, 'April Fool' versions of quests.

specthreadN
Post numbers for any 'special' threads.
specthreadNboard
Board for corresponding 'special' thread; defaults to quest.
specthreadNname
Required name for corresponding special thread.

Other

prethreads
Value is spat out verbatim in the thread block, before thread 1. Avoid using this; it's for some very special cases where quests have some of their threads hosted externally. It is not for subheadings.
threadNpre
Place some markup before a thread entry, for example to do horizontal rules separating the list. You need to do a <nowiki></nowiki> trick to get a leading newline to separate it from a previous list element; see Bubble Bucket and Cutebold Slaughter Fest for examples. The matching threadN must be specified.
suppresscat
Set this to something non-blank to prevent automatic categorisation. You probably don't want to use this.
suppressnum
Disable automatic numbering of threads when using thread names.

Example

A quick reminder of MediaWiki template syntax; whitespace is reasonably flexible either side of the pipes, so do whatever is most readable:

{{Infobox
|author=TestPattern
|image=tozol_title.png
|thread1=79880
|thread2=94645
|disthread1=316424
|specthread1=156238|specthread1name=April Fool's Edition
}}

There are some more abstract examples on the development testing page, and you can find pages using this template.

Maintenance notes

  • Depends on the automatic redirect from /quest/ to /questarch/ (or /graveyard/) for archived threads (semantically, the /quest/ version is considered its canonical URI). This allows the "current thread" to work without having to be flagged as special in any way.
  • Depends on the ParserFunctions extension to support optional parameters gracefully. This makes the code pretty hairy, so take care editing.
  • The maximum number of threads is limited by the implementation repeating the definition for each number. Unfortunately this is a common MediaWiki paradigm as it has no set handling in templates.