[pmwiki-users] link a file

Knut Alboldt pmwiki at alboldt.de
Fri May 5 15:46:40 CDT 2006


I've solved the problem by installing the FF-extension LocalLink (see 
also https://addons.mozilla.org/addon.php?id=281).
The problem is, that the version on the ff-site is not updated, so to 
get it installed with versions 1.5+ you've to patch the xpi-file. It's a 
zipped file, so you can extract the included file "install.rdf", then 
change the line
<em:maxVersion>1.0</em:maxVersion> into
<em:maxVersion>1.5+</em:maxVersion>
and put that file back to the xpi-archive then install it in FF.
It will give you an entry in the context-menü of a link so you can open 
a link locally.

In the comments to that extension there is also remarked:

You can set up security policies for this now. Read more at 
http://kb.mozillazine.org/Security_Policies.

so I had a look:


Firefox 1.5, SeaMonkey 1.0 and newer

In the most recent versions of these browsers, the old global preference 
has been removed. Instead, the checkloaduri preference has been combined 
with the CAPS interface so you can change the setting on a per-site 
basis with Security Policies. For example, to allow a certain domain to 
bypass the checkloaduri restriction, this could be added to user.js:

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", 
"http://www.example.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", 
"allAccess");

The line with capability.policy.localfilelinks.sites can have multiple 
websites separated by spaces, like so:

user_pref("capability.policy.localfilelinks.sites","http://www.example.com 
http://www.example.net");

(Naturally, you would replace http://www.example.com and 
http://www.example.net with sites you wanted to allow access.)

Site names must be listed as in the above example: the protocol 
(http://) followed by the domain name (www.example.com) followed by, if 
necessary, a port number (:8080). They should not include the final / or 
anything else from the path part of the URL.

well, so it should be easily possible to enable this in FF 1.5++ by 
selecting yor wiki-site - but I didn't test it (yet).

Knut

Patrick R. Michaud schrieb:
> On Thu, May 04, 2006 at 06:46:18PM -0700, Brehmer, Daniel wrote:
>>  
>>> I've looked, but cannot find any instructions on how to 
>>> create a link for a file.
>>>  
>>> Can it be done?
>>>  
>>> I've tried [[file://path/filename]], but that doesn seem to work.
>> 	 
>> I have run into the same problem. With IE that sort of url will 
>> work, but not in Firefox.  [...]
> 
> Many browsers (including Firefox) disallow file:// links unless
> the source of the page being viewed is also on the local file
> system.  Also, the syntax of the link varies from browser to
> browser and from one operating system to the next.
> 
> Pm
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
> 
> 




More information about the pmwiki-users mailing list