Michael . wrote: [...]
I've gotten far enough with this using meta and mediawiki.org, and have enabled file:// links and a bunch of other stuff to make this posisble, even changing the browsers so file:// links are supported from the site. The only problem I've got left is what to do when there's a space in the file or directory name being linked to.
For example, if a file is stored in p:\docs\some user documentation.doc, I can't link to it in the wiki without setting $wgRawHtml and using the a href=... tag directly inside html tags. Not a very secure option, and also not very user-friendly. Substituting spaces for %20 doesn't work (IE renders the %20 directly for file:// links, it seems), and using [blah] doesn't work, becuase the first space gets regarded as the split between the url and the title of the link to be displayed. And an a href tag just gets ignored, despite my efforts to try and add it to the attribute whitelist.
I've been messing around for options for a few days now, and I've broken and unbroken everything a few times, by screwing with stuff like Sanitize.php, Linker.php, Parser.php, and so on. But despite being a long-term PHP developer, I can't figure this code out despite my best efforts.
So I'd like to ask the community if they have any suggestions on how I can achieve this? None of the code changes I made seemed to have any effect, so I'm at a loss as to what to do next.
Maybe you can create a simple markup extension, which transforms something like '<mylink href="file://p:\docs\a b c">Link</mylink>' into '<a href="file://p:\docs\a b c">Link</a>' (or what the correct HTML should be).
These extensions are very easy to build. The documentation is here: http://meta.wikimedia.org/wiki/Extending_wiki_markup
Good luck.