| 1 | = Support for InterWiki links = |
| 2 | |
| 3 | ''This is a proposal for implementing #40 and #1414'' |
| 4 | ''I think it's now ready for testing (see r1912)'' |
| 5 | |
| 6 | == Definition == |
| 7 | |
| 8 | An InterWiki link can be used for referring to a Wiki page |
| 9 | located in another Wiki system, and by extension, to any object |
| 10 | located in any other Web application, provided a simple URL |
| 11 | mapping can be done. |
| 12 | |
| 13 | == Link Syntax == |
| 14 | |
| 15 | {{{ |
| 16 | <target_wiki>(:<identifier>)+ |
| 17 | }}} |
| 18 | |
| 19 | The link is composed by the targeted Wiki (or system) name, |
| 20 | followed by a column (e.g. {{{MeatBall:}}}), |
| 21 | followed by a page specification in the target. |
| 22 | |
| 23 | The target Wiki URL is looked up in a the InterMapTxt wiki page, |
| 24 | modelled after |
| 25 | [http://www.usemod.com/cgi-bin/mb.pl?InterMapTxt MeatBall:InterMapTxt]. |
| 26 | |
| 27 | An addition to traditional InterWiki links, where the target |
| 28 | is simply ''appended'' to the URL, |
| 29 | Trac supports parametric InterWiki URLs: |
| 30 | identifiers {{{$1}}}, {{{$2}}}, ... in the URL |
| 31 | will be replaced by corresponding arguments from a list |
| 32 | made up from the page specification split by the ':' token. |
| 33 | |
| 34 | == Examples == |
| 35 | |
| 36 | If the following is an excerpt of the InterMapTxt page: |
| 37 | |
| 38 | {{{ |
| 39 | = InterWiki Map = |
| 40 | |
| 41 | This is the InterMapTxt wiki page, |
| 42 | modelled after the MeatBall:InterMapTxt page. |
| 43 | ---- |
| 44 | {{{ |
| 45 | ... |
| 46 | LiveJournal http://livejournal.com/users/ |
| 47 | Login http://www.usemod.com/cgi-bin/mb.pl?action=login&p_userid= |
| 48 | MbTest http://www.usemod.com/cgi-bin/mbtest.pl? |
| 49 | MeatBall http://www.usemod.com/cgi-bin/mb.pl? |
| 50 | MetaWiki http://sunir.org/apps/meta.pl? |
| 51 | MetaWikiPedia http://meta.wikipedia.org/wiki/ |
| 52 | Mineralienatlas http://www.mineralienatlas.de/lexikon/index.php/ |
| 53 | MoinMoin http://moinmoin.wikiwikiweb.de/ |
| 54 | ... |
| 55 | Trac http://projects.edgewall.com/trac/$1/$2 |
| 56 | }}} |
| 57 | }}} |
| 58 | |
| 59 | Then, |
| 60 | * {{{MoinMoin:InterWikiMap}}} should be rendered as |
| 61 | [http://moinmoin.wikiwikiweb.de/InterWikiMap MoinMoin:InterWikiMap] |
| 62 | * {{{Trac:wiki:InterWiki}}} should be rendered as |
| 63 | [wiki:InterWiki Trac:wiki:InterWiki]. |
| 64 | |