Tags:
create new tag
, view all tags

Question

We want to store links to a Lotus Notes server in our intranet wiki( e.g. for contact data, documents ).

Links have the form notes://server001/C125716C00299987/85255E01001356A8852554C200753106

But see what happens when I write

[[Notes://server001/C125716C00299987/85255E01001356A8852554C200753106][ link ]]

it creates an unknown Wiki topic:

link

So the question is: Where and how can I configure the notes: protocol to be treated like http: ( or ftp: or mailto: ) protocol ?

other references:

TextFormattingRules#Hyperlinks

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, SlashFilenamePlugin
Server OS: XPSP2
Web server: Apache 2
Perl version:  
Client OS:  
Web Browser:  
Categories: Installation, Documentation

-- AndreasNagl - 17 May 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

You can add the notes protocol to the $regex{linkProtocolPattern} in your twiki/lib/TWiki.pm. (Don't forget this on a TWiki upgrade.)

-- PeterThoeny - 17 May 2006

A future TWiki version will have a configuration option, see Bugs:Item2301.

-- PeterThoeny - 17 May 2006

I added notes to the linkProtocolPattern and rebooted to force regex recalculation. It did not work. Behavior is the same like before.

-- AndreasNagl - 18 May 2006

That sounds a bit strange. Could you post before/after code change and the exact example you are using?

-- SteffenPoulsen - 18 May 2006

I noticed you example has a capital "n". This is case sensitive, does it work with all lower case?

-- PeterThoeny - 18 May 2006

Change in TWiki.pm:

before: $regex{linkProtocolPattern} = '(file|ftp|gopher|https|http|irc|news|nntp|telnet|mailto)';

after: $regex{linkProtocolPattern} = '(file|ftp|notes|gopher|https|http|irc|news|nntp|telnet|mailto)';

example for link see above.


just got a new clue: capitalisation is important:

small notes Big Notes

I thought this is handled by the script, as ppl type links not always correct.

-- AndreasNagl - 18 May 2006

sorry, try this one: small gopher vs. Big gopher

-- AndreasNagl - 18 May 2006

There's no problem in altering the pattern to be case-insensitive, i.e. just use something like this:

$regex{linkProtocolPattern} =
      '(?i)(file|ftp|notes|gopher|https|http|irc|news|nntp|telnet|mailto)';

but are you sure you wouldn't be happier looking at small caps URI schemes only? (In other words, training your users a little bit on this?)

-- SteffenPoulsen - 18 May 2006

well, I will add "Notes" to the pattern, as this is the format I get it from the cut&paste buffer.

-- AndreasNagl - 19 May 2006

Sounds like a pragmatic solution for the problem at hand smile Thanks for reporting!

-- SteffenPoulsen - 19 May 2006

Note that at some point after 4.0.0 this regexp has become a configuration item, so should do into LocalSite.cfg

-- BenjaminSewell - 18 Apr 2007

 
Topic revision: r11 - 2007-04-18 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.