Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | TWiki Plugins | |||||||
> > | TWiki Plugins | |||||||
Plugin use and development; about the Plugin API. | ||||||||
Changed: | ||||||||
< < | Overview | |||||||
> > | Overview | |||||||
You can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can: | ||||||||
Line: 15 to 15 | ||||||||
Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki.org Plugins web![]() | ||||||||
Changed: | ||||||||
< < | Preinstalled Plugins | |||||||
> > | Preinstalled Plugins | |||||||
TWiki comes with three Plugins as part of the standard installation. | ||||||||
Line: 26 to 26 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Installing Plugins | |||||||
> > | Installing Plugins | |||||||
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. | ||||||||
Line: 42 to 42 | ||||||||
| ||||||||
Changed: | ||||||||
< < | On-Site Pretesting | |||||||
> > | On-Site Pretesting | |||||||
To test new Plugins on your installation before making them public, you may want to use one of these two approaches: | ||||||||
Line: 53 to 53 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
Managing Plugins | |||||||
> > | Managing Plugins | |||||||
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. | ||||||||
Changed: | ||||||||
< < | Setting Preferences | |||||||
> > | Setting Preferences | |||||||
Installed Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences: | ||||||||
Line: 75 to 74 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Listing Active Plugins | |||||||
> > | Listing Active Plugins | |||||||
Plugin status variables let you list all active Plugins wherever needed. There are two list formats:
| ||||||||
Line: 93 to 92 | ||||||||
Changed: | ||||||||
< < | The TWiki Plugin API | |||||||
> > | 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. | ||||||||
Changed: | ||||||||
< < | Available Core Functions | |||||||
> > | Available Core Functions | |||||||
The lib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | ||||||||
Line: 105 to 104 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Predefined Hooks | |||||||
> > | Predefined Hooks | |||||||
In addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in the lib/TWiki/Plugins/EmptyPlugin.pm module.
| ||||||||
Changed: | ||||||||
< < | Plugin Version Detection | |||||||
> > | Plugin Version Detection | |||||||
To eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an API GetVersion detection routine are provided for automatic compatibility checking. | ||||||||
Line: 122 to 121 | ||||||||
| ||||||||
Deleted: | ||||||||
< < | ||||||||
Changed: | ||||||||
< < | Creating Plugins | |||||||
> > | Creating Plugins | |||||||
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. | ||||||||
Changed: | ||||||||
< < | The DefaultPlugin Alternative | |||||||
> > | The DefaultPlugin Alternative | |||||||
| ||||||||
Changed: | ||||||||
< < | Anatomy of a Plugin | |||||||
> > | Anatomy of a Plugin | |||||||
A basic TWiki Plugin consists of two elements: | ||||||||
Line: 144 to 142 | ||||||||
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. | ||||||||
Changed: | ||||||||
< < | Creating the Perl Module | |||||||
> > | Creating the Perl Module | |||||||
Copy file (EmptyPlugin.pm ![]() <name>Plugin.pm 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.
| ||||||||
Changed: | ||||||||
< < | Writing the Documentation Topic | |||||||
> > | Writing the Documentation Topic | |||||||
The Plugin documentation topic contains usage instructions and version details. It serves the Plugin files as FileAttachments for downloading. (The doc topic is also included in the distribution package.) To create a documentation topic: | ||||||||
Line: 180 to 178 | ||||||||
Changed: | ||||||||
< < | Packaging for Distribution | |||||||
> > | Packaging for Distribution | |||||||
A minimum Plugin release consists of a Perl module with a WikiName that ends in Plugin , ex: YourPlugin.pm , and a documentation page with the same name(YourPlugin.txt ). | ||||||||
Line: 194 to 192 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Publishing for Public Use | |||||||
> > | Publishing for Public Use | |||||||
You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() |