Template:Infobox Story SMW: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
m (Removed ::)
Tag: Reverted
m (Removed more ::)
Tag: Reverted
Line 22: Line 22:
<data source="script"><label>Script release:</label><format>''{{dab away|{{{script}}}}}''</format></data>
<data source="script"><label>Script release:</label><format>''{{dab away|{{{script}}}}}''</format></data>
     <data source="scripturl"><label>Script release:</label><format>[{{{scripturl}}} <span style="font-size:95%">online here</span>] {{#if:{{{scripturl2|}}}|[{{{scripturl2}}} <span style="font-size:95%">and here</span>]}}</format></data>
     <data source="scripturl"><label>Script release:</label><format>[{{{scripturl}}} <span style="font-size:95%">online here</span>] {{#if:{{{scripturl2|}}}|[{{{scripturl2}}} <span style="font-size:95%">and here</span>]}}</format></data>
<data source="doctor"><label>Doctor{{#if:{{#pos:{{{doctor|}}}|,}}|s}}:</label><format>{{#arraymap:{{{doctor}}}|{{{separator|{{{seperator|,}}}}}} |x|[[doctor::x]]}}</format></data>
<data source="doctor"><label>Doctor{{#if:{{#pos:{{{doctor|}}}|,}}|s}}:</label><format>{{#arraymap:{{{doctor}}}|{{{separator|{{{seperator|,}}}}}} |x|[[x]]}}</format></data>
<data source="team"><label>Main character(s):</label></data>
<data source="team"><label>Main character(s):</label></data>
<data source="main character"><label>Main character(s):</label></data>
<data source="main character"><label>Main character(s):</label></data>
Line 33: Line 33:
<group>
<group>
<header>Key crew</header>
<header>Key crew</header>
<data source="publisher"><label>Publisher{{#if:{{#pos:{{{publisher|}}}|,}}{{#pos:{{{publisher|}}}|and}}{{#pos:{{{publisher|}}}|&}}{{{plural publisher|}}}|s}}:</label><format>{{#if:{{{publisher display|}}}|{{{publisher display}}}{{#arraymap:{{{publisher}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:publisher=x}}}}}}|{{#arraymap:{{{publisher}}}|{{{separator|{{{seperator|,}}}}}} |x|[[publisher::x]]}}}}</format></data>
<data source="publisher"><label>Publisher{{#if:{{#pos:{{{publisher|}}}|,}}{{#pos:{{{publisher|}}}|and}}{{#pos:{{{publisher|}}}|&}}{{{plural publisher|}}}|s}}:</label><format>{{#if:{{{publisher display|}}}|{{{publisher display}}}{{#arraymap:{{{publisher}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:publisher=x}}}}}}|{{#arraymap:{{{publisher}}}|{{{separator|{{{seperator|,}}}}}} |x|[[x]]}}}}</format></data>
<data source="developer"><label>Developer:</label></data>
<data source="developer"><label>Developer:</label></data>
<data source="editor"><label>Editor:</label></data>
<data source="editor"><label>Editor:</label></data>
<data source="contributors"><label>Writers:</label></data>
<data source="contributors"><label>Writers:</label></data>
<data source="writer"><label>Writer{{#if:{{#pos:{{{writer|}}}|,}}{{#pos:{{{writer|}}}|and}}{{#pos:{{{writer|}}}|&}}{{{plural writer|}}}|s}}:</label><format>{{#if:{{{writer display|{{{contributors|}}}}}}|{{{writer display}}}{{#arraymap:{{{writer}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:writer=x}}}}}}|{{#arraymap:{{{writer}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|see authorship}}{{#pos:{{lc:x}}|unclear}}|x|[[writer::x|{{da smw|x}}]]}}}}}}</format></data>
<data source="writer"><label>Writer{{#if:{{#pos:{{{writer|}}}|,}}{{#pos:{{{writer|}}}|and}}{{#pos:{{{writer|}}}|&}}{{{plural writer|}}}|s}}:</label><format>{{#if:{{{writer display|{{{contributors|}}}}}}|{{{writer display}}}{{#arraymap:{{{writer}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:writer=x}}}}}}|{{#arraymap:{{{writer}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|see authorship}}{{#pos:{{lc:x}}|unclear}}|x|[[x|{{da smw|x}}]]}}}}}}</format></data>
<data source="writer spoil"><label>Writer{{#if:{{{plural writer|}}}|s}}:</label></data>
<data source="writer spoil"><label>Writer{{#if:{{{plural writer|}}}|s}}:</label></data>
<data source="lead writer"><label>Lead writer</label><format>[[{{{lead writer}}}]]</format></data>
<data source="lead writer"><label>Lead writer</label><format>[[{{{lead writer}}}]]</format></data>
<data source="other writers"><label>Other writers:</label><format>{{#if:{{{other writers display|{{{other contributors|}}}}}}|{{{other writers display|{{{other contributors}}}}}}{{#arraymap:{{{other writers}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various others}}{{#pos:{{lc:x}}|unclear}}||{{#set:writer=others}}}}}}|{{#arraymap:{{{other writers}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|see authorship}}{{#pos:{{lc:x}}|unclear}}|x|[[writer::x|{{da smw|x}}]]}}}}}}</format></data>
<data source="other writers"><label>Other writers:</label><format>{{#if:{{{other writers display|{{{other contributors|}}}}}}|{{{other writers display|{{{other contributors}}}}}}{{#arraymap:{{{other writers}}}|{{{separator|{{{separator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various others}}{{#pos:{{lc:x}}|unclear}}||{{#set:writer=others}}}}}}|{{#arraymap:{{{other writers}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|see authorship}}{{#pos:{{lc:x}}|unclear}}|x|[[x|{{da smw|x}}]]}}}}}}</format></data>
<data source="director"><label>Director:</label></data>
<data source="director"><label>Director:</label></data>
<data source="producer"><label>Producer:</label></data>
<data source="producer"><label>Producer:</label></data>
Line 77: Line 77:
<data source="opening date"><label>Opened:</label><format>{{#if:{{{opening date display|}}}|{{{opening date display}}}{{dl/set|{{{opening date}}}|Opening}}|{{dl|{{{opening date}}}|Opening}}{{#if:{{{opening date2|}}}|<br />{{dl/text|{{{opening date2}}}}}}}{{#if:{{{opening date3|}}}|<br />{{dl/text|{{{opening date3}}}}}}}{{#if:{{{opening date4|}}}|<br />{{dl/text|{{{opening date4}}}}}}}{{#if:{{{opening date5|}}}|<br />{{dl/text|{{{opening date5}}}}}}}{{#if:{{{opening date6|}}}|<br />{{dl/text|{{{opening date6}}}}}}}}}{{{opening date ref|}}}</format></data>
<data source="opening date"><label>Opened:</label><format>{{#if:{{{opening date display|}}}|{{{opening date display}}}{{dl/set|{{{opening date}}}|Opening}}|{{dl|{{{opening date}}}|Opening}}{{#if:{{{opening date2|}}}|<br />{{dl/text|{{{opening date2}}}}}}}{{#if:{{{opening date3|}}}|<br />{{dl/text|{{{opening date3}}}}}}}{{#if:{{{opening date4|}}}|<br />{{dl/text|{{{opening date4}}}}}}}{{#if:{{{opening date5|}}}|<br />{{dl/text|{{{opening date5}}}}}}}{{#if:{{{opening date6|}}}|<br />{{dl/text|{{{opening date6}}}}}}}}}{{{opening date ref|}}}</format></data>
<data source="closing date"><label>Closed:</label><format>{{#if:{{{closing date display|}}}|{{{closing date display}}}{{dl/set|{{{closing date}}}|Closing}}|{{dl|{{{closing date}}}|Closing}}{{#if:{{{closing date2|}}}|<br />{{dl/text|{{{closing date2}}}}}}}{{#if:{{{closing date3|}}}|<br />{{dl/text|{{{closing date3}}}}}}}{{#if:{{{closing date4|}}}|<br />{{dl/text|{{{closing date4}}}}}}}{{#if:{{{closing date5|}}}|<br />{{dl/text|{{{closing date5}}}}}}}{{#if:{{{closing date6|}}}|<br />{{dl/text|{{{closing date6}}}}}}}}}{{{closing date ref|}}}</format></data>
<data source="closing date"><label>Closed:</label><format>{{#if:{{{closing date display|}}}|{{{closing date display}}}{{dl/set|{{{closing date}}}|Closing}}|{{dl|{{{closing date}}}|Closing}}{{#if:{{{closing date2|}}}|<br />{{dl/text|{{{closing date2}}}}}}}{{#if:{{{closing date3|}}}|<br />{{dl/text|{{{closing date3}}}}}}}{{#if:{{{closing date4|}}}|<br />{{dl/text|{{{closing date4}}}}}}}{{#if:{{{closing date5|}}}|<br />{{dl/text|{{{closing date5}}}}}}}{{#if:{{{closing date6|}}}|<br />{{dl/text|{{{closing date6}}}}}}}}}{{{closing date ref|}}}</format></data>
<data source="network"><label>Premiere network{{#if:{{#pos:{{{network|}}}|,}}{{#pos:{{{network|}}}|and}}{{#pos:{{{network|}}}|&}}{{{plural network|}}}|s}}:</label><format>{{#if:{{{network display|}}}|{{{network display}}}{{#arraymap:{{{network}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:network=x}}}}}}|{{#arraymap:{{{network}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}|x|[[network::x|{{da smw|x}}]]}}}}}}</format></data>
<data source="network"><label>Premiere network{{#if:{{#pos:{{{network|}}}|,}}{{#pos:{{{network|}}}|and}}{{#pos:{{{network|}}}|&}}{{{plural network|}}}|s}}:</label><format>{{#if:{{{network display|}}}|{{{network display}}}{{#arraymap:{{{network}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:network=x}}}}}}|{{#arraymap:{{{network}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unkown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}|x|[[x|{{da smw|x}}]]}}}}}}</format></data>
<data source="anthology"><label>Part of:</label><format>{{#if:{{{anthology display|}}}|{{{anthology display}}}{{#arraymap:{{{anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:anthology=x}}}}}}|{{#arraymap:{{{anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|''[[anthology::x|{{dau|x}}]]''}}}}</format></data>
<data source="anthology"><label>Part of:</label><format>{{#if:{{{anthology display|}}}|{{{anthology display}}}{{#arraymap:{{{anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:anthology=x}}}}}}|{{#arraymap:{{{anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|''[[x|{{dau|x}}]]''}}}}</format></data>
<data source="audio anthology"><label>Part of:</label><format>{{#if:{{{audio anthology display|}}}|{{{audio anthology display}}}{{#arraymap:{{{audio anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:anthology=x}}}}}}|{{#arraymap:{{{audio anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|''[[anthology::x|{{dau|x}}]]''}}}}</format></data>
<data source="audio anthology"><label>Part of:</label><format>{{#if:{{{audio anthology display|}}}|{{{audio anthology display}}}{{#arraymap:{{{audio anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|{{#if:{{#pos:{{lc:x}}|unknown}}{{#pos:{{lc:x}}|various}}{{#pos:{{lc:x}}|unclear}}||{{#set:anthology=x}}}}}}|{{#arraymap:{{{audio anthology}}}|{{{separator|{{{seperator|,}}}}}} |x|''[[x|{{dau|x}}]]''}}}}</format></data>
<data source="publication"><label>Printed in:</label><format>{{{publication}}}{{#if:{{{publication|}}}|{{#set:issues={{{publication}}}}}|}}</format></data>
<data source="publication"><label>Printed in:</label><format>{{{publication}}}{{#if:{{{publication|}}}|{{#set:issues={{{publication}}}}}|}}</format></data>
<data source="release date"><label>Release date:</label><format>{{#if:{{{release date display|}}}|{{{release date display}}}{{dl/set|{{{release date}}}|Release}}|{{dl|{{{release date}}}|Release}}{{#if:{{{release date2|}}}|<br />{{dl/text|{{{release date2}}}}}}}{{#if:{{{release date3|}}}|<br />{{dl/text|{{{release date3}}}}}}}{{#if:{{{release date4|}}}|<br />{{dl/text|{{{release date4}}}}}}}{{#if:{{{release date5|}}}|<br />{{dl/text|{{{release date5}}}}}}}{{#if:{{{release date6|}}}|<br />{{dl/text|{{{release date6}}}}}}}{{#if:{{{release date7|}}}|<br />{{dl/text|{{{release date7}}}}}}}{{#if:{{{release date8|}}}|<br />{{dl/text|{{{release date8}}}}}}}{{#if:{{{release date9|}}}|<br />{{dl/text|{{{release date9}}}}}}}{{#if:{{{release date10|}}}|<br />{{dl/text|{{{release date10}}}}}}}}}{{{release date ref|}}}</format></data>
<data source="release date"><label>Release date:</label><format>{{#if:{{{release date display|}}}|{{{release date display}}}{{dl/set|{{{release date}}}|Release}}|{{dl|{{{release date}}}|Release}}{{#if:{{{release date2|}}}|<br />{{dl/text|{{{release date2}}}}}}}{{#if:{{{release date3|}}}|<br />{{dl/text|{{{release date3}}}}}}}{{#if:{{{release date4|}}}|<br />{{dl/text|{{{release date4}}}}}}}{{#if:{{{release date5|}}}|<br />{{dl/text|{{{release date5}}}}}}}{{#if:{{{release date6|}}}|<br />{{dl/text|{{{release date6}}}}}}}{{#if:{{{release date7|}}}|<br />{{dl/text|{{{release date7}}}}}}}{{#if:{{{release date8|}}}|<br />{{dl/text|{{{release date8}}}}}}}{{#if:{{{release date9|}}}|<br />{{dl/text|{{{release date9}}}}}}}{{#if:{{{release date10|}}}|<br />{{dl/text|{{{release date10}}}}}}}}}{{{release date ref|}}}</format></data>

Revision as of 07:34, 14 July 2024

Instructions for {{Infobox Story SMW}}
{{Infobox Story SMW}} is an adapation of {{Infobox Story}} that collects a large amount of additional data that can be accessed by other templates on other pages. One of the main things that this data is used for is to produce the additional information that forms the core of {{cite source}}. Therefore, this template is a requirement to use {{cite source}}. The data is also stored to Semantic MediaWiki, providing the potential for it to be used elsewhere by other templates in the future.

Usage

This template is used almost identically to {{Infobox Story}} with a few important changes. If you're converting a page from using {{Infobox Story}} to using this template, simply run through the steps below. If you're implementing this template on a new page, first setup this template like {{Infobox Story}} and then switch it over to this one with the steps below.

  • |writer= should be converted into an unlinked, comma separated list, if it is used. For example, "|writer=[[Malorie Blackman]] and [[Chris Chibnall]]" would become "|writer=Malorie Blackman, Chris Chibnall".
    • In more complex scenarios, such as when parentheticals and/or footnotes are used, or if {{il}} is used, |writer= should be set as above, without links, parentheticals, footnotes or templates like {{il}}. In addition, |writer display= should be set with the old text of |writer=, including all parentheticals, footnotes, templates and links that were used. This parameter will be used as the display text.
  • |publisher=, |publisher2= and |publisher3= should be merged into |publisher= as an unlinked, comma separated list, if they are used.
  • Links should be removed from |anthology=, |audio anthology= and |network=, if they are used. If there are multiple items for any of these fields, use a comma separated list.
  • If any of the individual items (even if it is the only item) in |writer=, |publisher=, |anthology=, |audio anthology= or |network= contain a comma, set |separator= to some other suitable deliminator, such as ";", and replace all commas used for separating items in each of those fields with this new separator.
  • Simple dab terms are automatically removed from the display text of the unlinked fields mentioned so far. In more complex scenarios, custom display text can be specified by adding "{{!}}" after the unlinked page name, followed by the display text. Note that any pipes ("|") that appear in the display text should also be replaced with "{{!}}". For example, to produce 2|entertain, you would type "2 entertain{{!}}2{{!}}entertain".
  • Including the text "unknown", "various" or "unclear" as one of the things listed in these comma-separated fields will cause that thing to not be autolinked. That allows for arbitrary wiki markup to be used, as long as one of these phrases are present. Additionally, "see authorship" has the same behaviour for |writer= only.
  • If these fields are detected to contain commas, their label will automatically be pluralised. You can force these labels to be pluralised by setting fields like |plural writer=, |plural publisher=, plural network=, etc. to any value.
  • For scenarios that are too complicated to represent with one of the above fields, set the problematic field to the text that should be saved to SMW and used in citations. Then, set the display text with a field like |writer display=, |publisher display=, |network display=, etc.
    • There is a depracated |contributors= that is the same as |writer display=, but that also sets |plural writer=. This is being phased out.
  • Links and dab terms should be removed from all date fields (such as |release date= and |broadcast date=) that are used. For example, "[[23 November (releases)|23 November]] - [[14 December (releases)|14 December]] [[1963 (releases)|1963]]" would become "23 November - 14 December 1963". For more details, see the documentation at {{date link}}.
    • If there are multiple dates or date ranges separated by commas or <br>s, or wrapped in {{il}}, split the field into multiple, numbered fields such as |release date=, |release date2=, |release date3=, etc. The same is true for other date fields (e.g. |broadcast date2=...). Note that only the original, un-numbered, field is saved to SMW and used in citations.
    • If the date is accompanied by a citation, you can add that by using |release date ref=, |broadcast date ref=, etc. This will add the contents of that field to the end of the date, or list of dates if multiple numbered fields are used.
    • For scenarios too complicated to represent with the above fields, set the primary date field (e.g. |release date=, |broadcast date=, etc.) to the date to be saved to SMW and used for citations. Then, set |release date display= (or |broadcast date display=, etc.) to the display text for the infobox.

Customising the additional information

As previously mentioned, data collected from this template is used to produce the additional information that forms the core of {{cite source}}. While this usually works fine without making any adjustments, sometimes it doesn't; in those cases, the additional information can be customised.

The source's series is normally taken from |range= or |series=, in that order of preference. If these fail to produce satisfactory text, custom series text can be set using |citation series=. This parameter is not displayed anywhere in the infobox: it's only used in {{cite source}}, and it can contain arbitrary wiki markup. Very common series overrides can be set globally to apply to all pages according to the documentation at Module:Cite source/series overrides.

The entire additional information text can be overridden fully using |citation text=. This parameter is not displayed anywhere in the infobox, only in {{cite source}}. It can contain arbitrary wiki markup.