Difference between revisions of "Template:Path to VLC"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Fix broken examples)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
-->{{#switch:{{{1}}}<!--
+
-->{{#ifeq:{{{dir|}}}|y<!--
   -->|windows = "%PROGRAMFILES%\VideoLAN\VLC\vlc.exe"<!--
+
  -->|{{#switch:{{{1}}}<!--
  -->|mac    = ../VLC.app/Contents/MacOS/VLC<!--
+
    -->|windows = {{#ifeq:{{{q|}}}|n|%PROGRAMFILES%\VideoLAN\VLC|"%PROGRAMFILES%\VideoLAN\VLC"}}<!--
  -->|linux  = vlc<!--
+
    -->|mac    = /Applications/VLC.app/Contents/MacOS<!--
 +
    -->|linux  = <!--
 +
  -->}}<!--
 +
   -->|{{#switch:{{{1}}}<!--
 +
    -->|windows = "%PROGRAMFILES%\VideoLAN\VLC\vlc.exe"<!--
 +
    -->|mac    = /Applications/VLC.app/Contents/MacOS/VLC<!--
 +
    -->|linux  = vlc<!--
 +
  -->}}<!--
 
-->}}</includeonly><noinclude>
 
-->}}</includeonly><noinclude>
  
Line 9: Line 16:
 
A template for default {{VLC}} locations on desktop computers by [[operating system]].
 
A template for default {{VLC}} locations on desktop computers by [[operating system]].
  
 +
Parameters:
 +
* (unnamed) required. One of <code>windows</code>, <code>mac</code> or <code>linux</code>. No default
 +
* <code>'''|dir='''</code> optional (short for ''directory''). Only checks for value <code>y</code> (''yes''). Default disabled
 +
* <code>'''|q='''</code> optional (short for ''quotes''). Only checks for value <code>n</code> (''no''). Default enabled
 
Showcase of various modes:
 
Showcase of various modes:
 
* <code>{{{{PAGENAME}}|windows<nowiki>}}</nowiki></code>
 
* <code>{{{{PAGENAME}}|windows<nowiki>}}</nowiki></code>
 
*: <samp>{{{{PAGENAME}}|windows}}</samp>
 
*: <samp>{{{{PAGENAME}}|windows}}</samp>
 +
* <code>{{{{PAGENAME}}|windows<nowiki>|dir=y}}</nowiki></code>
 +
*: <samp>{{{{PAGENAME}}|windows|dir=y}}</samp>
 +
* <code>{{{{PAGENAME}}|windows<nowiki>|dir=y|q=n}}</nowiki></code>
 +
*: <samp>{{{{PAGENAME}}|windows|dir=y|q=n}}</samp>
 
* <code>{{{{PAGENAME}}|mac<nowiki>}}</nowiki></code>
 
* <code>{{{{PAGENAME}}|mac<nowiki>}}</nowiki></code>
 
*: <samp>{{{{PAGENAME}}|mac}}</samp>
 
*: <samp>{{{{PAGENAME}}|mac}}</samp>
 +
* <code>{{{{PAGENAME}}|mac<nowiki>|dir=y}}</nowiki></code>
 +
*: <samp>{{{{PAGENAME}}|mac|dir=y}}</samp>
 
* <code>{{{{PAGENAME}}|linux<nowiki>}}</nowiki></code>
 
* <code>{{{{PAGENAME}}|linux<nowiki>}}</nowiki></code>
 
*: <samp>{{{{PAGENAME}}|linux}}</samp>
 
*: <samp>{{{{PAGENAME}}|linux}}</samp>
 +
* <code>{{{{PAGENAME}}|linux<nowiki>|dir=y}}</nowiki></code>
 +
*: <samp>{{{{PAGENAME}}|linux|dir=y}}</samp>
 +
 +
== See also ==
 +
* {{tl|Path to VLC}}
 +
* {{tl|VLC folder}} - simple wrapper template for directory paths only (no quotes)
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 04:00, 19 April 2019


Usage

A template for default VLC media player locations on desktop computers by operating system.

Parameters:

  • (unnamed) required. One of windows, mac or linux. No default
  • |dir= optional (short for directory). Only checks for value y (yes). Default disabled
  • |q= optional (short for quotes). Only checks for value n (no). Default enabled

Showcase of various modes:

  • {{Path to VLC|windows}}
    "%PROGRAMFILES%\VideoLAN\VLC\vlc.exe"
  • {{Path to VLC|windows|dir=y}}
    "%PROGRAMFILES%\VideoLAN\VLC"
  • {{Path to VLC|windows|dir=y|q=n}}
    %PROGRAMFILES%\VideoLAN\VLC
  • {{Path to VLC|mac}}
    /Applications/VLC.app/Contents/MacOS/VLC
  • {{Path to VLC|mac|dir=y}}
    /Applications/VLC.app/Contents/MacOS
  • {{Path to VLC|linux}}
    vlc
  • {{Path to VLC|linux|dir=y}}

See also