diff options
author | MikeMannix <MikeMannix> | 2001-09-07 10:11:02 +0000 |
---|---|---|
committer | MikeMannix <MikeMannix> | 2001-09-07 10:11:02 +0000 |
commit | 0b5844cd7379436ceb626aaeb37f1569ca9f18d6 (patch) | |
tree | 9c0557ab13adf93a4ffa4e30d88b3e1d724345a0 /TWiki/TWikiPlugins.mdwn | |
parent | ffb34810509d9c70a7a93dee11cb8c6b184974b2 (diff) |
none
Diffstat (limited to 'TWiki/TWikiPlugins.mdwn')
-rw-r--r-- | TWiki/TWikiPlugins.mdwn | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/TWiki/TWikiPlugins.mdwn b/TWiki/TWikiPlugins.mdwn index 8262a9db..faf0e45f 100644 --- a/TWiki/TWikiPlugins.mdwn +++ b/TWiki/TWikiPlugins.mdwn @@ -1,10 +1,10 @@ %TOC% %STARTINCLUDE% -## <a name="TWiki_Plugins"> TWiki Plugins </a> +# <a name="TWiki_Plugins"> TWiki Plugins </a> Plugin use and development; about the Plugin API. -### <a name="Overview"> Overview </a> +## <a name="Overview"> Overview </a> You can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can: @@ -14,7 +14,7 @@ You can add Plugins to greatly extend TWiki's functionality, without alering the Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the **[[TWikiPlugins]]**. -### <a name="Preinstalled_Plugins"> Preinstalled Plugins </a> +## <a name="Preinstalled_Plugins"> Preinstalled Plugins </a> TWiki comes with three Plugins as part of the standard installation. @@ -26,7 +26,7 @@ TWiki comes with three Plugins as part of the standard installation. <a name="InstallPlugin"></a> -### <a name="Installing_Plugins"> Installing Plugins </a> +## <a name="Installing_Plugins"> Installing Plugins </a> Each TWikiPlugin comes with full documentation: step-by-step installation instructions, a detailed description of any special requirements, version details, and a working example for testing. @@ -44,7 +44,7 @@ Each Plugin has a standard release page, located in the TWiki:Plugins web at TWi * **Dev page:** Post feature requests, bug reports and general dev comments; topic title ends in <code>**Dev**</code> (<code>**SomePluginDev**</code>). * **User support:** Post installation, how to use type questions (and answers, if you have them) in the TWiki:Support web. -#### <a name="On_Site_Pretesting"> On-Site Pretesting </a> +### <a name="On_Site_Pretesting"> On-Site Pretesting </a> To test new Plugins on your installation before making them public, you may want to use one of these two approaches: @@ -55,11 +55,11 @@ To test new Plugins on your installation before making them public, you may want * **Method 2:** List the Plugin under <code>**Test**</code> in the DISABLEDPLUGINS variable in %TWIKIWEB%.TWikiPreferences. Redefine the DISABLEDPLUGINS variable in the Test web and do the testing there. -### <a name="Managing_Plugins"> Managing Plugins </a> +## <a name="Managing_Plugins"> Managing Plugins </a> Ideally, after you've installed a Plugin, just read the instructions and you're set. In fact, some Plugins require additional settings or offer extra options that you can modify on Preferences pages. You may want to make a Plugin available only in certain webs, or temporarily disable it. And having to list all available Plugins will probably come up. You can handle all of these with simple procedures. -#### <a name="Setting_Preferences"> Setting Preferences </a> +### <a name="Setting_Preferences"> Setting Preferences </a> Installed Plugins can be **toggled on or off**, site-wide or by web, through TWikiPreferences and individual WebPreferences: @@ -78,7 +78,7 @@ Installed Plugins can be **toggled on or off**, site-wide or by web, through TWi * The settings can be retrieved as Preferences variables like <code>**%<pluginname>\_<var>%**</code>, ex: <code>**%DEFAULTPLUGIN\_SHORTDESCRIPTION%**</code> shows the description of the DefaultPlugin. -#### <a name="Listing_Active_Plugins"> Listing Active Plugins </a> +### <a name="Listing_Active_Plugins"> Listing Active Plugins </a> Plugin status variables let you list all active Plugins wherever needed. There are two list formats: @@ -93,11 +93,11 @@ Plugin status variables let you list all active Plugins wherever needed. There a <a name="PluginAPI"></a> -### <a name="The_TWiki_Plugin_API"> </a> The TWiki Plugin API +## <a name="The_TWiki_Plugin_API"> </a> The TWiki Plugin API The Application Programming Interface (API) for TWikiPlugins provides the specifications for hooking into the core TWiki code from your external Perl Plugin module. The Plugin API is new to the Production version of TWiki with the TWikiReleaseSpring2001. -#### <a name="Available_Core_Functions"> Available Core Functions </a> +### <a name="Available_Core_Functions"> Available Core Functions </a> The <code>**lib/TWiki/Func.pm**</code> implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. @@ -105,13 +105,13 @@ The <code>**lib/TWiki/Func.pm**</code> implements ALL official Plugin functions. * For best performance, enable only the functions you really need. NOTE: <code>**outsidePREHandler**</code> and <code>**insidePREHandler**</code> are particularly expensive. -#### <a name="Predefined_Hooks"> Predefined Hooks </a> +### <a name="Predefined_Hooks"> Predefined Hooks </a> In addition to TWiki core functions, Plugins can use **predefined hooks**, or **call backs**, listed in the <code>**lib/TWiki/Plugins/EmptyPlugin.pm**</code> module. * All but the initPlugin are disabled. To enable a call back, remove <code>**DISABLE\_**</code> from the function name. -#### <a name="Plugin_Version_Detection"> Plugin Version Detection </a> +### <a name="Plugin_Version_Detection"> Plugin Version Detection </a> To eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an API <code>**GetVersion**</code> detection routine are provided for automatic compatibility checking. @@ -124,15 +124,15 @@ To eliminate the incompatibility problems bound to arise from active open Plugin <a name="CreatePlugins"></a> -### <a name="Creating_Plugins"> Creating Plugins </a> +## <a name="Creating_Plugins"> Creating Plugins </a> With a reasonable knowledge of the Perl scripting language, you can create new Plugins or modify and extend existing ones. Basic plug-in architecture uses an Application Programming Interface (API), a set of software instructions that allow external code to interact with the main program. The TWiki Plugin API Plugins by providing a programming interface for TWiki. -#### <a name="The_DefaultPlugin_Alternative"> The DefaultPlugin Alternative </a> +### <a name="The_DefaultPlugin_Alternative"> The DefaultPlugin Alternative </a> * **DefaultPlugin** can handle some outdated TWiki variables, found, for example, in sites recently updated from an old version. Settings are in %TWIKIWEB%.TWikiPreferences. You can also add your own simple custom processing rules here, though in all but very simple cases, writing a new Plugin is preferable. -#### <a name="Anatomy_of_a_Plugin"> Anatomy of a Plugin </a> +### <a name="Anatomy_of_a_Plugin"> Anatomy of a Plugin </a> A basic TWiki Plugin consists of two elements: @@ -143,13 +143,13 @@ The Perl module can be a block of code that connects with TWiki alone, or it can The Plugin API handles the details of connecting your Perl module with main TWiki code. When you're familiar with the Plugin API, you're ready to develop Plugins. -#### <a name="Creating_the_Perl_Module"> Creating the Perl Module </a> +### <a name="Creating_the_Perl_Module"> Creating the Perl Module </a> Copy file ([`EmptyPlugin.pm`](http://twiki.org/lib/TWiki/Plugins/EmptyPlugin.pm) to <code>**<name>Plugin.pm**</code> `=EmptyPlugin.pm=` contains no executable code, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information. <a name="CreatePluginTopic"></a> -#### <a name="Writing_the_Documentation_Topic"> Writing the Documentation Topic </a> +### <a name="Writing_the_Documentation_Topic"> Writing the Documentation Topic </a> The Plugin documentation topic contains usage instructions and version details. It serves the Plugin files as %TWIKIWEB%.FileAttachments for downloading. (The doc topic is also included _in_ the distribution package.) To create a documentation topic: @@ -189,7 +189,7 @@ The Plugin documentation topic contains usage instructions and version details. <a name="CreatePluginPackage"></a> -#### <a name="Packaging_for_Distribution"> Packaging for Distribution </a> +### <a name="Packaging_for_Distribution"> Packaging for Distribution </a> A minimum Plugin release consists of a Perl module with a [[TWiki/WikiName]] that ends in <code>**Plugin**</code>, ex: <code>**YourPlugin.pm**</code>, and a documentation page with the same name(<code>**YourPlugin.txt**</code>). @@ -204,7 +204,7 @@ A minimum Plugin release consists of a Perl module with a [[TWiki/WikiName]] tha <a name="PublishPlugin"></a> -#### <a name="Publishing_for_Public_Use"> Publishing for Public Use </a> +### <a name="Publishing_for_Public_Use"> Publishing for Public Use </a> You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins web, where all Plugins submitted to TWiki.org are available for download and further development discussion. Publish your Plugin in three steps: |