Difference between revisions of "Template:ExternalLink"

From DDO Compendium
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>[[Category:Template]][[Category:Item Enchantment Template]]{{TemplateDocumentation
<noinclude>{{TemplateDocumentation
|name = ExternalLink
|name = ExternalLink
|description = This template is used top level templates to add youtube and forum links to the page.
|description = This template is used top level templates to add youtube and forum links to the page.
|category=Shared Templates
|example1 = <nowiki>{{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}</nowiki>
|example1 = <nowiki>{{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}</nowiki>
|example1output = {{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}
|example1output = {{ExternalLink|youtube|PTw5oHOi3VE|Spyderwolf's YouTube Video Quest Walkthrough}}
|example2 = <nowiki>{{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}</nowiki>
|example2 = <nowiki>{{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}</nowiki>
|example2output = {{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}
|example2output = {{ExternalLink|forum|496050|The DDO Chronicle: Issue 281}}
|example3 = <nowiki>{{ExternalLink|forumnew|fyi-vecna-unleashed-cannot-be-purchased.2450/#post-25716|Purchase Issue}}</nowiki>
|example3output = {{ExternalLink|forumnew|fyi-vecna-unleashed-cannot-be-purchased.2450/#post-25716|Purchase Issue}}
|parameter1name = Site Indicator
|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.  
|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 =  
|parameter1values =  
* Youtube
* Youtube
* Forum
* Forum - this is the old one
* forumNew
* DDO
|parameter2name = Identifier
|parameter2name = Identifier
|parameter2description = This is the identifier to the page
|parameter2description = This is the identifier to the page
|parameter2values =  
|parameter2values =  
* For YouTube is the video id, which is usually the value after the v= in the url. <nowiki>https://www.youtube.com/?v='''PTw5oHOi3VE'''</nowiki>
* 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/'''496050'''-The-DDO-Chronicle-Issue-281</nowiki>
* 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 = [https://www.ddo.com/forums/showthread.php/{{{2}}} {{{3}}}]
| forum = [https://forums-old.ddo.com/forums/showthread.php/{{{2}}} {{{3}}}]
| forumnew = [https://forums.ddo.com/index.php?threads/{{{2}}} {{{3}}}]
| youtube = [https://www.youtube.com/watch?v={{{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