Topic on Project:Support desk

Opening external network link with UNC or $wgUrlProtocols

4
AmazingTrans (talkcontribs)

I am using Media wiki 1.25.1, tried chrome, firefox, IE11.

I would want to open an external link of a drive for example. So, I have tried a couple of ways but none seem to work for me. I have added the following in my LocalSettings.php: $wgUrlProtocols[] = 'file://'; $wgExternalLinkTarget = '_blank';

Case 1: Then in the wiki page, i added: [file://Q:/Document/]

I tried clicking it with IE, nothing came up, no explorer open. No response. When i hover over the link, it is the correct link that i need: file:///Q:/Document/ When I paste this link on the IE address bar; it opens the directory explorer.

Case 2: Then i tried UNC Template: https://www.mediawiki.org/wiki/UNC_links I added the following link into mediawiki page: [file:///{{#replace:{{#replace: \\home_network\Document| |%20}}|\|/}} ]

When i hover my mouse i get: file://home_network/Document/ When i click on the link, nothing happens in the browser. When I paste this link on the IE address bar; it opens the directory explorer.

Hope someone can help me with this.

Thanks! AT

Ciencia Al Poder (talkcontribs)

You say that clicking that link does nothing, but does that text look actually like a link?

You said you have $wgUrlProtocols[] = 'file//'; but it should be $wgUrlProtocols[] = 'file://'; (note the colon)

AmazingTrans (talkcontribs)

yes it is a link. and sorry about the mistyped there. I actually have $wgUrlProtocols[] = 'file://'; after reading more on the UNC links in detailed, i got the links working in Chrome if i have LocalLinks extensions installed. After clicking on the links in chrome, it open the directory trees in the browser, or open xls, doc in chrome. But could not get pptx to work in chrome.

Whereas, for IE11, clicking the link doesn't do anything at all. Ideas?

Reply to "Opening external network link with UNC or $wgUrlProtocols"