BBcode for opening a link in local network

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
SpyZip
Registered User
Posts: 3
Joined: Tue Feb 10, 2009 1:42 pm

BBcode for opening a link in local network

Post by SpyZip » Thu Feb 12, 2009 2:02 pm

I need to add in my forum BBcode for opening a link to a folder or file on the surver in local network for example "\\Pavel-pc\public\Flash", but with URL tag it wont open, couse it's not http://
Thanks!

User avatar
slorge
Registered User
Posts: 2
Joined: Tue Jan 26, 2010 3:44 pm

Re: BBcode for opening a link in local network

Post by slorge » Tue Jan 26, 2010 3:45 pm

Same here. We're using phpbb3 on our intranet only, so I need to have the ability to link to file shares on servers...
Haven't been able to do it yet...

User avatar
slorge
Registered User
Posts: 2
Joined: Tue Jan 26, 2010 3:44 pm

Re: BBcode for opening a link in local network

Post by slorge » Wed Jan 27, 2010 5:25 pm

I got this format to work, but only in Internet explorer. It doesn't work in firefox or chrome. I haven't tested it in Safari, Opera, etc.

Code: Select all

[url=file://servername/fileshare/file.html]LAN link[/url]

Kolthor
Registered User
Posts: 1
Joined: Sat Jun 26, 2010 2:02 pm

Re: BBcode for opening a link in local network

Post by Kolthor » Sat Jun 26, 2010 2:38 pm

The proper URI for a network share would be file://servername/fileshare/file.html -- however Firefox at least, will not open "file:"-links from a remote host, for security reasons. You can trick it, by referring to localhost, and then redirecting it to the remote host. You can do this by using file://localhost///servername/fileshare/file.html ("localhost/" can be shortened to just "/" so file://///servername/fileshare/file.html will work).

However, for security reasons, Firefox will never open "file:"-links from a page fetched using another protocol, so "file:"-links WILL NEVER WORK from a phpBB forum -- at least not with Firefox, and most likely not with most other browsers either.

You should do one of the following:
  • Upload the file to an internal webserver and link to it
  • Attach it to the forum post
  • Instruct your users to manually locate the file or copy/paste the link
  • Instruct your users to use Internet Explorer for the intranet forum
http://en.wikipedia.org/wiki/File_URI_scheme
http://en.wikipedia.org/wiki/Uniform_Re ... Identifier

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: BBcode for opening a link in local network

Post by callumacrae » Tue Jun 29, 2010 6:42 pm

Kolthor wrote:You can do this by using file://localhost///servername/fileshare/file.html ("localhost/" can be shortened to just "/" so file://///servername/fileshare/file.html will work).
://////////

I never knew that, thanks :D

~Callum
Made by developers, for developers!
My blog

Simpel
Registered User
Posts: 1
Joined: Fri Feb 24, 2012 2:18 pm

Re: BBcode for opening a link in local network

Post by Simpel » Tue May 22, 2012 5:21 pm

Hi,

that file://localhost stuff works great. My problem is that my users are copying and pasting the adress from the windows explorer. So I need a bbcode that's adding "file://localhost/" at the start and what's changing windows backslashes into the correct slashes. Can anybody help me?

Regards, Conrad

Post Reply