Extension:FileProtocolLinks

Description
This 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 an other colour ;) (a nice green in this version g, but you can change the settings in the sourcecode)

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

Example 1: A link to a file on a fileserver in 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).

Windows
\\Fileserver\Directory1\Directory2\MyFile.zip

Example 2: A 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 Archiv of MyFile

If you want to use this in a template you have to call the template with subst:

template:mytemplate looks like this: link to local file from C:/Directory1/Directory2: C:/Directory1/Directory2/|

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.2
Avoid XSS vulnerability (many thanks to Kate)

Sourcecode
Add the following to your LocalSettings.php: Add the following source code to the extensions/FileProtocolLinks.php directory

Problems encountered
the link does not function. It is correctly displayed as a link but nothing happens when I click on it. This makes sense from a security point of view, i.e. i access the host page via http and then try to "breakout" to the local filesystem. In this case I don't see the point of this extension.
 * Having installed the extension and then used the following
 * C:/Somefile.pdf| The Text