Code for InterWiki linking. I got this in December but never forwarded
this to the list for feedback.
~swain
...............................ooo0000ooo.................................
Hear FM quality freeform radio through the Internet: http://wcsb.org/
home page: www.wcsb.org/~swain
---------- Forwarded message ----------
Date: Fri, 8 Dec 2000 15:50:53 -0500 (EST)
From: Steve Wainstead <sw...@pa...>
To: sw...@wc...
Subject: PhpWiki InterWikiLinking (fwd)
http://wcsb.org/~swain/ | "In a calendar year, America's entire
* * * * * * | recorded music industry has revenues
* * * * * * | roughly equal to one month's sales by
* * * * * * | IBM." --Philip Greenspun
---------- Forwarded message ----------
Date: Fri, 8 Dec 2000 17:25:19 +0000 (GMT)
From: Gary Benson <ga...@ee...>
To: Steve Wainstead <sw...@pa...>
Subject: PhpWiki InterWikiLinking
Hi,
I have implemented an InterWiki linking thing in PhpWiki, and thought you
might want it. In case you do, here's whats in the files:
intermap.patch.gz alters the following files:
lib/config.php - 2 more options added, $InterWikiLinkRegexp and $intermap_file.
lib/stdlib.php - added function LinkInterWikiLink($link)
lib/transform.php - Added hook to tokenize and substitute InterWikiLinks.
index.php - includes intermap.php (see below)
intermap.php, which should go in lib, generates a hash of Wiki's names
against their base URL. It also replaces a bit of $InterWikiLinkRegexp so
that only valid wiki names are parsed as InterWiki links. This emulates
both Wiki and MeatBall's behaviour.
intermap.txt is a copy of the current intermap file, which is downloadable
from http://www.usemod.com/intermap.txt
Hope it's all okay,
Gary
|