Template:Reference page/superscript: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(added support for |language= parameter (has to be text only, because it can't be embedded into HTML as multilingual title attributes are not possible in HTML, and HTML elements (like another span) cannot be located inside attributes))
No edit summary
 
(29 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<!-- |wrap=n[o]/f[orced] |leadin=value |prefix=value |pp=value |where=value |quote=value |language=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap">{{{prefix|}}}<span title="{{{leadin|}}}: {{#invoke:String|replace|{{#invoke:Plain text|main|1={{{where|}}}|encode=false}}|"|&quot;}}{{#if:{{{quote|}}}|&#10;Quotation{{#if:{{{language|}}}| ({{{language|}}})}}: &quot;{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{quote|}}}}}|encode=false}}|"|&quot;}}&quot;{{#if:{{{translation|}}}|&#10;Translation: &quot;{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{translation}}}}}|encode=false}}|"|&quot;}}&quot;}}" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}">{{{pp|}}}{{{where|}}}</span>{{{suffix|}}}</sup>}}<noinclude>
<!-- Only for internal use: |wrap=n[o]/y[es]/f[orced] |leadin=value |prefix=value |pp=value |where=value |sup-where=value |quote-where=value |quote=value |language=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap">{{#if:{{{quote|}}}|{{{prefix|}}}}}<span title="<!--{{#invoke:String|replace|source={{#invoke:String|replace|source={{#invoke:String|replace|source=-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1={{{leadin|}}}: {{#if:{{{quote-where|}}}|{{{quote-where|}}}|{{{where|}}}}}|encode=false}}|charset=<>"}}<!--|"|&quot;}}|<|&lt;}}|>|&gt;}}-->{{#if:{{{quote|}}}|&#10;Quotation<!--{{#invoke:String|replace|source={{#invoke:String|replace|source={{#invoke:String|replace|source=-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1=&#58; &quot;{{{quote|}}}&quot;|encode=false}}|charset=<>"}}<!--|"|&quot;}}|<|&lt;}}|>|&gt;}}-->" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}">{{#if:{{{quote|}}}||{{{prefix|}}}}}<!--DEBUG: Take care of :;*# as first character here. This also breaks plainlinks/stripmarkers/catlinks testcases {{#invoke:String|replace|source=-->{{{pp|}}}{{{sup-where|}}}<!--| |&thinsp;}}-->{{#if:{{{quote|}}}||{{{suffix|}}}}}</span>{{#if:{{{quote|}}}|{{{suffix|}}}}}</sup>}}<noinclude>[[Category:Coding utility templates]]
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 21:29, 13 August 2024

Instructions for {{Reference page/superscript}}
This is a subtemplate, implementing the wikipedia:superscript info piece of Template:Rp for a single ref name.

Usage[[edit source]]

For internal use only:

|wrap=n[o]/y[es]/f[orced], |leadin=value, |prefix=value, |pp=value, |where=value, |sup-where=value, |quote-where=value, |quote=value, |suffix=value

See also[[edit source]]