YAFLogo

ckm
  • ckm
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Is there a way to link to a UNC Path? Example: \\servername\folder\subfolder\file.doc

Sponsor

imukai
  • imukai
  • 100% (Exalted)
  • YAF Commander
14 years ago
It seems the built in [URL] only "allows" http: and https:

I had an issue where we wanted to link to a UNC folder on our internal network. The format needed to be file://uncpath/whatever for it to work. The [URL] tag converted this to http://file//uncpath/whatever which of course failed.

My quick & dirty workaround was to add a custom BBCode Extension (v1.9.3 of YAF). I called it [ANYURL], which basically accepts anything at all and makes it into a hyperlink.

Under Admin / BBCode Extensions:

1. Click Add
2. Name = ANYURL
3. Exec Order = 1
4. Description = [ANYURL]whatever[/ANYURL]
5. Search Regex = \[anyurl\](?.+)\[\/anyurl\]
6. Replace Regex = ${inner}
7. Save

Now I just [anyurl]file://uncpath/whatever[/anyurl] and it works just fine. Only downside is I can't add flavor text to it - I'm not enough of a RegEx guru to figure out how to do that. :oops:

Dennis Hevener
12 years ago
Thanks--just what I needed.

Here is how to make decorative text for the URL

1. Click Add
2. Name = ANYURL
3. Exec Order = 1
4. Description = [ANYURL="anyurl"]text[/ANYURL] (does not prepend http://)
5. Search Regex = \[anyurl\=(?.+?)\](?.+?)\[\/anyurl\]
6. Replace Regex = ${inner}
7. Replace Variables = url;inner
8. Save
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button