ひろきちさんはじめまして。
自分のところでもユーザから同じような要望を受け、カスタマイズしています。
\\192.168.0.1\foo\bar.txt
↓
file://///
192.168.0.1/foo/bar.txt
IEではそのままで動作しますが、Firefoxの場合、fileでのリンクを有効にするにはセキュリティポリシー設定をしていただく必要があるかと思
います。
対象ユーザが全員Windows系OSのため、その他OSの事は考慮していません。
#また、Chromeでは動作しません…
firefox向けuser.js
> user_pref("capability.policy.policynames", "localfilelinks");
> user_pref("capability.policy.localfilelinks.sites", "
http://192.168.0.1");
> user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
と、制限はいろいろありますがご参考まで。
Index: formatter.rb
===================================================================
--- formatter.rb (.../tags/0.8.3/lib/redmine/wiki_formatting/textile/
formatter.rb) (リビジョン 62)
+++ formatter.rb (.../branches/0.8.3.custom/lib/redmine/
wiki_formatting/textile/formatter.rb) (リビジョン 63)
@@ -137,6 +137,8 @@
(
(?:https?://)| # protocol spec,
or
(?:s?ftps?://)|
+ (?:files?:///)|
+ (?:\\\\)|
(?:www\.) # www.*
)
(
@@ -162,7 +164,10 @@
url=url[0..-2] # discard closing parenth from url
post = ")"+post # add closing parenth to post
end
- %(#{leading}<a class="external" href="#
{proto=="www."?"
http://www.":proto}#{url}">#{proto + url}</a>#{post})
+ proto_modify = proto
+ proto_modify = "
http://www." if proto == "www."
+ proto_modify = "file://///" if proto == "\\\\"
+ %(#{leading}<a class="external" href="#{proto_modify}#
{url}">#{proto + url}</a>#{post})
end
end
end