Template:Infobox Story SMW/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
Line 1: Line 1:
== Properties used ==
'''{{tlx|{{PAGENAME}}}}''' is an adapation of {{tlx|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 {{tlx|cite source}}. Therefore, this template is a '''requirement''' to use {{tlx|cite source}}. The data is also stored to [[T:SMW|Semantic MediaWiki]], providing the potential for it to be used elsewhere by other templates in the future.
* [[Property:Pagename]] - [[Special:Types/Text]]
* [[Property:Anthology]] - [[Special:Types/Page]]
* [[Property:Issues]] - [[Special:Types/Text]] (needs to be text due to potential edge cases that can occur with comics)
* [[Property:Season]] - already used in infobox
* [[Property:Range]] - already used in infobox
* [[Property:Audio series]] - already used in infobox
* [[Property:Writer]]
* [[Property:Publisher]] - already used in infobox
* [[Property:Release date]]
* [[Property:Series]] - [[Special:Types/Text]] (needs to be text due to the fact that the field that provides this property is free-form)
* [[Property:Novelisation of]] - [[Special:Types/Page]]
* [[Property:Adapted from]] - [[Special:Types/Page]]
* [[Property:Citation series]] - [[Special:Types/Text]] (needs to be text due to the fact that the field that provides this property is free-form)
* [[Property:Premiere network]]


== Differences in usage ==
== Usage ==
* Links should be removed from <nowiki>{{{anthology}}}</nowiki>, <nowiki>{{{audio anthology}}}</nowiki> and <nowiki>{{{network}}}</nowiki>.
This template is used almost identically to {{tlx|Infobox Story}} with a few important changes. If you're converting a page from using {{tlx|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 {{tlx|Infobox Story}} and then switch it over to this one with the steps below.
* Links should be removed from <nowiki>{{{writer}}}</nowiki>. If there are a multiple, a non-linking and comma separated list should be used. Display text for each item can be specified using <nowiki>{{!}}</nowiki> between the page name and the display text. Simple dabs are automatically removed from the display.
** In cases such as ''[[The Book of the War (novel)|The Book of the War]]'' where the writers field is too complex (such as with "(uncredited)" notes, references or the use of {{tlx|il}}), <nowiki>{{{contributors}}}</nowiki> should be set with the desired display text while <nowiki>{{{writer}}}</nowiki> is a simple list as described above with no bracketed notes, references or listing templates.
* <nowiki>{{{publisher}}}</nowiki>, <nowiki>{{{publisher2}}}</nowiki> and <nowiki>{{{publisher3}}}</nowiki> should be merged into just <nowiki>{{{publisher}}}</nowiki> as a comma seperated list. This also means that more then 3 publishers can be specified. Display text can be specified using <nowiki>{{!}}</nowiki> between the page name and the display text. Simple dabs are automatically removed from the display.
* If a anything that would otherwise be in a one of the 2 comma seperated list detailed above contains a comma in it's page name or display text, <nowiki>{{{seperator}}}</nowiki> should be specified as a suitable seperator (such as ";") for both of the 2 lists. The separating commas in these lists should be changed to the new specified seperator.
* Links should be removed from '''all''' date fields (such as <nowiki>{{{release date}}}</nowiki> and <nowiki>{{{broadcast date}}}</nowiki>) in accordance with the documentation found at {{tlx|Date link}}.
* If <nowiki>{{{range}}}</nowiki>, <nowiki>{{{series in range}}}</nowiki> and <nowiki>{{{series}}}</nowiki> offer no suitable series for a citation or if the series is more complicated then can be entered into any of these fields (in the case where there are multiple series, for example), <nowiki>{{{citation series}}}</nowiki> should be set as an override. This field is not displayed in the infobox.


== Performance tests ==
* <tt>|writer=</tt> should be converted into an unlinked, comma separated list, if it is used. For example, "<tt><nowiki>|writer=[[Malorie Blackman]] and [[Chris Chibnall]]</nowiki></tt>" would become "<tt>|writer=Malorie Blackman, Chris Chibnall</tt>".
Values collected over 5 page previews from the parser profiling data dropdown.
** In more complex scenarios, such as when parentheticals and/or footnotes are used, of if {{tlx|il}} is used, <tt>|writer=</tt> should be set as above, without links, parentheicals, footnotes or templates like {{tlx|il}}. In addition, <tt>|contributors=</tt> should be set with the old text of <tt>|writer=</tt>, including all parentheticals, footnotes, templates and links that were used. This parameter will be used as the display text.
{| class="wikitable"
* <tt>|publisher=</tt>, <tt>|publisher2=</tt> and <tt>|publisher3=</tt> should be merged into <tt>|publisher=</tt> as an unlinked, comma separated list, if they are used.
! Page || {{tlx|Infobox Story}} || This infobox || Difference
* If any of the individual items (even if it is the only item) in either <tt>|writer=</tt> or <tt>|publisher=</tt> contain a comma, set <tt>|seperator=</tt> to some other suitable deliminator, such as ";", and replace all commas used for separating items in both <tt>|writer=</tt> and <tt>|publisher</tt> with this new separator.
|-
* Links should be removed from <tt>|anthology=</tt>, <tt>audio anthology=</tt> and <tt>|network=</tt>, if they are used.
|[[Skywatch-7 (comic story)]]
* Simple [[T:DAB|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 "<nowiki>{{!}}</nowiki>" 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 "<nowiki>{{!}}</nowiki>". For example, to produce [[2 entertain|2|entertain]], you would type "<tt><nowiki>2 entertain{{!}}2{{!}}entertain</nowiki></tt>".
|Average CPU time usage: 0.205s<br />Average real time usage: 0.234
* Links and dab terms should be removed from all date fields (such as <tt>|release date=</tt> and <tt>|broadcast date=</tt>) that are used. For example, "<tt><nowiki>[[23 November (releases)|23 November]] - [[14 December (releases)|14 December]] [[1963 (releases)|1963]]</nowiki></tt>" would become "<tt>23 November - 14 December 1963</tt>". For more details, see the documentation att {{tlx|date link}}.
|0.233s<br />0.277s
 
| +0.072s<br />+0.043s
== Customising the additional information ==
|}
As previously mentioned, data collected from this template is used to produce the additional information that forms the core of {{tlx|cite source}}. While this usually works fine without making any adjustments, it doesn't always and, in those cases, the additioonal information can be customised.  
 
The source's series is normally taken from <tt>|range=</tt> or <tt>|series=</tt>, in that order of preference. If these fail to produce satisfactory text, custom series text can be set using <tt>|citation series=</tt>. This parameter is not displayed anywhere in the infobox, only being used in {{tlx|cite source}}, and can contain arbritary wiki markup. Very common series overides can be set globally to apply to all pages according to the documentation at [[Module:Bongolium500/story cite/series overides]].
 
The entire additional information text can be overided fully using <tt>|citation text=</tt>. This parameter is not displayed anywhere in the infobox, only being used in {{tlx|cite source}}, and can contain arbritary wiki markup.


<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 20:19, 9 March 2023

{{Infobox Story SMW/doc}} 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, of if {{il}} is used, |writer= should be set as above, without links, parentheicals, footnotes or templates like {{il}}. In addition, |contributors= 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.
  • If any of the individual items (even if it is the only item) in either |writer= or |publisher= contain a comma, set |seperator= to some other suitable deliminator, such as ";", and replace all commas used for separating items in both |writer= and |publisher with this new separator.
  • Links should be removed from |anthology=, audio anthology= and |network=, if they are used.
  • 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".
  • 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 att {{date link}}.

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, it doesn't always and, in those cases, the additioonal 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, only being used in {{cite source}}, and can contain arbritary wiki markup. Very common series overides can be set globally to apply to all pages according to the documentation at Module:Bongolium500/story cite/series overides.

The entire additional information text can be overided fully using |citation text=. This parameter is not displayed anywhere in the infobox, only being used in {{cite source}}, and can contain arbritary wiki markup.