|
TWiki Plugins |
|
- heavily customize an installation and still do clean updates to new versions of TWiki;
- rapidly develop new TWiki functions in Perl using the Plugin API.
|
|
< < | Everything to do with TWiki Plugins - including demos, new releases, downloads, and discussion - is available at TWiki.org, in the TWiki.org Plugins web. |
> > | Everything to do with TWiki Plugins - including demos, new releases, downloads, and discussion - is available at TWiki.org, in the TWiki.org Plugins web. |
|
Installing Plugins |
| Set Preferences for Individual Plugins |
|
< < | Installed Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences: |
> > | Installed Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences: |
| |
|
< < |
- All Plugin modules present in the
lib/TWiki/Plugins directory are activated automatically unless disabled by the DISABLEDPLUGINS Preferences variable in TWikiPreferences. You can optionally list the installed Plugins in the INSTALLEDPLUGINS Preferences variable. This is useful to define the sequence of Plugin execution, or to specify other webs than the TWiki web for the Plugin topics. Settings in TWikiPreferences are:
|
> > |
- All Plugin modules present in the
lib/TWiki/Plugins directory are activated automatically unless disabled by the DISABLEDPLUGINS Preferences variable in TWikiPreferences. You can optionally list the installed Plugins in the INSTALLEDPLUGINS Preferences variable. This is useful to define the sequence of Plugin execution, or to specify other webs than the TWiki web for the Plugin topics. Settings in TWikiPreferences are:
|
|
-
-
Set INSTALLEDPLUGINS = DefaultPlugin, ...
-
Set DISABLEDPLUGINS = EmptyPlugin, ...
|
| List Active Plugins Automatically
Plugin status variables let you list all active Plugins wherever needed. There are two list formats: |
|
< < |
- The
%ACTIVATEDPLUGINS% variable lists activated Plugins by name. (This variable is displayed in TWikiPreferences for debugging use.)
- The
%PLUGINDESCRIPTIONS% variable displays a bullet list with a one-line description of each active Plugins. This variable is based on the %<plugin>_SHORTDESCRIPTION% Preferences variables of individual topics and is shown in TextFormattingRules.
|
> > |
- The
%ACTIVATEDPLUGINS% variable lists activated Plugins by name. (This variable is displayed in TWikiPreferences for debugging use.)
- The
%PLUGINDESCRIPTIONS% variable displays a bullet list with a one-line description of each active Plugins. This variable is based on the %<plugin>_SHORTDESCRIPTION% Preferences variables of individual topics and is shown in TextFormattingRules.
|
|
DEMO: Active Plugin Variables |
|
- Method 1: Create a Production and a Test installation of TWiki. The
twiki/data , twiki/templates and twiki/pub directories are shared, and the twiki/bin and twiki/lib directories are separate. Do all tests of Plugins and other new features in the Test installation. When everything works, copy the modified files over to the Production installation. This way, you can update a live TWiki installation and users won't even notice.
|
|
< < |
- Method 2: List the Plugin under test in the DISABLEDPLUGINS variable in TWikiPreferences. Redefine the DISABLEDPLUGINS variable in the test web and do the testing there.
|
> > |
- Method 2: List the Plugin under test in the DISABLEDPLUGINS variable in TWikiPreferences. Redefine the DISABLEDPLUGINS variable in the test web and do the testing there.
|
|
Creating New Plugins |
|
OUTLINE: Doc Topic Contents
|
|
< < | Check EmptyPlugin on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: |
> > | Check EmptyPlugin on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: |
| |
|
< < | Syntax Rules: explanation coming up |
> > | Syntax Rules: Describe any special text formatting that will be rendered. |
| YourPlugin Settings: Description and settings for your custom Plugin %VARIABLES%, and those required by TWiki. |
|
- Post the Plugin documentation topic in the TWiki:Plugins web:
- create a new topic using the Plugin name, ex:
YourPlugin.txt ;
|
|
< < | |
> > | |
|
- Attach the distribution zip file to the topic, ex:
YourPlugin.zip .
- Link from the doc page to a new, blank page named after the Plugin, and ending in
Dev , ex: YourPluginDev . This is the discussion page for future development. (User support for Plugins is handled in TWiki:Support.)
|