Difference between revisions of "Template:ExternalLink"

From DDO Compendium
(Created page with "<noinclude>This template is used for False Life.Category:Template Used in this manner: <br><nowiki>{{ExternalLink|Type|Identifier|Label}}</nowiki><br> <br>Such that <nowi...")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This template is used for False Life.[[Category:Template]]
<noinclude>{{TemplateDocumentation
 
|name = ExternalLink
Used in this manner:
|description = This template is used top level templates to add youtube and forum links to the page.
<br><nowiki>{{ExternalLink|Type|Identifier|Label}}</nowiki><br>
|category=Shared Templates
<br>Such that <nowiki>{{ExternalLink|YouTube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}</nowiki> results in<br>
|example1 = <nowiki>{{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}</nowiki>
<br>{{ExternalLink|y|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}
|example1output = {{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}
<br><br>
|example2 = <nowiki>{{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}</nowiki>
'''Options for Type'''
|example2output = {{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}
* Forum or f - give the thread id as the identifier value: in https://www.ddo.com/forums/showthread.php/496168-DDO-Bonus-Days it is 496168
|example3 = <nowiki>{{ExternalLink|forumnew|fyi-vecna-unleashed-cannot-be-purchased.2450/#post-25716|Purchase Issue}}</nowiki>
* YouTube or y - give the video id as the identifier value: in https://www.youtube.com/watch?v=PTw5oHOi3VE it is PTw5oHOi3VE
|example3output = {{ExternalLink|forumnew|fyi-vecna-unleashed-cannot-be-purchased.2450/#post-25716|Purchase Issue}}
|parameter1name = Site Indicator
|parameter1description = This is an indicator of which site you want the link to go to.  Currently only YouTube and the DDO forums are supported.
|parameter1values =
* Youtube
* Forum - this is the old one
* forumNew
* DDO
|parameter2name = Identifier
|parameter2description = This is the identifier to the page
|parameter2values =
* For YouTube is the video id, which is usually the value after the v= in the url. <nowiki>https://www.youtube.com/?v=</nowiki><b>PTw5oHOi3VE</b>
* For the forums, it is the number right after the "showthread.php" value. <nowiki>https://www.ddo.com/forums/showthread.php/</nowiki><b>496050</b>-The-DDO-Chronicle-Issue-281
* for the new forums, it is everything after ?threads/ in the url
* For ddo, the path to the download.
|parameter3name = Link Text
|parameter3description = This is the text you want displayed to the user on the link.
}}
</noinclude>
</noinclude>
<onlyinclude>{{#switch: {{lc:{{{1}}}}}
<onlyinclude>{{#switch: {{lc:{{{1}}}}}
| forum |f = [https://www.ddo.com/forums/showthread.php/{{{2}}} {{{3}}}]
| forum = [https://forums-old.ddo.com/forums/showthread.php/{{{2}}} {{{3}}}]
| youtube |y = [https://www.youtube.com/watch?v={{{2}}} {{{3}}}]
| forumnew = [https://forums.ddo.com/index.php?threads/{{{2}}} {{{3}}}]
| youtube = [https://www.youtube.com/watch?v={{{2}}} {{{3}}}]
| ddo= [https://www.ddo.com/{{{2}}} {{{3}}}]
| #default = Not a valid type
| #default = Not a valid type
}}</onlyinclude>
}}</onlyinclude>

Latest revision as of 12:43, 27 July 2023

ExternalLink[edit]

This template is used top level templates to add youtube and forum links to the page.

Example Usage
{{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}Spyderwolf's YouTube Video Quest Walkthrough
{{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}The DDO Chronicle: Issue 281
{{ExternalLink|forumnew|fyi-vecna-unleashed-cannot-be-purchased.2450/#post-25716|Purchase Issue}}Purchase Issue

Usage[edit]

{{ExternalLink|(Site Indicator)|(Identifier)|(Link Text)}}

Parameter Documentation
Site IndicatorThis is an indicator of which site you want the link to go to. Currently only YouTube and the DDO forums are supported.
Possible Values:
  • Youtube
  • Forum - this is the old one
  • forumNew
  • DDO
IdentifierThis is the identifier to the page
Possible Values:
  • For YouTube is the video id, which is usually the value after the v= in the url. https://www.youtube.com/?v=PTw5oHOi3VE
  • For the forums, it is the number right after the "showthread.php" value. https://www.ddo.com/forums/showthread.php/496050-The-DDO-Chronicle-Issue-281
  • for the new forums, it is everything after ?threads/ in the url
  • For ddo, the path to the download.
Link TextThis is the text you want displayed to the user on the link.

Template

Ignore any errors below this line, The errors occur because there is no input into the template, in the template itself.


Not a valid type