1. Let's expand
WikiLink to link at any commonly-used resource. 2. Let's proxy pages from pther's resources to parse
WikiLinks in their texts, to provide two-way links.
Explanation: I've a Wiki. Nice. I've Bugzilla bug tracking system. Nice, too. I want to register some specific rule for
WikiLink started from
BugNo chars, so
BugNo123 should map to e.g.
http://bug.dev.null/cgi-bin/query?bug=123
. From other side, I want to filter Bugzilla's outputs through some proxy, to replace all
WikiLinks in Bugzilla's texts with {A HREF="..."} to my Wiki installation: e.g. output will contain special
HTML tag 'WIKI' to surround text where
WikiLinks should be detected.
Similary, another rule should map
DoxySTL:ofstream to
http://www.dev.null/Doxy/STL/class_std_ofstream.html
, and it's easy to add some formatting rule to
DoxyGen, to produce the same 'WIKI' tag in
DoxyGen's outputs.
The result is not only integration of Wiki and Bugzilla, or Wiki and Doxygen. This integration becomes 'transitive': if bug report in Bugzilla contains
WikiLink to
DoxyGen, this link will be resolved, too.
To implement this, just 1) put the code of link's resolution in separate, well-documented file, to make it customizable, and 2) write a simple proxy with use of the same 'separated' unit.
I've used some 'homemade' Wiki, written on C++ (Xitami, Windows), to provide this functionality. Now I experiment with TWiki under Linux and want to have the same thing written in Perl, but without studying Perl :).
--
IvAn - 23 Jul 2000
That is the trend, to integrate web based tools. This is a very powerful way to enhance the usability of tools.
New link rules can be easily done in TWiki with extended common tags, and is in fact used by
TakeFive to link the bug tracking number (i.e.
TKFat12345 ) to the actual page in the bug tracking system.
Simply define your rule inside
sub extendHandleCommonTags of file
wikicfg.pm .
Example: You want to link
BugNo123 to
http://bug/query?id=123 . The regular expression (
s/from/to/ ) rule in Perl is:
$text=~ s#(BugNo)([0-9]+)#<a href=\"http\://bug/query\?id=$2\">$1$2</a>#go;
You could do similar stuff with ISBN numbers, call tracking numbers, purchase order numbers and so on.
--
PeterThoeny - 23 Jul 2000
This works fine for me - I have a local extension expression which recognises \\SERVER\SHARE and maps it into a link to our local windows (samba actually) file server. This means windoze weenies can just cut and paste a file name into a page and it becomes clickable by other (internal) users.
Hopefully this is a kind of transition mechanism - I am trying to encourage users not to put links like 'X:\DOCS\SUPPORT.HTM' into html files, so turning our file server into a default intranet! Twiki is good, because it prevents users from even considering the linking mechanism, so they can't get it wrong!
--
CrisBailiff - 23 Jul 2000
I implemented automatic linking of class names to
DoxyGen pages the following way:
# =========================
sub handleDoxygenClass
{
my( $name ) = @_;
# only create a link if corresponding page exists
if ( -f "/www/doxyhelp/html/class_$name.html" ) {
return "<a href=\"http://mydomain.com/doxyhelp/html/class_$name.html\">$name</a>";
}
return $name;
}
# =========================
sub extendHandleCommonTags
{
...
# Link potential classnames (here MFC style: CClassName) to DoxyGen.
$text =~ s/\b(C[A-Z]\w+)\b/&handleDoxygenClass($1)/geo;
...
}
--
ThomasDartsch - 17 Aug 2000
I'd like to do this same kind of extension for automatic
linking to external documentation (of classes).
However, many of the class names I'd like to reference
have "_" (or even "-", depending on the language)
As a result, they aren't really
WikiNames
I'll be looking into this in a few weeks, when I really
get going on use of a Wiki to be the "design documentation"
for a substantial API we will be building.
--
StanleyKnutson - 27 Nov 2000
The
WikiWord regex could be changed to allow the '_' and '-' chars, but this would break other stuff, like
_bold_ for example. Why not use the
[[...]] type link for class names that contain '_' and '-' chars?
Or you could define a custom rule (now in wikicfg.pm, soon as a
TWikiPluginAPI file) that looks for class declarations depending on the C++ syntax.
--
PeterThoeny - 28 Nov 2000
To do thins kind of thing consistently on my work's Twiki i added a new URL of the form bug://1234 which then gets expanded into a hyperlink with a very long and convoluted URL to the bug system's web proxy.
Similarly I added some more code to view files from MS VSS using ....
vss://the/file/path
--
SvenDowideit - 29 Dec 2000
Is this the way that
InterWiki can work - e.g. wiki://www.mywiki.com/WikiWeb.PageName ...?
How might each site indicate on which URL the Wiki is hosted? Hmm. Is this discussed somewhere?
Thanks,
M.
--
MartinCleaver - 05 Feb 2001
Not exactly ...
InterwikiPluginEarlyDev just concatenates the part after the colon to a fixed url listed in a topic.
A useful extension would be that the
InterWikis topic lists pairs of patterns and replacement strings ... that's really easy to do in Perl. (thanks for the suggestion)
--
AndreaSterbini - 05 Feb 2001
I'd really like to do the same thing to link to a bug tracking system (Royal Blue, as it happens). This would make TWiki much more useful as a way of integrating third-party web applications.
A couple of questions:
- What's the best syntax? I'd like something like bug:1234 for ease of use - would this conflict with the InterwikiPluginEarlyDev syntax, in which case maybe I should just extend that?
- Is InterwikiPluginEarlyDev working today on the March beta of TWiki, and is that beta fairly stable? If not, maybe I'd better do a quick hack on an earlier version.
BTW, this topic is a strong candidate for renaming

I had no idea what it meant until I read the first few lines. Something like
OtherWebsiteIntegration maybe?
--
RichardDonkin - 02 Jun 2001
I have now got this bug tracking link working, and also got
InterwikiPluginEarlyDev working - very nice. The link to Royal Blue bug tracking looks like this, added to the end of the
DefaultPlugin.pm file's
commonTagsHandler function where it talks about custom extensions. This code is based on the March 2001 beta release:
# - Integrate with Royal Blue
$_[0] =~ s|bug:([0-9]+)|'<a href="http://www-internal/bug/callview.asp?treeid=' . &zeroExtendNumber($1) . '">' . $1 . '</a>'|geo;
This requires the following function in the same file (couldn't get
sprintf to embed directly in the substitute command):
# Zero extend number to suit Royal Blue
sub zeroExtendNumber
{
my ( $n ) = @_;
return sprintf("%020d", $n); # Twenty digits
}
Rather neat that TWiki makes this so simple, even though my Perl is a bit rusty - I have already backported it to our live May 2000 installation... This sort of feature makes TWiki very useful as a sort of 'integration mini-portal', bringing various application modules and data together within a single user-focused page. For example, I have a TWiki page linking together all the bugs I've submitted that are not part of customer projects, and one of our developers links to all the bugs he's either working on or has fixed.
--
RichardDonkin - 04 Jun 2001
See
MoreArbitraryTextForWikiWordLinks for some more discussion - a good name for this area would be helpful
--
RichardDonkin - 09 Jun 2001