User:Bongolium500/Sandbox 5: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
Line 31: Line 31:


====== Examples ======
====== Examples ======
<pre>([[PROSE]]: ''[[The Eight Doctors (novel)|]]'' {{exsource|series=BBC Eighth Doctor Adventures|publisher=BBC Books|year=1997}})</pre>
<pre>([[PROSE]]: ''[[The Eight Doctors (novel)|]]'' {{exsource|series=BBC Eighth Doctor Adventures|writer=Terrance Dicks|publisher=BBC Books|year=1997}})</pre>
([[PROSE]]: ''[[The Eight Doctors (novel)|The Eight Doctors]]'' {{user:Bongolium500/exsource|series=BBC Eighth Doctor Adventures|publisher=BBC Books|year=1997}})
([[PROSE]]: ''[[The Eight Doctors (novel)|The Eight Doctors]]'' {{user:Bongolium500/exsource|series=BBC Eighth Doctor Adventures|writer=Terrance Dicks|publisher=BBC Books|year=1997}})


<pre>([[PROSE]]: ''[[Our Tune (short story)|]]'' {{exsource|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|publisher=Obverse Books|year=2013}})</pre>
<pre>([[PROSE]]: ''[[Our Tune (short story)|]]'' {{exsource|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|writer=Ross Douglas|publisher=Obverse Books|year=2013}})</pre>
([[PROSE]]: ''[[Our Tune (short story)|Our Tune]]'' {{user:Bongolium500/exsource|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|publisher=Obverse Books|year=2013}})
([[PROSE]]: ''[[Our Tune (short story)|Our Tune]]'' {{user:Bongolium500/exsource|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|writer=Ross Douglas|publisher=Obverse Books|year=2013}})


<pre>([[PROSE]]: ''[[Rose (novelisation)|]]'' {{user:Bongolium500/exsource|series=Target novelisation|publisher=Target Books|year=2018}})</pre>
<pre>([[PROSE]]: ''[[Rose (novelisation)|]]'' {{user:Bongolium500/exsource|series=Target novelisation|writer=Russell T Davies|publisher=Target Books|year=2018}})</pre>
([[PROSE]]: ''[[Rose (novelisation)|Rose]]'' {{user:Bongolium500/exsource|series=Target novelisation|publisher=Target Books|year=2018}})
([[PROSE]]: ''[[Rose (novelisation)|Rose]]'' {{user:Bongolium500/exsource|series=Target novelisation|writer=Russell T Davies|publisher=Target Books|year=2018}})


