1 # <a name="Interwiki Plugin"></a><a name=" Interwiki Plugin"></a> Interwiki Plugin
3 The %TOPIC% links <code>**ExternalSite:Page**</code> text to external sites based on aliases defined in the [[InterWikis]] topic. This plugin is inspired by UseMod Wiki's inter-wiki links, <http://www.usemod.com/cgi-bin/wiki.pl?InterWiki>.
7 <li><a href="#Syntax Rules"> Syntax Rules</a></li>
8 <li><a href="#%TOPIC% Settings"> %TOPIC% Settings</a></li>
9 <li><a href="#Plugin Installation Instructions"> Plugin Installation Instructions</a></li>
10 <li><a href="#Plugin Info"> Plugin Info</a></li>
14 ## <a name="Syntax Rules"></a> Syntax Rules
16 - Enter <code>**ExternalSite:Page**</code> to create a link that points to the <code>**Page**</code> on the <code>**ExternalSite**</code> server.
17 - Enter <code>**\[[ExternalSite:Page]\[any label]]**</code> to specify a custom label.
18 - All <code>**ExternalSite**</code> aliases are defined in the [[InterWikis]] topic.
19 - Add and edit aliases in [[InterWikis]].
20 - Each entry must be of format: <br /><code>**| External site alias | URL | Tooltip help text |**</code>.
21 - Site aliases must start with an upper case letter and may contain alphanumeric letters.
22 - The URL and Tooltip Text may contain optional <code>**$page**</code> variables; the variable gets expanded to the page name.
23 - %H% For TWiki sites, both the **web** and the **topic** have to be specified: <code>**TWikisite:Webname/SomePage**</code>
24 - TWiki:Plugins/InterwikiPlugin or TWiki:Plugins.InterwikiPlugin
26 ## <a name="%TOPIC% Settings"></a> %TOPIC% Settings
28 Plugin settings are stored as Preferences variables. To reference a plugin setting write <code>**%<plugin>\_<setting>%**</code>, for example, <code>**%INTERWIKIPLUGIN\_SHORTDESCRIPTION%**</code>
30 - One-line description, shown in the [[TextFormattingRules]] topic:
31 - Set SHORTDESCRIPTION = Link <code>**ExternalSite:Page**</code> text to external sites based on aliases defined in a rules topic
33 - Link rules topic name: (default is [[InterWikis]])
36 - Inter-link format, with variables: <table border="1" cellpadding="0" cellspacing="0">
43 <td> Page (part after colon) </td>
47 <td> Site URL (might contain $page) </td>
51 <td> Equal to $site:$page </td>
55 <td> Tooltip message </td>
58 - Set INTERLINKFORMAT = [$label]($url $tooltip)
60 ## <a name="Plugin Installation Instructions"></a> Plugin Installation Instructions
62 %X% **NOTE:** This Plugin is included in the TWiki distribution package. You do not need to install it unless you want to upgrade to a newer version.
64 - **Download** the ZIP file from the TWiki:Plugins web (see below)
65 - **Unzip** <code>**%TOPIC%.zip**</code> in your TWiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0">
67 <th bgcolor="#99CCCC"><strong> File: </strong></th>
68 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
71 <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
72 <td> Plugin topic </td>
75 <td><code><b>data/TWiki/InterWikis.txt</b></code></td>
76 <td> Link rules topic for inter-site links </td>
79 <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
80 <td> Plugin Perl module </td>
83 - **Test:** If the Plugin is correctly installed, this Wiki:InterWiki link should point to <http://c2.com/cgi/wiki?InterWiki> topic - try it out.
85 ## <a name="Plugin Info"></a> Plugin Info
87 <table border="1" cellpadding="0" cellspacing="0">
89 <td align="right"> Plugin Author: </td>
90 <td> TWiki:Main.AndreaSterbini, TWiki:Main.PeterThoeny </td>
93 <td align="right"> Copyright: </td>
94 <td> © 2001-2009, Andrea Sterbini, Peter Thoeny (<a href="http://www.twiki.net/" target="_top">TWIKI.NET</a>), [[TWiki/TWikiContributor]]</td>
97 <td align="right"> License: </td>
98 <td> GPL (<a href="http://www.gnu.org/copyleft/gpl.html" target="_top">GNU General Public License</a>) </td>
101 <td align="right"> Plugin Version: </td>
102 <td> 28 Feb 2009 17852 (30 Mar 2009) </td>
105 <td align="right"> Change History: </td>
109 <td align="right"> 28 Feb 2009: </td>
110 <td> 17851 - TWikibug:Item5025 - Added <code>=</code> and <code>&</code> to page regex, allowing links such as <code>Site:ID=1234&sel=56</code></td>
113 <td align="right"> 03 Aug 2008: </td>
114 <td> TWiki 4.2.1 release version </td>
117 <td align="right"> 22 Jan 2008: </td>
118 <td> TWiki 4.2.0 release version </td>
121 <td align="right"> 25 Nov 2007: </td>
122 <td> 15752 - TWikibug:Item5006 - Renamed Bugs rule to TWikibug rule (PTh) </td>
125 <td align="right"> 13 Aug 2007: </td>
126 <td> 14545 - TWikibug:Item4451 - Added Bugs: rule (TWiki:Main.CrawfordCurrie) </td>
129 <td align="right"> 11 Aug 2007: </td>
130 <td> 14538 - Fixed broken ISBN link (TWiki:Main.PeterThoeny) </td>
133 <td align="right"> 08 Nov 2006: </td>
134 <td> 11935 - Added css <code></code> (TWiki:Main.PeterThoeny) </td>
137 <td align="right"> 07 Nov 2006: </td>
138 <td> 11924 - Added INTERLINKFORMAT; removed redundant SUPPRESSTOOLTIP; allow @ signs in page part of interwiki link; support single digit page part (TWiki:Main.PeterThoeny) </td>
141 <td align="right"> 26 Feb 2005: </td>
142 <td> 1.008 TWiki:Main.CrawfordCurrie cleaned up code and made Dakar-ready </td>
145 <td align="right"> 25 Aug 2004: </td>
146 <td> 1.005 TWiki:Main.PeterThoeny updated [[Main/InterWikis]] link rules (no code change) </td>
149 <td align="right"> 09 Mar 2004: </td>
150 <td> Internal changes: Use only official TWiki::Func Plugin API; for increased speed, moved Interwiki link handling from outsidePREHandler to startRenderingHandler </td>
153 <td align="right"> 16 Feb 2004: </td>
154 <td> Support <code>[[Site:Page][label]]</code> Interwiki links (PTh); use TWiki::Func interface for I18N regular expressions (Walter Mundt) </td>
157 <td align="right"> 18 Jan 2003: </td>
158 <td> Allow number sign <code>#</code> in Page name (PTh) </td>
161 <td align="right"> 31 Aug 2002: </td>
162 <td> Allow percent sign <code>%</code> in page name (PTh) </td>
165 <td align="right"> 27 Jul 2001: </td>
166 <td> Allow numbers <code>0-9</code> in site name </td>
169 <td align="right"> 26 Jul 2001: </td>
170 <td> Fixed alternating missed link bug due to greedy $postfixPattern (fix by Richard Donkin) </td>
173 <td align="right"> 14 Jul 2001: </td>
174 <td> Changed to plug & play </td>
177 <td align="right"> 16 Jun 2001: </td>
178 <td> Made tooltips optional; prevent <code><b>Module::Sub</b></code> type of link </td>
181 <td align="right"> 12 Jun 2001: </td>
182 <td> Added optional tool tips (IE only); added the link rules topic name variable; added flexible link patterns; optional <code><b>$page</b></code> in URL </td>
185 <td align="right"> 10 Jun 2001: </td>
186 <td> Changed rules topic to table-based syntax </td>
189 <td align="right"> 20 Feb 2001: </td>
190 <td> TWiki:Main.AndreaSterbini, TWiki:Main.PeterThoeny - Initial version </td>
193 <td align="right"> CPAN Dependencies: </td>
197 <td align="right"> Other Dependencies: </td>
201 <td align="right"> Perl Version: </td>
205 <td align="right">[[TWiki:Plugins/Benchmark]]: </td>
206 <td>[[TWiki/GoodStyle]] 100%, [[TWiki/FormattedSearch]] 98%, %TOPIC% 98% </td>
209 <td align="right"> Plugin Home: </td>
210 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
213 <td align="right"> Feedback: </td>
214 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
217 <td align="right"> Appraisal: </td>
218 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal</a></td>
222 **_Related Topics:_** [[TWikiPlugins]], [[DeveloperDocumentationCategory]], [[AdminDocumentationCategory]], [[TWikiPreferences]], [[InterWikis]]
224 -- TWiki:Main.PeterThoeny - 28 Feb 2009