Dokuwiki: Make file:// – links work in Firefox

Although i can understand why using file:// – links is bad sometimes you just need them (Company – wiki on an Intranet webserver anyone? Try to convince your colleagues that they have to use IE on that page…)

Handling of file:// – links is deactivated in Firefox, so you have to enable them, which can be done for select URLs in the about:config – dialog. Additionally you can deploy the Firefox settings via group policy

Settings in about:config

The first line creates a new policy named “localfilelinks”, the secondline adds (comma-seperated) a list of URLs where the policy should match, the third line allows “allAccess” for this Policy – thus enablink file:// links

Deploy via group Policy

These settings can also be added to a “user.js” file which can be deployed as a group policy in an active directory environment.

  1. Create a user.js file with the settings as you need them
  2. Put this file on a share every domain computer can reach on logon (i.e. DOMAIN.COM/NETLOGON)
  3. Create a firefox-settings.bat and add it as logon script

Disable the Dokuwiki – Alert when using non IE browsers

Dokuwiki usually displays an alert – box informing the user that file:// links are not supported when clicking such a link in non-IE browsers. This alert can be deactivated by editing the dokuwiki source and commenting out one single line. Please be careful what you are doing, as this might easily break your dokuwiki installation, additionally you will have to do this after every upgrade.
Open the lib/scripts/behaviour.js file and comment out this line:

save the file and the warning is gone.

Leave a Reply

Your email address will not be published. Required fields are marked *