<pre>([[TV]: ''[[Rose (TV story)|]]'' {{exsource|series=Doctor Who|series#=1|year=2005}})</pre>
<pre>([[TV]: ''[[Rose (TV story)|]]'' {{exsource|series=Doctor Who|series#=1|writer=Russell T Davies|year=2005}})</pre>
([[TV]]: ''[[Rose (TV story)|Rose]]'' {{user:Bongolium500/exsource|series=Doctor Who|series#=1|year=2005}})
([[TV]]: ''[[Rose (TV story)|Rose]]'' {{user:Bongolium500/exsource|series=Doctor Who|series#=1|writer=Russell T Davies|year=2005}})


<pre>([[TV]]: ''[[A Girl's Best Friend (TV story)|]]'' {{exsource|series=K9 and Company|year=1981}})</pre>
<pre>([[TV]]: ''[[A Girl's Best Friend (TV story)|]]'' {{exsource|series=K9 and Company|writer=Terence Dudley|year=1981}})</pre>
([[TV]]: ''[[A Girl's Best Friend (TV story)|A Girl's Best Friend]]'' {{user:Bongolium500/exsource|series=K9 and Company|year=1981}})
([[TV]]: ''[[A Girl's Best Friend (TV story)|A Girl's Best Friend]]'' {{user:Bongolium500/exsource|series=K9 and Company|writer=Terence Dudley|year=1981}})


<pre>([[AUDIO]]: ''[[Bang-Bang-a-Boom! (audio story)|Bang-Bang-a-Boom!]]'' {{exsource|series=Main Range|publisher=Big Finish Productions|year=2002}})</pre>
<pre>([[AUDIO]]: ''[[Bang-Bang-a-Boom! (audio story)|Bang-Bang-a-Boom!]]'' {{exsource|series=Main Range|writer=Gareth Roberts|writer2=Clayton Hickman|publisher=Big Finish Productions|year=2002}})</pre>
([[AUDIO]]: ''[[Bang-Bang-a-Boom! (audio story)|Bang-Bang-a-Boom!]]'' {{user:Bongolium500/exsource|series=Main Range|publisher=Big Finish Productions|year=2002}})
([[AUDIO]]: ''[[Bang-Bang-a-Boom! (audio story)|Bang-Bang-a-Boom!]]'' {{user:Bongolium500/exsource|series=Main Range|writer=Gareth Roberts|writer2=Clayton Hickman|publisher=Big Finish Productions|year=2002}})


<pre>([[AUDIO]]: ''[[Lost Property (audio story)|Lost Property]]'' {{exsource|series=Stranded (audio series)|anthology=Stranded 1|publisher=Big Finish Productions|year=2020}})</pre>
<pre>([[AUDIO]]: ''[[Lost Property (audio story)|Lost Property]]'' {{exsource|series=Stranded (audio series)|anthology=Stranded 1|writer=Matt Fitton|publisher=Big Finish Productions|year=2020}})</pre>
([[AUDIO]]: ''[[Lost Property (audio story)|Lost Property]]'' {{user:Bongolium500/exsource|series=Stranded (audio series)|anthology=Stranded 1|publisher=Big Finish Productions|year=2020}})
([[AUDIO]]: ''[[Lost Property (audio story)|Lost Property]]'' {{user:Bongolium500/exsource|series=Stranded (audio series)|anthology=Stranded 1|writer=Matt Fitton|publisher=Big Finish Productions|year=2020}})


<pre>([[COMIC]]: ''[[Revolutions of Terror (comic story)|]]'' {{exsource|first=10D 1|last=10D 3|series=Doctor Who: The Tenth Doctor|year=2014}})</pre>
<pre>([[COMIC]]: ''[[Revolutions of Terror (comic story)|]]'' {{exsource|first=10D 1|last=10D 3|series=Doctor Who: The Tenth Doctor|writer=Nick Abadzis|year=2014}})</pre>
([[COMIC]]: ''[[Revolutions of Terror (comic story)|Revolutions of Terror]]'' {{user:Bongolium500/exsource|first=10D 1|last=10D 3|series=Doctor Who: The Tenth Doctor|year=2014}})
([[COMIC]]: ''[[Revolutions of Terror (comic story)|Revolutions of Terror]]'' {{user:Bongolium500/exsource|first=10D 1|last=10D 3|series=Doctor Who: The Tenth Doctor|writer=Nick Abadzis|year=2014}})


=== V2 - Automated ===
=== V2 - Automated ===

Revision as of 19:39, 21 June 2021

Here are some attempts at making more detailed source refences. A quite random example has been chosen to be used here.

A comparison of most variations can be found here. However, due to a lack of parity between extensions on this and the test wiki, some functionality only works on Tardis and so, where possible, templates are shown here.

Current

Her birthday was the 16th of August. (PROSE: Our Tune)

Her birthday was the 16th of August. ([[PROSE]]: [[Our Tune (short story)|]])

Method One - Collapsible

Versions 2 and 3 use version 1. Therefore, even if only version 2 or 3's functionality is wanted, version 1 also has to be added to the wiki. This is in order to make maintaining and updating the templates easier. If it is absolutely required, versions 2 and 3 can be made to work independently.

V1 - Manual

Her birthday was the 16th of August. (PROSE: Our Tune + Part of Iris: Fifteen from Iris Wildthyme published by Obverse Books in 2013.)

Her birthday was the 16th of August. ([[PROSE]]: ''[[Our Tune (short story)|Our Tune]]'' <sup><span class="mw-customtoggle-Our_Tune">+</span> <span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-Our_Tune">Part of ''[[Iris: Fifteen (anthology)|Iris: Fifteen]]'' from ''[[Iris Wildthyme (series)|]]'' published by [[Obverse Books]] in [[2013 (releases)|2013]].</span></sup>)

Issues

According to MediaWiki's website, this can be confusing for users using a screen reader. Every collapsible is open for a short amount of time while the page loads before closing which, on a larger page using this a lot, would cause the page to jump a lot.

As a Template

If formatting looks strange here, it is because it is only designed to look good in the editor without <pre></pre>.

<sup><span class="mw-customtoggle-{{#vardefineecho:id|{{#expr:{{#var:id|0}}+1}}}}">+</span> <span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{#var:id}}">{{#if:{{{anthology|}}}|Part of ''[[{{{anthology|}}}|{{dau|{{{anthology}}}}}]]'' <!--          --><!-- -->{{#if:{{{series|}}}|from ''[[{{{series|}}}|{{dau|{{{series}}}}}]]''}} <!--                                                  --><!-- -->{{#if:{{{series#|}}}|[[series {{{series#}}} ({{{series}}})|series {{{series#|}}}]]}} <!--                                   --><!-- -->{{#if:{{{publisher|}}}|published|released}}{{#if:{{{network|}}}|first broadcast}}<!--                                       --><!--  -->|{{#if:{{{series|}}}|Part of ''[[{{{series|}}}|{{dau|{{{series}}}}}]]'' <!--                                               --><!--   -->{{#if:{{{series#|}}}|[[series {{{series#}}} ({{{series}}})|series {{{series#|}}}]]}} <!--                                 --><!--   -->{{#if:{{{publisher|}}}|published|released}} <!--                                                                          --><!--    -->|{{#if:{{{publisher|}}}|Published|released}}}}}} <!--                                                                    -->{{#if:{{{publisher|}}}|by [[{{{publisher}}}|{{dau|{{{publisher}}}}}]]}} <!--                                                        -->{{#if:{{{year|}}}|in [[{{{year}}} (releases)|{{{year}}}]]}}.</span></sup>

Usage
{{exsource|anthology=|series=|series#=|publisher=|year=}}

All variables are optional. Please do not link. Please include dab terms for anthology, series and publisher but not year. The ID can be any string. However, it must not be used for this template anywhere else on the page.

Examples
([[PROSE]]: ''[[The Eight Doctors (novel)|]]'' {{exsource|series=BBC Eighth Doctor Adventures|writer=Terrance Dicks|publisher=BBC Books|year=1997}})

(PROSE: The Eight Doctors + Part of the series BBC Eighth Doctor Adventures written by Terrance Dicks and published by BBC Books in 1997.)

([[PROSE]]: ''[[Our Tune (short story)|]]'' {{exsource|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|writer=Ross Douglas|publisher=Obverse Books|year=2013}})

(PROSE: Our Tune + Part of the series Iris Wildthyme written by Ross Douglas and published by Obverse Books in 2013.)

([[PROSE]]: ''[[Rose (novelisation)|]]'' {{user:Bongolium500/exsource|series=Target novelisation|writer=Russell T Davies|publisher=Target Books|year=2018}})

(PROSE: Rose + Part of the series Target novelisation written by Russell T Davies and published by Target Books in 2018.)

([[TV]: ''[[Rose (TV story)|]]'' {{exsource|series=Doctor Who|series#=1|writer=Russell T Davies|year=2005}})

(TV: Rose + Part of the series Doctor Who written by Russell T Davies and released in 2005.)

([[TV]]: ''[[A Girl's Best Friend (TV story)|]]'' {{exsource|series=K9 and Company|writer=Terence Dudley|year=1981}})

(TV: A Girl's Best Friend + Part of the series K9 and Company written by Terence Dudley and released in 1981.)

([[AUDIO]]: ''[[Bang-Bang-a-Boom! (audio story)|Bang-Bang-a-Boom!]]'' {{exsource|series=Main Range|writer=Gareth Roberts|writer2=Clayton Hickman|publisher=Big Finish Productions|year=2002}})

(AUDIO: Bang-Bang-a-Boom! + Part of the series Main Range written by Gareth Roberts and Clayton Hickman and published by Big Finish Productions in 2002.)

([[AUDIO]]: ''[[Lost Property (audio story)|Lost Property]]'' {{exsource|series=Stranded (audio series)|anthology=Stranded 1|writer=Matt Fitton|publisher=Big Finish Productions|year=2020}})

(AUDIO: Lost Property + Part of the series Stranded written by Matt Fitton and published by Big Finish Productions in 2020.)

([[COMIC]]: ''[[Revolutions of Terror (comic story)|]]'' {{exsource|first=10D 1|last=10D 3|series=Doctor Who: The Tenth Doctor|writer=Nick Abadzis|year=2014}})

(COMIC: Revolutions of Terror + Part of the series Doctor Who: The Tenth Doctor written by Nick Abadzis and released in 2014 throughout issues 10D 1 - 10D 3.)

V2 - Automated

This should be visually identical to the above. However, it needs a fair amount of prior work to function correctly. Therefore, it does not work at all in its current state. There is more information on this in this section.

Her birthday was the 16th of August. (PROSE: Our Tune + Part of [[Iris: Fifteen (anthology)]] from [[Iris Wildthyme]] published by [[]] in [[]].)

Her birthday was the 16th of August. ([[PROSE]]: ''[[Our Tune (short story)|Our Tune]]'' <sup><span class="mw-customtoggle-Our_Tune">+</span> <span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-Our_Tune">Part of ''{{da|{{#show:Our Tune (short story)|?anthology}}}}'' from ''{{da|{{#show:Our Tune (short story)|?series}}}}'' published by ''{{da|{{#show:Our Tune (short story)|?publisher}}}}'' in ''{{da|{{#show:Our Tune (short story)|?year}}}}''.</span></sup>)

Issues

According to MediaWiki's website, this can be confusing for users using a screen reader. Every collapsible is open for a short amount of time while the page loads before closing which, on a larger page using this a lot, would cause the page to jump a lot.

For this to work at all, a lot of prior work needs to be done with Semantic MediaWiki annotations. By far the best solution (in terms of future-proofing and best practises) is too update Infobox Story. However, this would require changing every page using this template which comes out to 500

pages. It might be possible to do this without changing every page, but it wouldn't be as good. Having said all of this, I 100% think putting in this work would be worth it as it would make some other cool stuff possible as well.

As a Template

{{Dai|{{{s|}}}}} <sup><span class="mw-customtoggle-{{{id|}}}">+</span> <span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{id|}}}">{{#if:{{#show:{{{s|}}}|?anthology}}|Part of ''[[{{#show:{{{s|}}}|?anthology|link=none}}|{{dau|{{#show:{{{s|}}}|?anthology|link=none}}}}]]'' {{#if:{{#show:{{{s|}}}|?series}}|from ''[[{{#show:{{{s|}}}|?series|link=none}}|{{dau|{{#show:{{{s|}}}|?series|link=none}}}}]]''}} {{#if:{{#show:{{{s|}}}|?series number|link=none}}|[[series {{#show:{{{s|}}}|?series number|link=none}} ({{#show:{{{s|}}}|?series|link=none}})|series {{#show:{{{s|}}}|?series number|link=none}}]]}} {{#if:{{#show:{{{s|}}}|?publisher}}|published}}{{#if:{{#show:{{{s|}}}|?premiere network}}|broadcast}}|{{#if:{{#show:{{{s|}}}|?series|link=none}}|Part of ''[[{{#show:{{{s|}}}|?series|link=none}}|{{dau|{{#show:{{{s|}}}|?series|link=none}}}}]]'' {{#if:{{#show:{{{s|}}}|?series number}}|[[series {{#show:{{{s|}}}|?series number|link=none}} ({{#show:{{{s|}}}|?series|link=none}})|series {{#show:{{{s|}}}|?series number|link=none}}]]}} {{#if:{{#show:{{{s|}}}|?publisher}}|published}}{{#if:{{#show:{{{s|}}}|?premiere network}}|broadcast}}|{{#if:{{#show:{{{s|}}}|?publisher}}|Published}}{{#if:{{#show:{{{s|}}}|?premiere network}}|Broadcast}}}}}} {{#if:{{#show:{{{s|}}}|?publisher}}|by [[{{#show:{{{s|}}}|?publisher|link=none}}|{{dau|{{#show:{{{s|}}}|?publisher|link=none}}}}]]}}{{#if:{{#show:{{{s|}}}|?premiere network}}|by [[{{#show:{{{s|}}}|?premiere network|link=none}}|{{dau|{{#show:{{{s|}}}|?premiere network|link=none}}}}]]}} {{#if:{{#show:{{{s|}}}|?year}}|in [[{{#show:{{{s|}}}|?year|link=none}}|{{dau|{{#show:{{{s|}}}|?year|link=none}}}}]]}}.</span></sup>

This template requires version 1's template to also be added to the wiki.

Usage
{{exs|s=}}

S is the story being used as a source and is therefore required. Please give it unlinked and with dab terms.

Example
([[PROSE]]: {{exs|s=Our Tune (short story)}})

V3 - Automatic With Manual Overrides

In theory, this template will produce identical results to the above 2. In fact, at its most basic, it is the above. However, it also allows for manual overrides to the automatically generated details.

Due to its nature, it will only work fully as a template and, as such, I cannot show it in non-template form.

Issues

According to MediaWiki's website, this can be confusing for users using a screen reader. Every collapsible is open for a short amount of time while the page loads before closing which, on a larger page using this a lot, would cause the page to jump a lot.

For this to work at all, a lot of prior work needs to be done with Semantic MediaWiki annotations. By far the best solution (in terms of future-proofing and best practises) is too update Infobox Story. However, this would require changing every page using this template which is 500

pages. It might be possible to do this without changing every page, but it wouldn't be as good. Having said all of this, I 100% think putting in this work would be worth it as it would make some other cool stuff possible as well. Additionally, it is worth noting this template could still be used in manual mode 

As a Template

{{Dai|{{{s|}}}}} <sup><span class="mw-customtoggle-{{{id|}}}">+</span> <span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{id|}}}">{{#if:{{{anthology|{{#show:{{{s|}}}|?anthology}}}}}|Part of ''[[{{{anthology|{{#show:{{{s|}}}|?anthology|link=none}}}}}|{{dau|{{{anthology|{{#show:{{{s|}}}|?anthology|link=none}}}}}}}]]'' {{#if:{{{series|{{#show:{{{s|}}}|?series}}}}}|from ''[[{{{series|{{#show:{{{s|}}}|?series|link=none}}}}}|{{dau|{{{series|{{#show:{{{s|}}}|?series|link=none}}}}}}}]]''}} {{#if:{{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}}|[[series {{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}} ({{{series|{{#show:{{{s|}}}|?series|link=none}}}}})|series {{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}}]]}} {{#if:{{{publisher|{{#show:{{{s|}}}|?publisher|link=none}}}}}|published}}{{#if:{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}|first broadcast}}|{{#if:{{{series|{{#show:{{{s|}}}|?series|link=none}}}}}|Part of ''[[{{{series|{{#show:{{{s|}}}|?series|link=none}}}}}|{{dau|{{{series|{{#show:{{{s|}}}|?series|link=none}}}}}}}]]'' {{#if:{{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}}|[[series {{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}} ({{{series|{{#show:{{{s|}}}|?series|link=none}}}}})|series {{{series#|{{#show:{{{s|}}}|?series number|link=none}}}}}]]}} {{#if:{{{publisher|{{#show:{{{s|}}}|?publisher|link=none}}}}}|published}}{{#if:{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}|first broadcast}}|{{#if:{{{publisher|}}}|Published}}{{#if:{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}|First broadcast}}}}}} {{#if:{{{publisher|{{#show:{{{s|}}}|?publisher|link=none}}}}}|by [[{{{publisher|{{#show:{{{s|}}}|?publisher|link=none}}}}}|{{dau|{{{publisher|{{#show:{{{s|}}}|?publisher|link=none}}}}}}}]]}}{{#if:{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}|on [[{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}|{{dau|{{{network|{{#show:{{{s|}}}|?premiere network|link=none}}}}}}}]]}} {{#if:{{{year|{{#show:{{{s|}}}|?year|link=none}}}}}|in [[{{{year|{{#show:{{{s|}}}|?year|link=none}}}}}|{{dau|{{{year|{{#show:{{{s|}}}|?year|link=none}}}}}}}]]}}.</span></sup>

This template requires version 1's template to also be added to the wiki.

Usage
{{exts|s=|anthology=|series=|publisher=|year=}}

S is the story being used as a source and is, therefore, required. Please give it unlinked and with dab terms. Anthology, series, publisher and year are optional. They should only be used if the relevant Semantic MediaWiki annotations are incorrect or not present. In theory, they should never need using. The one exception I can think of is year, which could be used when the specific instance of a story being referenced had a minor change that didn't warrant a new page. Anthology, series, publisher and year must be unlinked with dab terms (for year this is (releases)).

Example

Fully automatic:

([[PROSE]]: {{exst|s=Our Tune (short story)}})

Fully manual:

([[PROSE]]: {{exst|s=Our Tune (short story)|anthology=Iris: Fifteen (anthology)|series=Iris Wildthyme (series)|publisher=Obverse Books|year=2013 (releases)}}}})

Method Two - Tooltip

V1 - Manual

Her birthday was the 16th of August. (PROSE: Our Tune ·)

Her birthday was the 16th of August. ([[PROSE]]: ''[[Our Tune (short story)|Our Tune]]'' <span title="Part of Iris: Fifteen from Iris Wildthyme published by Obverse Books in 2013.">·</span>)

Issues

This does not work at all on mobile, even if you are on desktop view. Links can't be included, nor can text be italicised.