Difference between revisions of "Template:ExternalMediaLink/doc"

From comp.tf
Jump to navigation Jump to search
(Created page with "<includeonly><!-- -->{{#if:{{{date|}}} | {{{date}}} {{!}}  | }}<!-- -->{{#if:{{{language|}}}|{{flag/{{lc:{{{language}}}}}}} }}<!-- -->{{#if:{{{title|}}} | <span...")
 
m
Line 1: Line 1:
<includeonly><!--
+
[[Template:ExternalMediaLink]] helps with formatting for external media links such as interviews or image galleries.
-->{{#if:{{{date|}}} | {{{date}}}&nbsp;{{!}}&nbsp; | }}<!--
+
 
-->{{#if:{{{language|}}}|{{flag/{{lc:{{{language}}}}}}}&nbsp;}}<!--
+
====Parameters====
-->{{#if:{{{title|}}} | <span class="plainlinks">[{{{link}}} ''{{{title}}}'']</span> | <span class="plainlinks">[{{{link}}} {{{link}}}]</span>}}<!--
+
*'''date=''' Please use YYYY-MM-DD format for proper alignment.
-->{{#if:{{{trans_title|}}} | &nbsp;[{{{trans_title}}}]}} <!--
+
*'''link=''' Full url with a direct link such as <nowiki>http://www.example.com/test.html</nowiki>. This variable is not optional.
-->{{#if:{{{by|}}} | &nbsp;by&nbsp;{{{by}}} }}<!--
+
*'''title=''' Title of the link. The headline provided by the source is most often the best choice here.
-->{{#if:{{{of|}}} | &nbsp;of&nbsp;{{{of}}} }}<!--
+
*'''by=''' Name of author if available, if not can use name of organization or website.
-->{{#if:{{{event|}}} |<!--
+
*'''of=''' If name of author is known, you can add the organization they represent here. Do not include full URLs here. (Teamliquid or Teamliquid.net but not <nowiki>http://Teamliquid.net</nowiki>)
  -->&nbsp;at&nbsp;{{#if:{{{event-link|}}} |<!--
+
*'''event=''' Name of event, this will create an internal link if you do not use the next parameter.
      -->{{#ifeq:{{lc:{{{event-link}}}}} | false | {{{event}}} | [[{{{event-link}}}{{!}}{{{event}}}]] }} | [[{{{event}}}]]<!--
+
*'''event-link=''' If article link on Liquipedia is not pretty, use this to hide the link path.
  -->}}<!--
+
**Set this to '''false''' if you do not wish to have the event parameter create an internal link.
-->}}<!--
+
*'''language=''' Use this to indicate which language an interview is in, use corresponding country codes (i.e. se for Swedish, kr for Korean, fr for French, etc.).
-->{{#if:{{{translation|}}} | &nbsp;(trans. {{flag/{{lc:{{{translation}}}}}}}<!--
+
**Leave this field empty if the interview is in English.
-->{{#if:{{{translator|}}} | &nbsp;by&nbsp;{{{translator}}}}}) }}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
+
*'''trans_title=''' Use this to provide a translation of the title in english.
 +
*'''translation=''' Use this to indicate which language an interview is translated into.
 +
*'''translator=''' Name of the translator if available.
 +
 
 +
====Copy/Paste Code====
 +
<pre>
 +
*{{ExternalMediaLink
 +
|date=
 +
|link=
 +
|title=
 +
|by=
 +
|of=
 +
|event=
 +
|event-link=
 +
|language=
 +
|trans_title=
 +
|translation=
 +
|translator=
 +
}}
 +
</pre>
 +
Short form:
 +
<pre>*{{ExternalMediaLink  |date=  |link=  |title=  |by=  |of=  |event=  |event-link= |language= |translation= }}</pre>
 +
 
 +
====Example====
 +
<pre>
 +
*{{ExternalMediaLink
 +
|date=2012-02-13
 +
|link=http://example.com
 +
|title="Noam: Je serais le meilleur codeur de template de l'hémisphère nord l'année prochaine"
 +
|by=the gnome
 +
|of=Liquipedia.net
 +
|event=the Liquipedia yearly convention
 +
|event-link=false
 +
|language=fr
 +
|trans_title="Noam: I will be the best template coder on the nothern hemisphere by next year"
 +
|translation=usuk
 +
|translator=somebody
 +
}}
 +
</pre>
 +
creates:
 +
*{{ExternalMediaLink
 +
|date=2012-02-13
 +
|link=http://example.com
 +
|title="Noam: Je serais le meilleur codeur de template de l'hémisphère nord l'année prochaine"
 +
|by=the gnome
 +
|of=Liquipedia.net
 +
|event=the Liquipedia yearly convention
 +
|event-link=false
 +
|language=fr
 +
|trans_title="Noam: I will be the best template coder on the nothern hemisphere by next year"
 +
|translation=usuk
 +
|translator=somebody
 +
}}
 +
<noinclude>[[Category:Template Documentation Pages]]</noinclude>

Revision as of 20:21, 25 March 2016

Template:ExternalMediaLink helps with formatting for external media links such as interviews or image galleries.

Parameters

  • date= Please use YYYY-MM-DD format for proper alignment.
  • link= Full url with a direct link such as http://www.example.com/test.html. This variable is not optional.
  • title= Title of the link. The headline provided by the source is most often the best choice here.
  • by= Name of author if available, if not can use name of organization or website.
  • of= If name of author is known, you can add the organization they represent here. Do not include full URLs here. (Teamliquid or Teamliquid.net but not http://Teamliquid.net)
  • event= Name of event, this will create an internal link if you do not use the next parameter.
  • event-link= If article link on Liquipedia is not pretty, use this to hide the link path.
    • Set this to false if you do not wish to have the event parameter create an internal link.
  • language= Use this to indicate which language an interview is in, use corresponding country codes (i.e. se for Swedish, kr for Korean, fr for French, etc.).
    • Leave this field empty if the interview is in English.
  • trans_title= Use this to provide a translation of the title in english.
  • translation= Use this to indicate which language an interview is translated into.
  • translator= Name of the translator if available.

Copy/Paste Code

*{{ExternalMediaLink
|date=
|link=
|title=
|by=
|of=
|event=
|event-link=
|language=
|trans_title=
|translation=
|translator=
}}

Short form:

*{{ExternalMediaLink  |date=  |link=  |title=  |by=  |of=  |event=  |event-link= |language= |translation= }}

Example

*{{ExternalMediaLink
|date=2012-02-13
|link=http://example.com
|title="Noam: Je serais le meilleur codeur de template de l'hémisphère nord l'année prochaine"
|by=the gnome
|of=Liquipedia.net
|event=the Liquipedia yearly convention 
|event-link=false
|language=fr
|trans_title="Noam: I will be the best template coder on the nothern hemisphere by next year"
|translation=usuk
|translator=somebody
}}

creates: