Difference between revisions of "Template:Module"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Refactor to make editing easier (no effect))
m (Refactor (slightly faster))
Line 6: Line 6:
 
| {{#switch:{{{type}}}
 
| {{#switch:{{{type}}}
 
   |Video subfilter
 
   |Video subfilter
   |Video sub-filter = Video sub-filter
+
   |Video sub-filter     = Video sub-filter
   |#default         = {{{type}}}
+
   |#default             = {{{type}}}
 
  }}{{#switch:{{{type}}}
 
  }}{{#switch:{{{type}}}
 
   |Access                = [[Category:Accesses]]
 
   |Access                = [[Category:Accesses]]
Line 26: Line 26:
 
   |Visualisation        = [[Category:Visualisations]]
 
   |Visualisation        = [[Category:Visualisations]]
 
   |#default              = [[Category:Modules]]
 
   |#default              = [[Category:Modules]]
   }}{{DEFAULTSORT:{{#titleparts:{{PAGENAME}}|0|2}}|noreplace}}
+
   }}
 
|-
 
|-
 
! scope="row" | First VLC version
 
! scope="row" | First VLC version
Line 32: Line 32:
 
|-
 
|-
 
! scope="row" | Last VLC version
 
! scope="row" | Last VLC version
| {{{last_version|-}}}{{#if:{{{last_version|}}}|{{DEFAULTSORT:†|noerror}}}}
+
| {{{last_version|-}}}
 +
  {{#if:{{{last_version|}}}
 +
  |{{DEFAULTSORT:†|noerror}}
 +
  |{{DEFAULTSORT:{{#titleparts:{{PAGENAME}}|0|2}}|noreplace}}
 +
  }}
 
|-
 
|-
 
! scope="row" | Operating system(s)
 
! scope="row" | Operating system(s)
Line 54: Line 58:
  
 
==Usage==
 
==Usage==
  <nowiki>{{Module
+
<pre>
 +
{{Module
 
   |type          = module type
 
   |type          = module type
 
   |first_version = Version of VLC in which plugin first appeared
 
   |first_version = Version of VLC in which plugin first appeared
Line 64: Line 69:
 
   |sc3          = Shortcut 3
 
   |sc3          = Shortcut 3
 
   |sc4          = Shortcut 4
 
   |sc4          = Shortcut 4
  }}</nowiki>
+
}}
 +
</pre>
 
Source code identifies shortcuts with <code>add_shortcut( "foo", "bar" )</code> in the module descriptor. Generally omit non-specific shortcuts. Pass the first shortcut to <code>'''<nowiki>|sc=</nowiki>'''</code>, a possible second to <code>'''<nowiki>|sc2=</nowiki>'''</code>, etc.<br />
 
Source code identifies shortcuts with <code>add_shortcut( "foo", "bar" )</code> in the module descriptor. Generally omit non-specific shortcuts. Pass the first shortcut to <code>'''<nowiki>|sc=</nowiki>'''</code>, a possible second to <code>'''<nowiki>|sc2=</nowiki>'''</code>, etc.<br />
 
If <code>'''<nowiki>|sc=</nowiki>'''</code> is set to ''none'' <samp>(none)</samp> will be shown. No data is indicated with <samp>-</samp>.
 
If <code>'''<nowiki>|sc=</nowiki>'''</code> is set to ''none'' <samp>(none)</samp> will be shown. No data is indicated with <samp>-</samp>.

Revision as of 06:07, 17 May 2019

Module: {{{name}}}
Type {{{type}}}
First VLC version -
Last VLC version -
Operating system(s) all
Description {{{description}}}
Shortcut(s) -

Template for Documentation:Modules/* pages.

Usage

 {{Module
  |type          = module type
  |first_version = Version of VLC in which plugin first appeared
  |last_version  = Version of VLC in which plugin last appeared before being removed
  |os            = Operating system of the plugin
  |description   = A short, brief description of the plugin
  |sc            = Shortcut
  |sc2           = Shortcut 2
  |sc3           = Shortcut 3
  |sc4           = Shortcut 4
 }}

Source code identifies shortcuts with add_shortcut( "foo", "bar" ) in the module descriptor. Generally omit non-specific shortcuts. Pass the first shortcut to |sc=, a possible second to |sc2=, etc.
If |sc= is set to none (none) will be shown. No data is indicated with -.