Tags:
create new tag
view all tags
Hi, we are in the process of looking to see what it would take to make the WebName more flexible. For instance, we want to allow webs such as "ApplicationIntegration" and "ArtificialIntelligence"

Has anyone already created a patch to allow this or have reasons why it would not be a simple fix?

Many thanks, Martin.

-- MartinCleaver - 12 Nov 2001

Looks like this is the bit of code that matches on the WebName. I Don't understand why it is searching for '-'s - I though that this would allow us to use Application-Integration as a webname, but to no avail.

s/([\*\s][\(\-\*\s]*)([A-Z]+[a-z0-9]*)\.([A-Z]+[a-z]+[A-Z]+[a-zA-Z0-9]*)/&internalLink($1,$2,$3,"$TranslationToken$3$TranslationToken","",1)/geo;

Suggestions?

-- MartinCleaver - 12 Nov 2001

Okay, fixed it to allow WikiWords:

s/([\*\s][\(\-\*\s]*)([a-zA-Z0-9]*)\.([A-Z]+[a-z]+[A-Z]+[a-zA-Z0-9]*)/&internalLink($1,$2,$3,"$TranslationToken$3$TranslationToken","",1)/geo;

Now, if we had TopicNotFoundInThisWeb implemented then we could have TWiki recognise WikiWords that were names of webs, such that the mention of such a TopicWeb WikiWord would, by default link to the TopicWeb .WebHome topic.

-- MartinCleaver - 15 Nov 2001

Implemented as WebNameAsWikiName. See also WebNameAsWikiName for the patch to TWikiAlpha.

-- MartinCleaver - 29 Apr 2003

My solution to this was to allow underscores in web names

s/([\*\s][\(\-\*\s]*)([a-zA-Z0-9_]*)\.([A-Z]+[a-z]+[A-Z]+[a-zA-Z0-9]*)/&internalLink($1,$2,$3,"$TranslationToken$3$TranslationToken","",1)/geo;

And taking care of making web names non WikiWords by using name spaces: e.g., not ProductDoc, but Product_Doc. Using WikiWords was too problematic with the web name being transformed into links, especially in parts such as skin decorations...

In my experience, the underscore trick is OK with users and brings no unexpected problems...

-- ColasNahaboo - 29 Apr 2003

You can implement Colas' solution more easily in TWikiRelease01Feb2003, see Support.WebNameAsWikiName for the details - you just change a single line that defines a regular expression matching Wiki words, at about line 471:

    $webNameRegex = qr/[$upperAlpha]+[$lowerAlphaNum]*/;

Changing this to something like the following should work (not tested):

    $webNameRegex = qr/[$upperAlpha]+[_$lowerAlphaNum]*/;

-- RichardDonkin - 29 Apr 2003

Opps, sorry, forgot this I had made this for the feb 2003 release also. I just checked, my line in lib/TWiki.pm is in fact:

    $webNameRegex = qr/[$upperAlpha]+[_$mixedAlphaNum]*/;

-- ColasNahaboo - 29 Apr 2003

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2003-04-29 - ColasNahaboo
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.