Link/External – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add dev-heaven.net)
(Add ofpr.info link converter from ofp-faguss.com!)
Line 1: Line 1:
<includeonly>{{#if: {{{link|}}}
<includeonly>{{#if: {{{link|}}}
| {{#if:
|
{{#pos:{{{link}}}|armaholic.com}}
{{#if:
{{#pos:{{{link}}}|armedassault.com}}
{{#pos:{{{link}}}|ofp.gamepark.cz}}
{{#pos:{{{link}}}|dev-heaven.net}}
{{#pos:{{{link}}}|ofp.gamepark.eu}}
{{#pos:{{{link}}}|ofp.gamepark.cz}}
{{#pos:{{{link}}}|ofp.gamezone.cz}}
{{#pos:{{{link}}}|ofp.gamepark.eu}}
{{#pos:{{{link}}}|ofp.info}}
{{#pos:{{{link}}}|ofp.gamezone.cz}}
| [https://ofp-faguss.com/addonsearch.php?searchfor={{URLENCODE:{{{link}}}}} {{#if:{{{text|}}}|{{{text}}}|ofpr.info link}}] <small>(Courtesy of [https://ofp-faguss.com/ OFP-Faguss.com])</small>
{{#pos:{{{link}}}|ofp.info}}
|
| {{#if:{{{text|}}}|''{{{text}}}'' (dead link)|''-dead link-''}}
{{#if:
| {{#if: {{{text|}}}
{{#pos:{{{link}}}|armaholic.com}}
| [{{#replace:{{{link}}}| |_}} {{{text}}}]
{{#pos:{{{link}}}|armedassault.com}}
| {{#replace:{{{link}}}| |_}}
{{#pos:{{{link}}}|dev-heaven.net}}
| {{#if:{{{text|}}}|''{{{text}}}'' (dead link)|''-dead link-''}}
|
{{#if: {{{text|}}}
| [{{#replace:{{{link}}}| |_}} {{{text}}}]
| {{#replace:{{{link}}}| |_}}
}}
}}
}}
}}
}}
| -no links defined-{{TemplateCase||[[Category:ExternalLink template usage error‎]]}}
| -no links defined-{{TemplateCase||[[Category:ExternalLink template usage error‎]]}}
}}</includeonly><noinclude>{{Doc/Template
}}</includeonly><noinclude>{{Doc/Template
|descr= External link template allowing to act as a filter/styliser depending on the domain name.
|descr= External link template allowing to act as a filter/styliser depending on the domain name.
It will also replace spaces in links by underscores.
It will also replace spaces in links by underscores. Adds the page to [[:Category:ExternalLink template usage error|ExternalLink template usage error]] category in case of improper formatting.


Currently listed dead sites:
Currently listed dead sites:
Line 45: Line 51:
|example7= <nowiki>{{ExternalLink|link= https://www.armaholic.com/page.php?id=1|text= My {{Name|arma2}} mod}}</nowiki>
|example7= <nowiki>{{ExternalLink|link= https://www.armaholic.com/page.php?id=1|text= My {{Name|arma2}} mod}}</nowiki>
|result7= {{ExternalLink|link= https://www.armaholic.com/page.php?id=1|text= My {{Name|arma2}} mod}}
|result7= {{ExternalLink|link= https://www.armaholic.com/page.php?id=1|text= My {{Name|arma2}} mod}}
|example8= <nowiki>{{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302}}</nowiki>
|result8= {{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302}}
|example9= <nowiki>{{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}}</nowiki>
|result9= {{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}}
}}</noinclude>
}}</noinclude>

Revision as of 21:03, 4 June 2021

External link template allowing to act as a filter/styliser depending on the domain name. It will also replace spaces in links by underscores. Adds the page to ExternalLink template usage error category in case of improper formatting.

Currently listed dead sites:

  • armaholic.com
  • armedassault.com
  • dev-heaven.net
  • ofp.gamepark.cz
  • ofp.gamepark.eu
  • ofp.gamezone.cz
  • ofp.info // ofpr.info is valid

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
{{ExternalLink}} -no links defined-
{{ExternalLink|link= https://www.bohemia.net}} https://www.bohemia.net
{{ExternalLink|text= BI website}} -no links defined-
{{ExternalLink|link= https://www.bohemia.net|text= BI website}} BI website
{{ExternalLink|link= https://en.wikipedia.org/wiki/Bohemia Interactive|text= BI on Wikipedia}} BI on Wikipedia
{{ExternalLink|link= https://www.armaholic.com}} -dead link-
{{ExternalLink|link= https://www.armaholic.com/page.php?id=1|text= My {{Name|arma2}} mod}} My Arma 2 mod (dead link)
{{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302}} ofpr.info link (Courtesy of OFP-Faguss.com)
{{ExternalLink|link= http://ofp.gamepark.cz/index.php?showthis=2302|text= Screen shot of the week 21}} Screen shot of the week 21 (Courtesy of OFP-Faguss.com)