Difference between revisions of "Template:Protocol"

From VideoLAN Wiki
Jump to navigation Jump to search
(Change layout visibly, eliminating unreachable code. I added protocol usage too)
(I documented the final options)
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
|id={{{1|??}}}
 
|id={{{1|??}}}
 
|text=<!--
 
|text=<!--
Line 1:              -->VLC uses this [[protocol]] (or [[access module]]) to read data from a device or network{{#if:{{{mod|{{lc:{{{1|}}}}}}}}|&#32;with '''<code>{{{mod|{{lc:{{{1}}}}}}}}</code><nowiki>://</nowiki></code>'''}}. {{{info|}}}<!--
+
Line 1:              -->VLC uses this [[protocol]] (or [[access module]]) to read data from a device or network.{{#if:{{{info|}}}|&#32;Additional information: '''{{{info}}}'''}}<!--
Line 2: (conditional) -->{{#if:{{{mod|{{lc:{{{1|}}}}}}}}|<br />This protocol is handled by '''{{docmod|{{{mod|{{lc:{{{1}}}}}}}}}}'''.}}<!--
+
Line 2: (conditional) -->{{#if:{{{mod|{{lc:{{{1|}}}}}}}}|<br />This protocol is handled by the '''{{docmod|{{{mod|{{lc:{{{1}}}}}}}}}}''' [[module]].}}
Line 3: (conditional) -->{{#if:{{{altid|}}}<!--
 
                        -->|The [[module]] name to use at the [[command line]] is '''{{{altid}}}'''<!--
 
                        -->{{#if:{{{altid2|}}}<!--
 
                          -->|, but you can also use '''{{{altid2}}}'''<!--
 
                            -->{{#if:{{{altid3|}}}<!--
 
                              -->|, or '''{{{altid3}}}'''<!--
 
                              -->{{#if:{{{altid4|}}}<!--
 
                                -->|, or '''{{{altid4}}}'''<!--
 
                              -->}}<!--
 
                            -->}}<!--
 
                        -->}}.<!--
 
                      -->}}
 
 
|bgcol=#ffe0e0
 
|bgcol=#ffe0e0
 
|brcol=#e0c0c0<!--
 
|brcol=#e0c0c0<!--
-->}}<includeonly> [[Category:Protocols]] </includeonly><noinclude>
+
-->}}<includeonly>{{#ifeq:{{{nocat|n}}}|y| |[[Category:Protocols]]}}</includeonly><noinclude>
  
 
==Usage==
 
==Usage==
  <nowiki>{{protocol |<protocol> |info= |altid= |altid2= |altid3= |altid4= |mod= }}</nowiki>
+
  <nowiki>{{protocol |<protocol> |info= |mod= }}</nowiki>
 +
The purpose of the template is to visually inform readers that VLC supports the protocol and through which module.<br />
 +
The page will be added automatically to [[:Category:Protocols]].
  
It will add it to [[:Category:Protocols]]
+
Parameters:
 +
* (unnamed) (required): the text in the small box, defaults to <samp>'''??'''</samp>
 +
* <code>'''<nowiki>|info=</nowiki>'''</code> (optional) extra text
 +
* <code>'''<nowiki>|mod=</nowiki>'''</code> (optional) link to a particular module while displaying the {{Tag|protocol}} given
  
Info is for extra text in the box.
+
Enter the protocol name as-is. If the name differs other than casing supply the module name with <code>'''<nowiki>|mod=</nowiki>'''</code>
 
 
<code>mod</code> will link to a particular module while displaying the {{Tag|protocol}} given. Use this when <code>altid</code> would not make sense.
 
  
 
==Examples==
 
==Examples==
Example, [[http]]
+
For [[HTTP]] the casing difference between ''[[HTTP]]'' and ''{{docmod|http}}'' is not a problem:
  <nowiki>{{protocol|HTTP|altid=https}}</nowiki>
+
<code>{{{{PAGENAME}}<nowiki>|HTTP</nowiki>}}</code>
 +
{{{{PAGENAME}}|HTTP|nocat=y}}
 +
For [[RTSP]], the protocol is handled by the {{docmod|live}} module:
 +
  <code>{{{{PAGENAME}}<nowiki>|RTSP</nowiki>|mod=live}}</code>
 +
{{{{PAGENAME}}|RTSP|mod=live|nocat=y}}
 +
To say something for [[Dummy]]:
 +
<code>{{{{PAGENAME}}<nowiki>|Dummy</nowiki>|info=Fakes codec input, but is no longer used.}}</code>
 +
{{{{PAGENAME}}|Dummy|info=Fakes codec input, but is no longer used.|nocat=y}}
  
 
==See also==
 
==See also==

Latest revision as of 09:03, 19 April 2019

??
VLC uses this protocol (or access module) to read data from a device or network.

Usage

{{protocol |<protocol> |info= |mod= }}

The purpose of the template is to visually inform readers that VLC supports the protocol and through which module.
The page will be added automatically to Category:Protocols.

Parameters:

  • (unnamed) (required): the text in the small box, defaults to ??
  • |info= (optional) extra text
  • |mod= (optional) link to a particular module while displaying the <protocol> given

Enter the protocol name as-is. If the name differs other than casing supply the module name with |mod=

Examples

For HTTP the casing difference between HTTP and http is not a problem:

{{Protocol|HTTP}}
HTTP
VLC uses this protocol (or access module) to read data from a device or network.
This protocol is handled by the http module.

For RTSP, the protocol is handled by the live module:

{{Protocol|RTSP|mod=live}}
RTSP
VLC uses this protocol (or access module) to read data from a device or network.
This protocol is handled by the live module.

To say something for Dummy:

{{Protocol|Dummy|info=Fakes codec input, but is no longer used.}}
Dummy
VLC uses this protocol (or access module) to read data from a device or network. Additional information: Fakes codec input, but is no longer used.
This protocol is handled by the dummy module.

See also