Template:Hastranscript: Difference between revisions

From RuneRealm Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "<includeonly>{{#switch:{{lc:{{{transclude}}}}}|y|yes={{#invoke:hastranscript|main}}|n|no|#default={{#if:{{{2|}}}|{{Hastranscript/t|{{{1|}}}|{{{2|}}}}}|{{Hastranscript/t|{{{1|}}}}}}}}}</includeonly><noinclude>{{/doc}}</noinclude>")
 
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>{| class="messagebox hasdialogue" style="border: 0;"
<includeonly>{{#switch:{{lc:{{{transclude}}}}}|y|yes={{#invoke:hastranscript|main}}|n|no|#default={{#if:{{{2|}}}|{{Hastranscript/t|{{{1|}}}|{{{2|}}}}}|{{Hastranscript/t|{{{1|}}}}}}}}}</includeonly><noinclude>{{/doc}}</noinclude>
| class="center" | {{#switch: {{lc: {{{1}}} }}
| #default = This article has an associated transcript page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for the transcript.
| npc = This article on an NPC has an associated dialogue page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for a transcript of possible conversations with this NPC.{{#vardefine:speaksincount|{{#ask:[[Transcript:+]][[Transcript NPCs::{{{name|{{PAGENAME}}}}}]][[Display title of::!Dialogue for {{{name|{{PAGENAME}}}}}]]|format=count}}}}{{#ifexpr: {{#var:speaksincount}} > 0|<br>'''[{{SERVER}}/w/Special:Ask?limit=500&q={{URLENCODE:[[Transcript:+]] [[Transcript NPCs::{{PAGENAME}}]] [[Display title of::!Dialogue for {{PAGENAME}}]]}}&p=format=ul Click here]''' for a list of other transcripts that this NPC speaks in.}}
| pet = This article on a pet has an associated dialogue page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for a transcript of possible conversations with this pet.
| quest = This article on a quest has an associated dialogue page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for a transcript of possible conversations encountered throughout the quest.{{#ifexist:Transcript:{{PAGENAME}}/Journal|<br>'''[[Transcript:{{PAGENAME}}/Journal|Click here]]''' for a transcript of the quest's journal entry.}}
| miniquest = This article on a miniquest has an associated dialogue page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for a transcript of possible conversations encountered throughout the miniquest.{{#ifexist:Transcript:{{PAGENAME}}/Journal|<br>'''[[Transcript:{{PAGENAME}}/Journal|Click here]]''' for a transcript of the miniquest's journal entry.}}
| event = This article on an event has an associated dialogue page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for a transcript of possible conversations encountered throughout the event.
| item = This article on an item has an associated transcript page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for the transcript.
| scenery = This article on scenery has an associated transcript page.<br>'''[[{{{2|Transcript:{{PAGENAME}}}}}|Click here]]''' for the transcript.
}}
|}<!--
{{#switch: {{lc:{{{1|}}}}}
| npc = {{#ifexpr: {{#var:speaksincount}} > 0 |
<table class="messagebox hasdialogue speaksin" style="border: 0;padding: 0 10px;">
<td><div style="text-align: center;padding: 0.2em 0;">Transcripts {{{name|{{PAGENAME}}}}} speaks in:</div><hr><div class="{{#ifexpr: {{#var:speaksincount}} > 1 |speaksin-list|}}" style="padding-bottom: 0.5em;">{{#ask:
[[Transcript:+]]
[[Transcript NPCs::{{{name|{{PAGENAME}}}}}]]
[[Display title of::!Dialogue for {{{name|{{PAGENAME}}}}}]]
|format=ul
|default=<div style="text-align: center; column-span: all;">{{{name|{{PAGENAME}}}}} does not speak in any other dialogues (currently transcribed on the wiki).</div>
}}</div></td></table>}}
|}}--></includeonly><noinclude>{{/doc}}</noinclude>

Revision as of 00:30, 17 October 2024

Template documentation
This documentation is transcluded from Template:Hastranscript/doc. [edit] [history] [purge]

The {{Hastranscript}} template is used to indicate and link to/transclude a transcript page for any given article.

Usage

{{hastranscript|type|link}}

{{hastranscript|transclude=yes}}
{{hastranscript|page|transclude=yes}}
{{hastranscript|page1|page2|...|transclude=yes}}

Parameters

There are two forms of usage for hastranscript. The first generates a messagebox linking to the full transcript page (and that's it); this box is generated by Template:Hastranscript/t. The second will transclude the contents of the transcript page onto the current page; this should be used for shorter transcripts, generally.

Link box

  • type - Optional (required if specifying link). Possible types are:
    • npc - This option also adds a link to a list of other transcripts (currently available on the wiki) the NPC speaks in; the list is populated via Template:Transcript list.
    • pet
    • quest
    • miniquest
    • event
    • item
    • scenery
  • link - Optional. If the dialogue page is not found at Transcript:{{PAGENAME}} (which should only be the case in exceptional circumstances), used in place of the default link.

Transclusion

  • transclude=yes - required to enable transclusion
  • page - optional, the name of the page to transclude (without 'Transcript:'); will default to {{PAGENAME}} if not specified
    • page1, page2, ..., pageN - multiple pages to transclude, if desired

Examples

Link box

{{hastranscript}}
produces:
This article has an associated transcript page.
Click here for the transcript.
{{hastranscript|npc}}
produces:
This article on an NPC has an associated dialogue page.
Click here for a transcript of possible conversations with this NPC.Expression error: Unrecognized word "span".

Transclusion

{{hastranscript|Lift manual|transclude=yes}}
produces:
This article has an associated transcript page.
Click here for the transcript.

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

This template is used to indicate and link to a dialogue page for any given article.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

The type of article the dialogue belongs to (one of: npc, pet, quest, miniquest, event, item). When the template is transcluding, this should be the Transcript page name instead.

Example
npc
Lineoptional
22

Link to the dialogue page if it is not Transcript:{{PAGENAME}} (this should only be needed in exceptional circumstances)

Lineoptional
transcludetransclude

Switch this template into transclusion mode. See documentation for details.

Example
yes
Booleanoptional