Link/External – Template
Lou Montana (talk | contribs) m (Fix examples) |
Lou Montana (talk | contribs) (Add Steam & Wiktionary link icon) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{link|}}} | <includeonly>{{#if: {{{link|}}} | ||
| | | | ||
{{# | {{#switch:1 | ||
<!-- web.archive.org --> | |||
|{{#if: | |||
{{#pos:{{{link}}}|web.archive.org}} | |||
|1|0}}= <span title="web.archive.org backup">{{#if: {{{text|}}} | [{{#replace:{{{link}}}| |_}} {{{text}}}] | {{#replace:{{{link}}}| |_}} }} <sub style="font-size: .8em">(archive)</sub></span> | |||
<!-- Wikipedia / Wiktionary --> | |||
|{{#if: | |||
{{#pos:{{{link}}}|wikipedia.org}} | |||
|1|0}}= <span class="wikipedia" title="{{#if:{{#explode:{{{link}}}|/wiki/|1}}|Read the '{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_| }}' Wikipedia article|Access Wikipedia}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/wiki/|1}}|{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_| }}|{{{link}}}}}}}]</span> | |||
|{{#if: | |||
{{#pos:{{{link}}}|wiktionary.org}} | |||
|1|0}}= <span class="wikipedia" title="{{#if:{{#explode:{{{link}}}|/wiki/|1}}|Read the '{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_| }}' Wiktionary article|Access the Wiktionary}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/wiki/|1}}|{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_| }}|{{{link}}}}}}}]</span> | |||
<!-- Steam --> | |||
|{{#if: | |||
{{#pos:{{{link}}}|steampowered.com}} | |||
{{#pos:{{{link}}}|steamcommunity.com}} | |||
|1|0}}= <span class="steam" title="{{#if:{{#pos:{{{link}}}|steamcommunity.com}}|Steam Community file|Steam link}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/filedetails/|1}}|Steam File {{#explode:{{{link}}}|/filedetails/|1}}|{{{link}}}}}}}]</span> | |||
<!-- ofp.info fallback --> | |||
|{{#if: | |||
{{#pos:{{{link}}}|ofp.gamepark.cz}} | |||
{{#pos:{{{link}}}|ofp.gamepark.eu}} | |||
{{#pos:{{{link}}}|ofp.gamezone.cz}} | |||
{{#pos:{{{link}}}|ofp.info}} | |||
{{#pos:{{{link}}}|ofpr.info/ofpd/}} | |||
{{#pos:{{{link}}}|ftp://ofpr.info}} | |||
{{#pos:{{{link}}}|ftp://ftp.ofpr.info}} | |||
{{#pos:{{{link}}}|ftp://www.ofpr.info}} | |||
|1|0}}= <span class="ofp-faguss-link" title="Old link: {{{link}}}">[https://ofp-faguss.com/addonsearch.php?searchfor={{URLENCODE:{{{link}}}}} {{#if:{{{text|}}}|{{{text}}}|ofpr.info link}}]</span> <span class="ofp-faguss-info">link courtesy of<br>[https://ofp-faguss.com/ OFP-Faguss.com]</span> | |||
<!-- dead links --> | |||
|{{#if: | |||
{{#pos:{{{link}}}|armaholic.com}} | |||
{{#pos:{{{link}}}|armedassault.com}} | |||
{{#pos:{{{link}}}|dev-heaven.net}} | |||
{{#pos:{{{link}}}|flashpoint1985.com}} | |||
{{#pos:{{{link}}}|pastebin.jonasscholz.de}} | |||
{{#pos:{{{link}}}|6thsense.eu}} | |||
|1|0}}= <span title="Old link: {{{link}}}">{{#if:{{{text|}}}|''{{{text}}}'' <sub>(dead link)</sub>|''-dead link-''}}</span> | |||
<!-- default link --> | |||
|#default= {{#if: {{{text|}}} | [{{#replace:{{{link}}}| |_}} {{{text}}}] | {{#replace:{{{link}}}| |_}} }} | |||
}} | }} | ||
| -no link provided-{{TemplateCase||[[Category:Link template usage error]]}} | | -no link provided-{{TemplateCase||[[Category:Link template usage error]]}} | ||
Line 71: | Line 76: | ||
|param2= text= | |param2= text= | ||
|descr2= (Optional, named parameter) the link's text | |descr2= (Optional, named parameter) the link's text | ||
|example1= <nowiki>{{Link/External}}</nowiki> | |example1= <nowiki>{{Link/External}}</nowiki> | ||
|result1= {{Link/External}} | |result1= {{Link/External}} | ||
|example2= <nowiki>{{Link/External|link= https://www.bohemia.net}}</nowiki> | |example2= <nowiki>{{Link/External|link= https://www.bohemia.net}}</nowiki> | ||
|result2= {{Link/External|link= https://www.bohemia.net}} | |result2= {{Link/External|link= https://www.bohemia.net}} | ||
|example3= <nowiki>{{Link/External|text= {{Name|bi}} website}}</nowiki> | |example3= <nowiki>{{Link/External|text= {{Name|bi}} website}}</nowiki> | ||
|result3= {{Link/External|text= {{Name|bi}} website}} | |result3= {{Link/External|text= {{Name|bi}} website}} | ||
|example4= <nowiki>{{Link/External|link= https://www.bohemia.net|text= {{Name|bi}} website}}</nowiki> | |example4= <nowiki>{{Link/External|link= https://www.bohemia.net|text= {{Name|bi}} website}}</nowiki> | ||
|result4= {{Link/External|link= https://www.bohemia.net|text= {{Name|bi}} website}} | |result4= {{Link/External|link= https://www.bohemia.net|text= {{Name|bi}} website}} | ||
|example5= | |||
<!-- dead websites --> | |||
|example5= <nowiki/> | |||
<nowiki>* {{Link/External|link= https://www.armaholic.com}}</nowiki><br> | <nowiki>* {{Link/External|link= https://www.armaholic.com}}</nowiki><br> | ||
<nowiki>** {{Link/External|link= https://www.armaholic.com/page.php?id=1}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://www.armaholic.com/page.php?id=1|text= My {{arma1}} mod}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= https://www.armedassault.com}}</nowiki><br> | <nowiki>* {{Link/External|link= https://www.armedassault.com}}</nowiki><br> | ||
<nowiki>** {{Link/External|link= http://www.armedassault.com/william/|text= William Porter's Blog}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= https://dev-heaven.net}}</nowiki><br> | <nowiki>* {{Link/External|link= https://dev-heaven.net}}</nowiki><br> | ||
<nowiki>* {{Link/External|link= https://www.flashpoint1985.com}}</nowiki><br> | <nowiki>* {{Link/External|link= https://www.flashpoint1985.com}}</nowiki><br> | ||
<nowiki>* {{Link/External|link= https://pastebin.jonasscholz.de}}</nowiki> | <nowiki>* {{Link/External|link= https://pastebin.jonasscholz.de}}</nowiki><br> | ||
|result5= <nowiki/> | |result5= <nowiki/> | ||
* {{Link/External|link= https://www.armaholic.com}} | * {{Link/External|link= https://www.armaholic.com}} | ||
** {{Link/External|link= https://www.armaholic.com/page.php?id=1}} | |||
** {{Link/External|link= https://www.armaholic.com/page.php?id=1|text= My {{arma1}} mod}} | |||
* {{Link/External|link= https://www.armedassault.com}} | * {{Link/External|link= https://www.armedassault.com}} | ||
** {{Link/External|link= http://www.armedassault.com/william/|text= William Porter's Blog}} | |||
* {{Link/External|link= https://dev-heaven.net}} | * {{Link/External|link= https://dev-heaven.net}} | ||
* {{Link/External|link= https://www.flashpoint1985.com}} | * {{Link/External|link= https://www.flashpoint1985.com}} | ||
* {{Link/External|link= https://pastebin.jonasscholz.de}} | * {{Link/External|link= https://pastebin.jonasscholz.de}} | ||
|example6= <nowiki | |||
<!-- redirected websites --> | |||
|example6= <nowiki/> | |||
<nowiki>* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}}</nowiki><br> | <nowiki>* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}}</nowiki><br> | ||
<nowiki>* {{Link/External|link= http://ofpr.info}}</nowiki><br> | <nowiki>* {{Link/External|link= http://ofpr.info}}</nowiki><br> | ||
<nowiki>* {{Link/External|link= ftp://ofpr.info}}</nowiki> | <nowiki>* {{Link/External|link= ftp://ofpr.info}}</nowiki> | ||
| | |result6= <nowiki/> | ||
* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302}} | * {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302}} | ||
* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}} | * {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}} | ||
* {{Link/External|link= http://ofpr.info}} | * {{Link/External|link= http://ofpr.info}} | ||
* {{Link/External|link= ftp://ofpr.info}} | * {{Link/External|link= ftp://ofpr.info}} | ||
| | |||
<!-- marked websites --> | |||
|example7= <nowiki/> | |||
<nowiki>* {{Link/External|link= https://en.wikipedia.org/}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://en.wikipedia.org/|text= An article}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://en.wikipedia.org/Arma_2}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://en.wikipedia.org/Arma_2|text= an {{arma2}} article}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= https://en.wiktionary.org/}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://en.wiktionary.org/wiki/arma}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= https://steampowered.com/}}</nowiki><br> | |||
<nowiki>** {{Link/External|link= https://steamcommunity.com/sharedfiles/filedetails/2206040060}}</nowiki><br> | |||
<nowiki>* {{Link/External|link= http://web.archive.org/web/20080401075137/http://www.armedassault.com/william/|text= William Porter's Blog}}</nowiki> | <nowiki>* {{Link/External|link= http://web.archive.org/web/20080401075137/http://www.armedassault.com/william/|text= William Porter's Blog}}</nowiki> | ||
| | |result7= <nowiki/> | ||
* {{Link/External|link= | * {{Link/External|link= https://en.wikipedia.org/}} | ||
** {{Link/External|link= https://en.wikipedia.org/|text= An article}} | |||
** {{Link/External|link= https://en.wikipedia.org/wiki/Arma_2}} | |||
** {{Link/External|link= https://en.wikipedia.org/wiki/Arma_2|text= an {{arma2}} article}} | |||
* {{Link/External|link= https://en.wiktionary.org/}} | |||
** {{Link/External|link= https://en.wiktionary.org/wiki/arma}} | |||
* {{Link/External|link= https://steampowered.com/}} | |||
** {{Link/External|link= https://steamcommunity.com/sharedfiles/filedetails/2206040060}} | |||
* {{Link/External|link= http://web.archive.org/web/20080401075137/http://www.armedassault.com/william/|text= William Porter's Blog}} | * {{Link/External|link= http://web.archive.org/web/20080401075137/http://www.armedassault.com/william/|text= William Porter's Blog}} | ||
}}</noinclude> | }}</noinclude> |
Revision as of 16:24, 10 April 2023
External link template allows external URLs filter/styliser depending on the domain name. It also replaces spaces in links by underscores. It adds the page to Link template usage error category in case of improper formatting.
Filtered | Redirected |
---|---|
|
|
This template is used on these pages.
Usage
{{Link/External|link=|text=}}
- link=: (named parameter) the URL
- text=: (Optional, named parameter) the link's text
Code | Result |
---|---|
{{Link/External}} | -no link provided- |
{{Link/External|link= https://www.bohemia.net}} | https://www.bohemia.net |
{{Link/External|text= {{Name|bi}} website}} | -no link provided- |
{{Link/External|link= https://www.bohemia.net|text= {{Name|bi}} website}} | Bohemia Interactive website |
* {{Link/External|link= https://www.armaholic.com}} |
|
* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302}} |
|
* {{Link/External|link= https://en.wikipedia.org/}} |