diff options
Diffstat (limited to 'TWiki/FindElsewherePlugin.mdwn')
-rw-r--r-- | TWiki/FindElsewherePlugin.mdwn | 98 |
1 files changed, 46 insertions, 52 deletions
diff --git a/TWiki/FindElsewherePlugin.mdwn b/TWiki/FindElsewherePlugin.mdwn index bafa6134..832606d4 100644 --- a/TWiki/FindElsewherePlugin.mdwn +++ b/TWiki/FindElsewherePlugin.mdwn @@ -1,18 +1,20 @@ -## <a name="Empty_TWiki_Plugin"> Empty TWiki Plugin </a> +## <a name="Find_Elsewhere_Plugin"> Find Elsewhere Plugin </a> -This is an empty plugin you can use as a template to build your own %TWIKIWEB%.TWikiPlugins. This plugin does nothing, but is ready to be used. +This plugin will automatically link to another web(s) if a topic isn't found in the current web. -To create your own plugin: +This is useful for a TWiki site that wants to implement a glossar/dictionary web where common terms are defined and stored. Without this plugin: -* Copy file <code>**TWiki/Plugins/EmptyPlugin.pm**</code> to <code>**<name>Plugin.pm**</code> and customize the plugin. -* Create a <code>**<name>Plugin**</code> topic in the %TWIKIWEB% web. Do so by visiting <http://TWiki.org/cgi-bin/view/Plugins/> and starting a new topic to get the default plugin topic text (don't save the topic). Customize your plugin topic to your needs. -* See details in %TWIKIWEB%.TWikiPlugins. +* Each web would need to create their own topic for a common term +* Link to or INCLUDE the topic from where it is defined +* Authors need to remember to put the Web name in front of the topic name, such as [[TWiki/WikiWord]] + +Without this kind of plugin, it's likely that common terms used within an organization will be defined in multiple webs or the common terms will be unlinked wiki words (as if they didn't exist). ### <a name="Syntax_Rules"> Syntax Rules </a> (none) -## <a name="Test_of_the_new_functionality"> Test of the new functionality </a> +New Functionality <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -23,37 +25,31 @@ To create your own plugin: </tr> <tr> <td> found </td> - <td><nop>TestTopic1 </nop></td> - <td><span style="background:"><font color="">Test Topic 1</font></span><a href="http://LOCATION/TestTopic1">?</a></td> - <td><nop>TestTopic1 </nop></td> - </tr> - <tr> - <td> found singular </td> - <td><nop>SingularTopics </nop></td> - <td><span style="background:"><font color="">Singular Topics</font></span><a href="http://LOCATION/SingularTopics">?</a></td> - <td><nop>SingularTopic </nop></td> - </tr> - <tr> - <td> found other web </td> - <td><nop>CodingStandard </nop></td> - <td><span style="background:"><font color="">Coding Standard</font></span><a href="http://LOCATION/CodingStandard">?</a></td> - <td><nop>Digi.CodingStandard </nop></td> + <td><nop>WebHome </nop></td> + <td><span style="background:"><font color="">Web Home</font></span><a href="http://LOCATION/WebHome">?</a></td> + <td><nop>WebHome </nop></td> </tr> <tr> <td> found singular </td> - <td><nop>CodingStandards </nop></td> - <td><span style="background:"><font color="">Coding Standards</font></span><a href="http://LOCATION/CodingStandards">?</a></td> - <td><nop>Digi.CodingStandards </nop></td> + <td><nop>WebHomes </nop></td> + <td><span style="background:"><font color="">Web Homes</font></span><a href="http://LOCATION/WebHomes">?</a></td> + <td><nop>WebHomes </nop></td> </tr> <tr> - <td> found singular </td> + <td> found elsewhere </td> <td><nop>WikiWord </nop></td> <td><span style="background:"><font color="">Wiki Word</font></span><a href="http://LOCATION/WikiWord">?</a></td> <td><nop>TWiki.WikiWord </nop></td> </tr> + <tr> + <td> found singular elsewhere </td> + <td><nop>WikiWords </nop></td> + <td><span style="background:"><font color="">Wiki Words</font></span><a href="http://LOCATION/WikiWords">?</a></td> + <td><nop>TWiki.WikiWords </nop></td> + </tr> </table> -## <a name="Don_t_break_other_types_of_wiki_"> Don't break other types of wiki words </a> +Don't break other types of wiki words <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -61,36 +57,36 @@ To create your own plugin: <th bgcolor="#99CCCC"><strong>output</strong></th> </tr> <tr> - <td><nop>TestFindElsewhere#TopicAnchor </nop></td> - <td><span style="background:"><font color="">Test Find Elsewhere#Topic Anchor</font></span><a href="http://LOCATION/TestFindElsewhere">?</a></td> + <td><nop>%TOPIC%#TopicAnchor </nop></td> + <td> %TOPIC%#TopicAnchor </td> </tr> <tr> - <td><nop>Test.WebHome </nop></td> - <td><span style="background:"><font color="">Web Home</font></span><a href="http://LOCATIONTest/WebHome">?</a></td> + <td><nop>TWiki.WebHome </nop></td> + <td><span style="background:"><font color="">Web Home</font></span><a href="http://LOCATIONTWiki/WebHome">?</a></td> </tr> <tr> <td><nop>WebHome </nop></td> <td><span style="background:"><font color="">Web Home</font></span><a href="http://LOCATION/WebHome">?</a></td> </tr> <tr> - <td> [<nop>[Test.WebHome]] </nop></td> - <td><span style="background:"><font color="">Test.Web Home</font></span><a href="http://LOCATIONTest/WebHome">?</a></td> + <td> [<nop>[TWiki.WebHome]] </nop></td> + <td><span style="background:"><font color="">TWiki.Web Home</font></span><a href="http://LOCATIONTWiki/WebHome">?</a></td> </tr> <tr> - <td> [<nop>[Digi.CodingStandard]] </nop></td> - <td><span style="background:"><font color="">Digi.Coding Standard</font></span><a href="http://LOCATIONDigi/CodingStandard">?</a></td> + <td> [<nop>[TWiki.WikiWord]] </nop></td> + <td><span style="background:"><font color="">TWiki.Wiki Word</font></span><a href="http://LOCATIONTWiki/WikiWord">?</a></td> </tr> <tr> - <td> [<nop>[Digi.CodingStandards]] </nop></td> - <td><span style="background:"><font color="">Digi.Coding Standards</font></span><a href="http://LOCATIONDigi/CodingStandards">?</a></td> + <td> [<nop>[TWiki.WikiWords]] </nop></td> + <td><span style="background:"><font color="">TWiki.Wiki Words</font></span><a href="http://LOCATIONTWiki/WikiWords">?</a></td> </tr> <tr> - <td><nop>Digi.CodingStandard </nop></td> - <td><span style="background:"><font color="">Coding Standard</font></span><a href="http://LOCATIONDigi/CodingStandard">?</a></td> + <td><nop>TWiki.WikiWord </nop></td> + <td><span style="background:"><font color="">Wiki Word</font></span><a href="http://LOCATIONTWiki/WikiWord">?</a></td> </tr> <tr> - <td><nop>Digi.CodingStandards </nop></td> - <td><span style="background:"><font color="">Coding Standards</font></span><a href="http://LOCATIONDigi/CodingStandards">?</a></td> + <td><nop>TWiki.WikiWords </nop></td> + <td><span style="background:"><font color="">Wiki Words</font></span><a href="http://LOCATIONTWiki/WikiWords">?</a></td> </tr> </table> @@ -101,14 +97,10 @@ To create your own plugin: Plugin settings are stored as preferences variables. To reference a plugin setting write <code>**%<plugin>\_<setting>%**</code>, i.e. <code>**%EMPTYPLUGIN\_SHORTDESCRIPTION%**</code> * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic: - * Set SHORTDESCRIPTION = This plugin does nothing, but can be used as a template for your own plugins. - -* Your own setting, i.e.: - * Set EXAMPLE = Digi + * Set SHORTDESCRIPTION = If a topic isn't found in this web it will look in a predefined list of other webs and attempt to find it there. * List other webs in which to look for topics that don't exist - * Set LOOKHERE = Digi - * Set LOOKHEREMULTI = Digi, TWiki + * Set LOOKELSEWHERE = TWiki, Test * If the [[TWiki/WikiWord]] is plural but doesn't exist, also look for the singular word * Set PLURALTOSINGULAR = 1 @@ -118,22 +110,24 @@ Plugin settings are stored as preferences variables. To reference a plugin setti ### <a name="Plugin_Installation_Instructions"> Plugin Installation Instructions </a> -* This plugin is preinstalled, you do not need to install it. +### <a name="Plugin_Deficiencies"> Plugin Deficiencies </a> + +1. Does not function in preview? ### <a name="Plugin_Info"> Plugin Info </a> <table border="1" cellpadding="1" cellspacing="0"> <tr> <td align="right"> Plugin Author: </td> - <td> %TWIKIWEB%.AndreaSterbini, %TWIKIWEB%.PeterThoeny </td> + <td><span style="background:"><font color="">Mike Barton</font></span><a href="http://LOCATIONMain/MikeBarton">?</a></td> </tr> <tr> <td align="right"> Plugin Version: </td> - <td> 14 Jul 2001 </td> + <td> 1 Feb 2002 </td> </tr> <tr> <td align="right"> Change History: </td> - <td> 14 Jul 2001: Changed to plug&amp;play <br /> 27 Feb 2001: Initial version </td> + <td> 1 Feb 2002: Initial version </td> </tr> <tr> <td align="right"> CPAN Dependencies: </td> @@ -159,4 +153,4 @@ Plugin settings are stored as preferences variables. To reference a plugin setti **_Related Topics:_** %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins, [[DefaultPlugin]] --- %TWIKIWEB%.AndreaSterbini - 27 Feb 2001 <br /> -- %TWIKIWEB%.PeterThoeny - 14 Jul 2001 <br /> +-- [[Main/MikeBarton]] - 1 Feb 2002<br /> |