Extension:FileProtocolLinks

The FileProtocolLinks extension renders links to local shares on a (corporate) intranet. It can also be used to render links to any resource in your filesystem if you are running a personal wiki on your localhost.

You can also use an alternative way to enable file protocol links, but the FileProtocolLinks extension brings some little benefits:
 * It allows link adresses with blanks as sometimes usual on windows systems (e.g. c:\folder with blanks\file with blanks.txt
 * It renders the links in another colour

Examples
The following examples should show how you can use this extension.

Link to a file on a fileserver on your LAN
This example shows how to add a direct link to a File on a Fileserver on your LAN. Note that some wiki users may have no access to this file (e.g. due to insufficient privileges, or they have access to the wiki from outside your LAN).

\\Fileserver\Directory1\Directory2\MyFile.zip

Link to a file on your local computer
This example shows how to add a direct link to a File on your local machine (localhost). Do not use such links to local resources, except for personal wikis which are only running at your localhost!

Windows
C:/Directory1/Directory2/MyFile.zip

or

C:/Directory1/Directory2/MyFile.zip|ZIP-Archive of MyFile

Templating
You can use this in a template (without subst: as of version 0.3) for various reasons, such as factoring a common long path for multiple resources:

Code:

Template: //some/very/long/path/with/a/lot/of/subdirectories/|

Limitations

 * This extension does not work with some browsers due to security reasons. Detailed info can be found here. Maybe installing this extension helps Firefox users.
 * It does not (yet) handle special characters like '#' in the link addresses.

Version 0.3
Added support for wikitext parsing - requires mediawiki 1.16a or above.

Version 0.2
Avoid XSS vulnerability (many thanks to Kate)

Installation
Add the following to your LocalSettings.php:

Sourcecode
Add the following source code to the /extensions/FileProtocolLinks/ directory


 * FileProtocolLinks.php