UNC links
From MediaWiki.org
The Universal Naming Convention, or UNC, specifies a common syntax to describe the location of a network resource, such as a shared file, directory, or printer. The UNC syntax for Windows systems is as follows:
\\ComputerName\Shared Folder\Resource Name
UNCs differ from URLs in that they do not have a protocol: prefix and that they can contain embedded spaces. In corporate use of MediaWiki, it is often useful to paste a UNC from Windows Explorer directly into a wiki page.
Contents |
[edit] How to link
| Description | You type | You get |
| UNC link, with title | {{unc | \\ComputerName\Shared Folder\Resource Name | The resource}} | The resource |
| UNC link, unnamed | {{unc | \\ComputerName\Shared Folder\Resource Name}} | [1] |
[edit] Installation
Install the ParserFunctions and StringFunctions extensions.
Add the following to LocalSettings.php:
array_push($wgUrlProtocols, "file://");
Create a template called Template:Unc (search for Template:Unc and click Create this page), and paste this text into the page content:
[file:///{{#replace:{{#replace:{{{1}}}| |%20}}|\|/}} {{#if:{{{2|}}}|{{{2}}}}}]
[edit] Browser compatibility
- With Internet Explorer on Windows UNC Links work without exception.
- With Firefox file:/// links are disabled by default when appearing in non-local webpages. See: Manual:$wgUrlProtocols and this mozillaZine article for how to enable them.
[edit] See also
| Wikipedia: Path (computing) |