linking1Add my vote for this tag rendering1Add my vote for this tag create new tag
, view all tags

InterwikiPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on InterwikiPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please file bug reports in the InterwikiPlugin bug database.
• See InterwikiPluginDevArchive for older discussions.

Feedback on InterwikiPlugin

-- AndreaSterbini - 20 Feb 2001

It would be nice if %22 (quotation mark ") was also allowed, so that you could do phrases e.g. Google:daily+build+and+smoke+test

-- SamHasler - 11 Oct 2004

Just wanted to report that I think the issue highlighted by AdamTheo on 20th May 2004 regarding interwikis inside square brackets, that subsequently get INCLUDED in other webs is a bug.

I think Peter was right on 02 June 2004 when he hinted at this.

Basically, if you have a page in web A, which wraps an interwiki in square bracket syntax (so you can define the rendered text), and then INCLUDE this page, the interwiki only gets rendered properly in web A.

If you take the sqaure brackets away, the interwiki is rendered properly in all webs.

I came across this when I wanted to set up an interwiki in my personal side bar, which obviously gets included in other webs.

Hope this was useful.

-- SteveJonesST - 24 Jan 2005

We are playing with providing an acronym list in TWiki and the Acronym:TLA rendering is not what we like - we would like to see the same rendering as TLA in order not to stop the flow of the sentence. In fact the same thing that TedPavlic suggested on 22 Aug 2003.

Is there a chance that this becomes reality at some point? If :: is a problem for the Perl behind the scenes I am willing to go with things like :-:, -:- et cetera.

-- TorbenHoffmann - 01 Nov 2005

The InterWikis list is out-of-date and incorrect. The original WikiWikiWeb is duplicated as PortlandPatternRepository (I assume this is intentional). The MoinMoin link has changed to http://moinmoin.wikiwikiweb.de/, Zope is now http://zwiki.org/, and PhpWiki has an extra index.php3 in the link. Documentation-wise, I find the "Wiki site" redundant and changed it to "wiki" for my department (just a suggestion).

-- WillGray - 30 Jan 2006

According to an idea from ExternalLinkPluginDev each interwiki link could be marked with a special (unique) icon which can be set within a new row in the definition table (InterWikis).

May be configuring the shown prefix for each interwiki links separately is a good idea too, so you can decide per interwiki, if you want a prefix, an icon, both or nothing of them displayed.

-- TobiasRoeser - 03 Apr 2006

Excellent idea!

-- FranzJosefSilli - 03 Apr 2006

In "Syntax Rules" section should be a note that aliases must start with uppercase, or maybe I'm wrong? I've lost some time before the plugin start working for me. What I changed is starting lowercase in alias to uppercase, frustrating :-/

-- JacekZapotoczny - 13 Jul 2006

Thanks for pointing this out. Fixed in Bugs:Item2624, SVN 11015.

-- PeterThoeny - 14 Jul 2006

BUG: Interwiki links don't seem to work when the target text is a single digit. Eg. ISBN:1 vs ISBN:12

Aside: despite being registered here, I can't log in to the bugs web.

-- EliotBlennerhassett - 25 Aug 2006

Is it possible to pass more than one argument? I'm trying to link to a collabnet installation where the urls look like


So I'd like the interwiki link to look like


With the template specification


The plugin currently accepts commas (and lots of other punctuation) in the page name but doesn't split on them - so it might break some people's links if the plugin suddenly changed. But perhaps a "split on ," could be combined into the properties column as suggested by WillGray above?

-- IanRogers - 06 Sep 2006


should work for now.

-- FranzJosefSilli - 06 Sep 2006

This would not work for Ian since the PROJECT needs to be listed twice.

I think enhancing the InterwikiPlugin to support multiple arguments is a bit overkill for this simple plugin. How about creating a new plugin that does that? With this you could also support a custom format if you like, such as Cn(PROJECT,PATH), Cn::PROJECT::PATH or the like.

-- PeterThoeny - 10 Sep 2006

How would I got about configuring the URL created by InterWikiPlugin so that I can point to a new target? My goal is that when the anchor tag is created it will open up with a new browser window. It's ideal for our environment where we are pointing to an external issue tracker and we don't want to surf away from our Twiki pages holding a list of our issues.


<a href="http://www.elementool.com/Services/Common/quickview.aspx?accntname=companyname&issueno=6976" target="_blank"> 

is the end result that's created from an alias like ETool:6976

However, there's currently no way to modify the attributes of the anchor tag that's created.


-- BrianBeaudet - 18 Sep 2006

That sounds like a useful enhancement. Can be done with a new plugin setting, such as OPEN_NEW_WINDOW.

-- PeterThoeny - 19 Sep 2006

I'd rather the reader not be bothered with seeing the external wiki name because it interrupts the flow of a sentence. Is it possible to format interWiki links so that they appear as normal WikiWords (without the ExternalSite: in front ?

Wikipedia:Big_Easy_Rollergirls would appear as simply Big_Easy_Rollergirls

-- KeithHelfrich - 09 Oct 2006

That could be done with a new plugin settings, such as NO_SITE_PREFIX. Although you'd lose the visual clue that this is a link to the outside. Possibly better to add a new INTER_LINK_FORMAT setting where you have control over the link, such as adding an icon that indicats an external link. Example format:

  • Set INTER_LINK_FORMAT = <a href="$url" title="$tooltip" alt="$site:$page">$site:$page</a>
-- PeterThoeny - 09 Oct 2006

Sounds great! But also seems the code has not been written yet to make this INTER_LINK_FORMAT setting work. Since I'm not a programmer, is someone willing to write the code, or send guidance ?

-- KeithHelfrich - 10 Oct 2006

Is there a reason that @ is missing in $pagePattern of the plugin module? I use the plugin to link files from ClearCase. The example link is defined as follows: ClearCase:/vobs/vobName/path/to/file/fileName.ext@@/MY_LABEL. Until I added @ to the $pagePattern = "([${man}_\/][$man" . '\.\/\+\_\,\;\:\!\?\%\#\@-]+?)'; (line 84 of InterwikiPlugin.pm) the link was broken.

-- JacekZapotoczny - 07 Nov 2006

New plugin version 11924 posted on plugin topic and installed on twiki.org.

To BrianBeaudet and KeithHelfrich: You can customize the link format with a INTERLINKFORMAT setting. (I removed the redundant SUPPRESSTOOLTIP.

To JacekZapotoczny: I added the @ signs to the allowed page symbols.

To EliotBlennerhassett: Single digit page names are now supported.

-- PeterThoeny - 08 Nov 2006

New plugin version 08 Nov 2006 (r11935) released: Added css class="interwikiLink" to link.

-- PeterThoeny - 08 Nov 2006

Hi Peter, thanks !!

But unfortunately the new plugin does not work on CairoRelease. I'm still waiting for the KoalaSkin before I can upgrade to Dakar. But as I mentioned in EncouragingUpgrading, I think that twiki should move ahead without Cairo. So unless it would be easy for you to produce a Cairo version of the plugin, I would just simply wait until after I upgrade to get this feature.

-- KeithHelfrich - 09 Nov 2006

I know, it does not work on Cairo due to an unfortunate plugin API change (Cairo's startRenderingHandler callback changed to preRenderingHandler in Dakar). This results in upgrade pains; it makes it also difficult to maintain a plugin Cairo and Dakar compatible. I did not take the time to do the extra coding to make it run on old and new TWiki versions as described in HandlingCairoDakarPluginDifferences. For your Cairo installation you can try to change preRenderingHandler to startRenderingHandler.

-- PeterThoeny - 09 Nov 2006

Instead of getting into the code, I think I'll just wait for DakarRelease. One question about your changes to the InterwikiPlugin: with the new css class "interwikiLink", I should now be able to set INTERLINKFORMAT = $page and then change the CSS class to have an alternat font color. This would help identify links to external websites but avoid interrupting the flow of the sentence, is that correct ?

-- KeithHelfrich - 10 Nov 2006

Yes, that is the idea. PatternSkin change for InterwikiPlugin is pending.

-- PeterThoeny - 10 Nov 2006

Bug report: Interwiki links in %INCLUDE% do not work, see Bugs:Item3135.

-- ThomasWeigert - 13 Nov 2006

Interwiki links in %INCLUDE% was never supported; I find this a useful enhancement.

-- PeterThoeny - 13 Nov 2006

Hi Peter, what do you think about following addon functionality. Use the InterWiki URL param also for an URL reengineering. So when a topic is saved, its also used to transform a URL given by copy and paste or through drag&drop on modern browsers to its InterWiki representation.

So users could simply "insert" their long unhandy URLs like "http://groups.google.com/groups?hl=en&safe=off&group=MyCurrentGroup" and when saving this topic it will become to Group:MyCurrentGroup.

I think the only important thing is, that the reengineering regex must could handle unsorted/mixed params and there could be more than on reengineering regex to generate an InterWiki Link.

-- ThomasFreudenberg - 13 Nov 2006

Another question left is the representation of links. For now you have added a class="interwikiLink". Wouldn't it be better to have a more flexible method? I think about an extension to ExternalLinkPlugin. When there would be optional the possibility to write down a set of regex for external and internal link identification and for an extra icon or tooltip or css class or whatever to identify them, everyone could define the representation of internal and external links.

-- ThomasFreudenberg - 13 Nov 2006

On sanitizing URLs: I am not in favor of automagically changing content the user is typing into the edit window. For example, I hate M$Word second-guessing me and "fixing" TWiki to Twiki. I would nt block this enhancement though, but it needs to be configurable, with default to "off".

On link representation: The class="interwikiLink" is a flexible solution for skin authors and administrators. It is also possible to change the style by changing the INTERLINKFORMAT setting (such as adding a small image.)

-- PeterThoeny - 14 Nov 2006

I am with you, default to "off", just working on the regex the site has declared and btw. I hate this M$Word fixing too wink

I think working with a class="interwikiLink" is pretty fine, but I think also, that it would be a good thing, if you could have more than one class element for showing interwikiLink. Maybe you will define one with symbol for search eingines, one for news sites and so on.

-- ThomasFreudenberg - 14 Nov 2006

I see now what you are getting at. This could be done with a new "Class" column in the rule definition table.

-- PeterThoeny - 14 Nov 2006

This reminds me of an old patch which does something similar but takes a different route. It allows straight HTML in the URL column. So if it detects some < markup, only the $page variable is substituted, nothing else. As that markup requires plenty of spaces, the internal split up function uses tabs instead.

Examples for working rules:

RFC RFC$page Creates the canonical format for RFCs which is without ':'
Man $page Format link to Unix man page in the usual italics style w/o leading Man:
Group $page pointer to google groups search with some icon


  1. Use any fancy formatting you want; basically this turns the alias into a HTML macro with one parameter
  2. You can decide on this formatting per alias. Many aliases look fine with the Foo:bar syntax, e.g. sth like Bug:4711. Others need only slight tweaks. Others might want fancy graphics, stylesheets or even javascript so there is no one-size-fits-all solution
  3. You must not necessarily use this as link. Reference images from a library with bulky or volatile path or inline the graphs from some web application with parameterized URL.
  4. No new table layout, no new syntax
  5. The support of this raw syntax has basically 0 performance impact. Adding an alias "macro" has less impact than adding a custom rendering rule in the DefaultPlugin.
  6. The rendered alias table looks nice
  1. The alias table in edit mode looks even uglier than now
  2. If you want all aliases in a different format, you are in for some tedious work
  3. You need to know HTML; learning a bunch of wiki preferences might be easier for some
  4. If you start using this seriously, i.e. add many alias rules, performance suffers; numbers tbd
  5. Ooops: this sample here uncovered some bug with a rel=nofollow markup inserted wrongly if you type the URLs sloppily w/o doublequotes. XML-stricters: count this as advantage.
InterwikiPlugin.1.006.patch.txt attached below.

-- PeterKlausner - 16 Nov 2006

This looks good. I do not see the disadvantages as a hurdle since it is typically the admin who updates the rules table, and since the default is the simple URL. Any chance to get a patch that is based on the latest .zip file?

-- PeterThoeny - 16 Nov 2006

Problem with interwiki links reported in Feb:( with no feedback. Can anyone take a look on it? Bugs:Item3668

The problem is that if I include topic with defined InterWiki links, all of them are broken in including topic.

-- JacekZapotoczny - 28 Jun 2007

The INTERLINKFORMAT is great. But it doesn't seem to let me choose my own link text with double brackets. For example, in my site,


[[TWiki:Codev.WhyWebsAreABadIdea][bad idea]] 

expands to


instead of

bad idea

  • The INTERLINKFORMAT is supposed to be a link (default <a href="$url" title="$tooltip" class="interwikiLink">$label</a>). I can't reproduce your example with a proper link format. -- PeterThoeny - 30 Sep 2007
-- KeithHelfrich - 08 Jul 2007

I am confused. It seems that I can set up an Interwiki link like this

   Foo   http://foo.corp.com/twiki/bin/view/

and Foo:MyWeb.TopicOne will work.

but I cannot set up something like this


(with or without the trailing slash) where I want Foo:TopicOne to work.

-- VickiBrown - 18 Sep 2007

This is a cross-post of InterwikiWeirdness.

-- PeterThoeny - 30 Sep 2007

One of my co-workers comments that the resulting string, e.g. Foosite:Link is ugly. Myself, I tend to agree. I understand the rationale is to inform the user that a click will takke him to Foosite but... it's ugly.

I'm wondering if it would look better to do something like Foosite: Link or Foosite:_Link. Comments anyone?

-- VickiBrown - 09 Nov 2007

No. wink

-- FranzJosefGigler - 11 Nov 2007

You can redefine to look of the link with a custom INTERLINKFORMAT setting. Personally I prefer the Site:Page style, it suggests that this is a pattern with a prefix.

-- PeterThoeny - 20 Nov 2007

Hi there, I just upgraded the internal TWiki deployment and had to add the '=' ('\=') to the pageSite regex. Could you please also add it to the actual plugin-code... thank you

-- BenjaminFelder - 22 Nov 2007

This small enhancement is now tracked in TWikibug:Item5025

-- PeterThoeny - 25 Nov 2007

I have an idea for this, mainly to make it more useful in the general case (rather than Interwiki).

Most users will be able to understand that to separate something with this syntax, they need to replace the space with a character, like _. So if I wanted to search Google, it would be Google:TWiki_is_awesome . However, that's going to search with the _ as one word. They needed to use +! But + is ugly, doesn't fit, and exposes the search mechanism. This has obvious problems in other places that use something else as the separator, which might even be %2F (that's space, right? smile ). For example, a user might want to link to Java documentation, in which case you would want a different separator, like Java:java.awt.ClassIMadeUp , but right now it would need to be Java:java/awt/ClassIJustMadeUp , as Javadoc is based on a directory structure.

So I can see a huge need to be able to substitute a character for another one, using an extra two table columns called "user separator" and "resource separator" or something like that, so a mapping can take place and generate pretty and consistent links.

-- ChrisFLewis - 18 Dec 2007

I would love to see InterwikiPlugin cooperate with RedirectPlugin.

I want to do %REDIRECT{"OtherWiki:Web.Topic"}%.

-- VickiBrown - 20 Dec 2007

Can we have a customized $label column in the rules table? For example

RFC http://www.faqs.org/rfcs/rfc$page.html IETF RFC #$page RFC$page
Bug http://bugtrack.com/ $page on bugtrack Bug#$page

Then we can do alias based formatting.

-- BoGao - 24 Jan 2008

BrianBeaudet's request (18 Sep 2006) for configurable attributes such as target="_blank" was addressed by version 11924 (07 Nov 2006). E.g., I also added an icon next to the links, so that there was consistent behavior with how TWiki:Plugins.ExternalLinkPlugin renders all non-InterWiki links.

  • Location of Change: your local TWiki.InterWikiPlugin
  • Default Value: <a href="$url" title="$tooltip" class="interwikiLink">$label</a>
  • New Value: <a href="$url" title="$tooltip" class="interwikiLink" target="_blank">$label</a><img src=/pub/TWiki/ExternalLinkPlugin/external.gif>
-- SeanCMorgan - 08 Apr 2008

The topic where the configurations are stored should not be in the TWiki web. For easier upgradability we need to keep locally customized topics out of the TWiki web. Best would be to allow additional configurations to be put into the Main web, but if not, we should put this topic into the Main web.

-- ThomasWeigert - 2010-09-12


-- PeterThoeny - 2010-09-12

Bug Report: When one has a wiki link in the tool tip column in the InterWikis table, then the resultant link is broken.

-- ThomasWeigert - 2010-09-15

That is a known limitation. Existing rules have page name enclosed in single quotes to work around this, such as '$page' on 'Wikipedia'. The plugin could be fixed by scanning for and escaping WikiWords and ACRONYMS in tool tip text.

-- PeterThoeny - 2010-09-15

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt InterwikiPlugin.1.006.patch.txt r1 manage 2.6 K 2006-11-16 - 10:44 PeterKlausner Patch of 1.006 to support arbitrary HTML markup in aliases
Edit | Attach | Watch | Print version | History: r98 < r97 < r96 < r95 < r94 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r98 - 2011-05-12 - ThomasWeigert
  • 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-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.