Link/External – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix examples)
(Add Steam & Wiktionary link icon)
Line 1: Line 1:
<includeonly>{{#if: {{{link|}}}
<includeonly>{{#if: {{{link|}}}
|
|
{{#if: {{#pos:{{{link}}}|web.archive.org}}
{{#switch:1
|
<span title="web.archive.org backup">{{#if: {{{text|}}}
| [{{#replace:{{{link}}}| |_}} {{{text}}}]
| {{#replace:{{{link}}}| |_}}
}} <sub style="font-size: .8em">(archive)</sub></span>
|
{{#if:
{{#pos:{{{link}}}|wikipedia.org}}
|
<span class="wikipedia" title="{{#if:{{#explode:{{{link}}}|/wiki/|1}}|Read the '{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&nbsp;}}' Wikipedia article|Access Wikipedia}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/wiki/|1}}|{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&#32;}}|{{{link}}}}}}}]</span>
|
{{#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}}


| <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>
<!-- web.archive.org -->
|
|{{#if:
{{#if:
{{#pos:{{{link}}}|web.archive.org}}
{{#pos:{{{link}}}|armaholic.com}}
|1|0}}= <span title="web.archive.org backup">{{#if: {{{text|}}} | [{{#replace:{{{link}}}| |_}} {{{text}}}] | {{#replace:{{{link}}}| |_}} }} <sub style="font-size: .8em">(archive)</sub></span>
{{#pos:{{{link}}}|armedassault.com}}
 
{{#pos:{{{link}}}|dev-heaven.net}}
<!-- Wikipedia / Wiktionary -->
{{#pos:{{{link}}}|flashpoint1985.com}}
|{{#if:
{{#pos:{{{link}}}|pastebin.jonasscholz.de}}
{{#pos:{{{link}}}|wikipedia.org}}
{{#pos:{{{link}}}|6thsense.eu}}
|1|0}}= <span class="wikipedia" title="{{#if:{{#explode:{{{link}}}|/wiki/|1}}|Read the '{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&nbsp;}}' Wikipedia article|Access Wikipedia}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/wiki/|1}}|{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&#32;}}|{{{link}}}}}}}]</span>
| <span title="Old link: {{{link}}}">{{#if:{{{text|}}}|''{{{text}}}'' <sub>(dead link)</sub>|''-dead link-''}}</span>
|{{#if:
|
{{#pos:{{{link}}}|wiktionary.org}}
{{#if: {{{text|}}}
|1|0}}= <span class="wikipedia" title="{{#if:{{#explode:{{{link}}}|/wiki/|1}}|Read the '{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&nbsp;}}' Wiktionary article|Access the Wiktionary}}">[{{{link}}} {{#if:{{{text|}}}|{{{text}}}|{{#if:{{#explode:{{{link}}}|/wiki/|1}}|{{#replace:{{#explode:{{{link}}}|/wiki/|1}}|_|&#32;}}|{{{link}}}}}}}]</span>
| [{{#replace:{{{link}}}| |_}} {{{text}}}]
 
| {{#replace:{{{link}}}| |_}}
<!-- 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>{{Link/External|link= https://www.armaholic.com/page.php?id=1|text= My {{arma1}} mod}}</nowiki>
 
|result6= {{Link/External|link= https://www.armaholic.com/page.php?id=1|text= My {{arma1}} mod}}
<!-- redirected websites -->
|example7= <nowiki>* {{Link/External|link= http://ofp.gamepark.cz/index.php?showthis=2302}}</nowiki><br>
|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>
|result7= <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}}
|example8= <nowiki>* {{Link/External|link= http://www.armedassault.com/william/|text= William Porter's Blog}}</nowiki><br>
 
<!-- 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>
|result8= <nowiki/>
|result7= <nowiki/>
* {{Link/External|link= http://www.armedassault.com/william/|text= William Porter's Blog}}
* {{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}}
|example9= <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>
|result9= <nowiki/>
* {{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}}
}}</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
  • armaholic.com
  • armedassault.com
  • dev-heaven.net
  • flashpoint1985.com
  • pastebin.jonasscholz.de
  • 6thsense.eu
  • ofp.gamepark.cz
  • ofp.gamepark.eu
  • ofp.gamezone.cz
  • ofp.info
  • ofpr.info FTP links (ftp://ofpr.info, ftp://ftp.ofpr.info, ofpr.info/ofpd)
    ofpr.info domain itself is valid and points to http://ofpr.info.paradoxstudio.uk.
    ofp.gamepark.cz → ofp.info redirections are possible thanks to OFP-Faguss.com!

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
Examples
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= 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= http://www.armedassault.com/william/|text= William Porter's Blog}}
* {{Link/External|link= https://dev-heaven.net}}
* {{Link/External|link= https://www.flashpoint1985.com}}
* {{Link/External|link= https://pastebin.jonasscholz.de}}

  • -dead link-
    • -dead link-
    • My Armed Assault mod (dead link)
  • -dead link-
    • William Porter's Blog (dead link)
  • -dead link-
  • -dead link-
  • -dead link-

* {{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://ofpr.info}}
* {{Link/External|link= ftp://ofpr.info}}

* {{Link/External|link= https://en.wikipedia.org/}}
** {{Link/External|link= https://en.wikipedia.org/|text= An article}}
** {{Link/External|link= https://en.wikipedia.org/Arma_2}}
** {{Link/External|link= https://en.wikipedia.org/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}}