TWiki PluginsAdd functionality to TWiki with readily available Plugins; create Plugins based on APIsOverviewYou can add Plugins to extend TWiki functionality, without altering the core code. A plug-in approach lets you:
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Relevant links on TWiki.org: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | See other types of extensions: TWikiAddOns, TWikiContribs, TWikiSkins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Installing PluginsEach TWiki Plugin comes with its own documentation: step-by-step installation instructions, a detailed description of any special requirements, version details, and a working example for testing. Many Plugins have an install script that automates these steps for you. Special Requirements: Some Plugins need certain Perl modules to be preinstalled on the host system. Plugins may also use other resources, like graphics, other modules, applications, and templates. You should be able to find detailed instructions in the Plugin's documentation. Each Plugin has a standard release topic, located in the TWiki:Plugins![]() On-Site PretestingThe recommended approach to testing new Plugins before making them public is to create a second local TWiki installation, and test the Plugin there. You can allow selected users access to the test area. Once you are satisifed that it won't compromise your main installation, you can install it there as well. InstalledPlugins shows which Plugins are: 1) installed, 2) loading properly, and 3) what TWiki:Codev.PluginHandlers![]() %FAILEDPLUGINS% variable can be used to debug failures. You may also want to check your webserver error log and the various TWiki log files.
Some Notes on Plugin PerformanceThe performance of the system depends to some extent on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). You can only really tell the performance impact by installing the Plugin and by measuring the performance with and without the new Plugin. Use the TWiki:Plugins.PluginBenchmarkAddOn![]() ab utility. Example on Unix:time wget -qO /dev/null /bin/view/TWiki/AbcPlugin | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Define DISABLEDPLUGINS to be a comma-separated list of names of plugins to disable. Define it in Main.TWikiPreferences to disable those plugins everywhere, in the WebPreferences topic to disable them in an individual web, or in a topic to disable them in that topic. For example,
* Set DISABLEDPLUGINS = SpreadSheetPlugin, EditTablePlugin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Managing Installed PluginsSome Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures:Enabling PluginsPlugins can be enabled and disabled with the configure script. An installed Plugin needs to be enabled before it can be used.Plugin Evaluation OrderBy default, TWiki executes Plugins in alphabetical order on Plugin name. It is possible to change the order, for example to evaluate database variables before the speadsheet CALCs. This can be done with{PluginsOrder} in the Plugins section of configure.
Plugin-Specific Settings | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugins are usually configured by variables accessible though the configure interface, but in some cases (usually older plugins) TWiki preferences are used. If a TWiki variable is defined in a Plugin topic e.g:
%<pluginname>_<var>% . For example, %RUBBERPLUGIN_SETTING% shows the value of SETTING in the RubberPlugin topic. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed.
On this TWiki site, the enabled Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin.
|
Plugin | Errors |
---|---|
SpreadSheetPlugin | none |
BackupRestorePlugin | none |
ColorPickerPlugin | none |
CommentPlugin | none |
DatePickerPlugin | none |
EditTablePlugin | none |
HeadlinesPlugin | none |
InterwikiPlugin | none |
JQueryPlugin | none |
PreferencesPlugin | none |
SetGetPlugin | none |
SlideShowPlugin | none |
SmiliesPlugin | none |
TWikiSheetPlugin | none |
TablePlugin | none |
TagMePlugin | none |
TinyMCEPlugin | none |
TwistyPlugin | none |
WatchlistPlugin | none |
WysiwygPlugin | none |
Handler | Plugins |
---|---|
afterEditHandler | WysiwygPlugin |
afterRenameHandler | TagMePlugin WatchlistPlugin |
afterSaveHandler | TagMePlugin WatchlistPlugin |
beforeCommonTagsHandler | EditTablePlugin PreferencesPlugin TWikiSheetPlugin TwistyPlugin WysiwygPlugin |
beforeEditHandler | TinyMCEPlugin WysiwygPlugin |
beforeMergeHandler | WysiwygPlugin |
beforeSaveHandler | CommentPlugin WatchlistPlugin WysiwygPlugin |
commonTagsHandler | SpreadSheetPlugin BackupRestorePlugin CommentPlugin EditTablePlugin JQueryPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin |
initPlugin | SpreadSheetPlugin BackupRestorePlugin ColorPickerPlugin CommentPlugin DatePickerPlugin EditTablePlugin HeadlinesPlugin InterwikiPlugin JQueryPlugin PreferencesPlugin SetGetPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin TablePlugin TagMePlugin TinyMCEPlugin TwistyPlugin WatchlistPlugin WysiwygPlugin |
modifyHeaderHandler | WysiwygPlugin |
postRenderingHandler | PreferencesPlugin WysiwygPlugin |
preRenderingHandler | InterwikiPlugin SmiliesPlugin TablePlugin |
lib/TWiki/Func.pm
) describes all the interfaces available to Plugins. Plugins should only use the interfaces described in this module.
Func.pm
, you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
lib/TWiki/Plugins/EmptyPlugin.pm
module.
DISABLE_
from the function name.
eval
block like this:eval { require IPC::Run }
return "<font color=\"red\">SamplePlugin: Can't load required modules ($@)</font>" if $@;
$VERSION='0.000'
variable, beginning at 1.000
.
initPlugin
handler should check all dependencies and return TRUE if the initialization is OK or FALSE if something went wrong. initPlugin
handler).
$TWiki::Plugins::VERSION
in the TWiki::Plugins
module contains the TWiki Plugin API version, currently 6.10. %PLUGINVERSION{}%
variable to query the Plugin API version or the version of installed Plugins.
%TWiki::cfg
hash than adding it as preferences in the Plugin topic MyFirstPlugin.pm
MyFirstPlugin.txt
MyFirstPlugin
topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/
directory.
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.
lib/TWiki/Plugins/EmptyPlugin.pm
to <name>Plugin.pm
. The EmptyPlugin.pm
module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs;
instead of just Package Attrs;
. Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new();
MyFirstPlugin
, press enter and create the new topic
OUTLINE: Doc Topic Contents
Check the Plugins web on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: Syntax Rules: <Describe any special text formatting that will be rendered.>" Example: <Include an example of the Plugin in action. Possibly include a static HTML version of the example to compare if the installation was a success!>" Plugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>"Plugin Installation Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" Plugin Info: <Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins
- Plugins Preferences <If user settings are needed, explain... Entering values works exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:>"
- Set <EXAMPLE = value added>
web.>"
Plugin
, ex: MyFirstPlugin.pm
, and a documentation page with the same name(MyFirstPlugin.txt
).
lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
[a required graphic]
MyFirstPlugin.zip
) and add the entire directory structure from Step 1. The archive should look like this: lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
MyFirstPlugin
MyFirstPlugin.zip
Dev
, ex: MyFirstPluginDev
. This is the discussion page for future development. (User support for Plugins is handled in TWiki:SupportTWiki::Func::getWorkArea()
function, which gives you a persistant directory where you can store data files. By default they will not be web accessible. The directory is guaranteed to exist, and to be writable by the webserver user. For convenience, TWiki::Func::storeFile()
and TWiki::Func::readFile()
are provided to persistently store and retrieve simple data in this area.
TWiki::Func::saveAttachment()
function to store the data.TWiki::Func::saveAttachment()
function to store the data._FooBarPlugin_img123.gif
TWiki::Func::saveAttachment()
function to store the data.
Recommendation for file names in Plugin attachment area: _Main_roundedge-ul.gif
Dev
, such as MyFirstPluginDev
. The Plugin development topic is a great resource to discuss feature enhancements and to get feedback from the TWiki community.
TWiki::Plugins
version in which the handler was first deprecated. For example, if we need to define the endRenderingHandler
for compatibility with TWiki::Plugins
versions before 1.1, we would add this to the plugin:
package TWiki::Plugins::SinkPlugin; use vars qw( %TWikiCompatibility ); $TWikiCompatibility{endRenderingHandler} = 1.1;If the currently-running TWiki version is 1.1 or later, then the handler will not be called and the warning will not be issued. TWiki with versions of
TWiki::Plugins
before 1.1 will still call the handler as required.
Related Topics: DeveloperDocumentationCategory, AdminDocumentationCategory, TWiki:TWiki.TWikiPluginsSupplementTWiki PluginsAdd functionality to TWiki with readily available Plugins; create Plugins based on APIsOverviewYou can add Plugins to extend TWiki functionality, without altering the core code. A plug-in approach lets you: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki:Plugins![]() ![]() ![]() Installing PluginsEach TWiki Plugin comes with its own documentation: step-by-step installation instructions, a detailed description of any special requirements, version details, and a working example for testing. Many Plugins have an install script that automates these steps for you. Special Requirements: Some Plugins need certain Perl modules to be preinstalled on the host system. Plugins may also use other resources, like graphics, other modules, applications, and templates. You should be able to find detailed instructions in the Plugin's documentation. Each Plugin has a standard release topic, located in the TWiki:Plugins![]() On-Site PretestingThe recommended approach to testing new Plugins before making them public is to create a second local TWiki installation, and test the Plugin there. You can allow selected users access to the test area. Once you are satisifed that it won't compromise your main installation, you can install it there as well. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | InstalledPlugins shows which Plugins are: 1) installed, 2) loading properly, and 3) what TWiki:Codev.PluginHandlers![]() %FAILEDPLUGINS% variable can be used to debug failures. You may also want to check your webserver error log and the various TWiki log files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | InstalledPlugins shows which Plugins are: 1) installed, 2) loading properly, and 3) what TWiki:Codev.PluginHandlers![]() %FAILEDPLUGINS% variable can be used to debug failures. You may also want to check your webserver error log and the various TWiki log files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Some Notes on Plugin PerformanceThe performance of the system depends to some extent on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). You can only really tell the performance impact by installing the Plugin and by measuring the performance with and without the new Plugin. Use the TWiki:Plugins.PluginBenchmarkAddOn![]() ab utility. Example on Unix:time wget -qO /dev/null /bin/view/TWiki/AbcPlugin
![]() Managing Installed PluginsSome Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures:Enabling PluginsPlugins can be enabled and disabled with the configure script. An installed Plugin needs to be enabled before it can be used.Plugin Evaluation OrderBy default, TWiki executes Plugins in alphabetical order on Plugin name. It is possible to change the order, for example to evaluate database variables before the speadsheet CALCs. This can be done with{PluginsOrder} in the Plugins section of configure.
Plugin-Specific SettingsPlugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed.
On this TWiki site, the enabled Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin.
|
Plugin | Errors |
---|---|
SpreadSheetPlugin | none |
BackupRestorePlugin | none |
ColorPickerPlugin | none |
CommentPlugin | none |
DatePickerPlugin | none |
EditTablePlugin | none |
HeadlinesPlugin | none |
InterwikiPlugin | none |
JQueryPlugin | none |
PreferencesPlugin | none |
SetGetPlugin | none |
SlideShowPlugin | none |
SmiliesPlugin | none |
TWikiSheetPlugin | none |
TablePlugin | none |
TagMePlugin | none |
TinyMCEPlugin | none |
TwistyPlugin | none |
WatchlistPlugin | none |
WysiwygPlugin | none |
Handler | Plugins |
---|---|
afterEditHandler | WysiwygPlugin |
afterRenameHandler | TagMePlugin WatchlistPlugin |
afterSaveHandler | TagMePlugin WatchlistPlugin |
beforeCommonTagsHandler | EditTablePlugin PreferencesPlugin TWikiSheetPlugin TwistyPlugin WysiwygPlugin |
beforeEditHandler | TinyMCEPlugin WysiwygPlugin |
beforeMergeHandler | WysiwygPlugin |
beforeSaveHandler | CommentPlugin WatchlistPlugin WysiwygPlugin |
commonTagsHandler | SpreadSheetPlugin BackupRestorePlugin CommentPlugin EditTablePlugin JQueryPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin |
initPlugin | SpreadSheetPlugin BackupRestorePlugin ColorPickerPlugin CommentPlugin DatePickerPlugin EditTablePlugin HeadlinesPlugin InterwikiPlugin JQueryPlugin PreferencesPlugin SetGetPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin TablePlugin TagMePlugin TinyMCEPlugin TwistyPlugin WatchlistPlugin WysiwygPlugin |
modifyHeaderHandler | WysiwygPlugin |
postRenderingHandler | PreferencesPlugin WysiwygPlugin |
preRenderingHandler | InterwikiPlugin SmiliesPlugin TablePlugin |
lib/TWiki/Func.pm
) describes all the interfaces available to Plugins. Plugins should only use the interfaces described in this module.
Func.pm
, you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
lib/TWiki/Plugins/EmptyPlugin.pm
module.DISABLE_
from the function name.
DISABLE_
from the function name.
eval
block like this:eval { require IPC::Run }
return "<font color=\"red\">SamplePlugin: Can't load required modules ($@)</font>" if $@;
eval
block like this:eval { require IPC::Run }
return "<font color=\"red\">SamplePlugin: Can't load required modules ($@)</font>" if $@;
$VERSION='0.000'
variable, beginning at 1.000
.
$VERSION='0.000'
variable, beginning at 1.000
.
initPlugin
handler should check all dependencies and return TRUE if the initialization is OK or FALSE if something went wrong. initPlugin
handler).
initPlugin
handler should check all dependencies and return TRUE if the initialization is OK or FALSE if something went wrong. initPlugin
handler).
$TWiki::Plugins::VERSION
in the TWiki::Plugins
module contains the TWiki Plugin API version, currently 6.10. %PLUGINVERSION{}%
variable to query the Plugin API version or the version of installed Plugins.
$TWiki::Plugins::VERSION
in the TWiki::Plugins
module contains the TWiki Plugin API version, currently 6.10. %PLUGINVERSION{}%
variable to query the Plugin API version or the version of installed Plugins.
%TWiki::cfg
hash than adding it as preferences in the Plugin topic %TWiki::cfg
hash than adding it as preferences in the Plugin topic MyFirstPlugin.pm
MyFirstPlugin.txt
MyFirstPlugin.pm
MyFirstPlugin.txt
MyFirstPlugin
topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/
directory.
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.
lib/TWiki/Plugins/EmptyPlugin.pm
to <name>Plugin.pm
. The EmptyPlugin.pm
module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs;
instead of just Package Attrs;
. Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new();
MyFirstPlugin
, press enter and create the new topic
MyFirstPlugin
, press enter and create the new topic
OUTLINE: Doc Topic Contents
Check the Plugins web on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: Syntax Rules: <Describe any special text formatting that will be rendered.>" Example: <Include an example of the Plugin in action. Possibly include a static HTML version of the example to compare if the installation was a success!>" Plugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>"
Plugin
, ex: MyFirstPlugin.pm
, and a documentation page with the same name(MyFirstPlugin.txt
).lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
[a required graphic]
MyFirstPlugin.zip
) and add the entire directory structure from Step 1. The archive should look like this: lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
[a required graphic]
MyFirstPlugin.zip
) and add the entire directory structure from Step 1. The archive should look like this: lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
MyFirstPlugin
MyFirstPlugin.zip
Dev
, ex: MyFirstPluginDev
. This is the discussion page for future development. (User support for Plugins is handled in TWiki:SupportMyFirstPlugin
MyFirstPlugin.zip
Dev
, ex: MyFirstPluginDev
. This is the discussion page for future development. (User support for Plugins is handled in TWiki:SupportTWiki::Func::getWorkArea()
function, which gives you a persistant directory where you can store data files. By default they will not be web accessible. The directory is guaranteed to exist, and to be writable by the webserver user. For convenience, TWiki::Func::storeFile()
and TWiki::Func::readFile()
are provided to persistently store and retrieve simple data in this area.
TWiki::Func::saveAttachment()
function to store the data.
Recommendation for file name:_FooBarPlugin_img123.gif
_FooBarPlugin_img123.gif
TWiki::Func::saveAttachment()
function to store the data.
Recommendation for file names in Plugin attachment area:_Main_roundedge-ul.gif
_Main_roundedge-ul.gif
Dev
, such as MyFirstPluginDev
. The Plugin development topic is a great resource to discuss feature enhancements and to get feedback from the TWiki community.
TWiki::Plugins
version in which the handler was first deprecated. For example, if we need to define the endRenderingHandler
for compatibility with TWiki::Plugins
versions before 1.1, we would add this to the plugin:
package TWiki::Plugins::SinkPlugin; use vars qw( %TWikiCompatibility ); $TWikiCompatibility{endRenderingHandler} = 1.1;If the currently-running TWiki version is 1.1 or later, then the handler will not be called and the warning will not be issued. TWiki with versions of
TWiki::Plugins
before 1.1 will still call the handler as required.
Related Topics: DeveloperDocumentationCategory, AdminDocumentationCategory, TWiki:TWiki.TWikiPluginsSupplementTWiki Plugins | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Plug-in enhanced feature add-ons, with a Plugin API for developers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Add functionality to TWiki with readily available Plugins; create Plugins based on APIs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | You can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | You can add Plugins to extend TWiki functionality, without altering the core code. A plug-in approach lets you: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Preinstalled Plugins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | TWiki Plugins are developed and contributed by interested members of the community. Plugins are provided on an 'as is' basis; they are not a part of TWiki, but are independently developed and maintained. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TWiki comes with a set of Plugins as part of the standard installation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Installing Plugins | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Each TWiki Plugin comes with its own documentation: step-by-step installation instructions, a detailed description of any special requirements, version details, and a working example for testing. Many Plugins have an install script that automates these steps for you. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Most Plugins can be installed in three easy steps, with no programming skills required: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Special Requirements: Some Plugins need certain Perl modules to be preinstalled on the host system. Plugins may also use other resources, like graphics, other modules, applications, and templates. You should be able to find detailed instructions in the Plugin's documentation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Special Requests: Some Plugins need certain Perl modules to be preinstalled on the host system. Plugins may also use other resources, like graphics, other modules, applications, templates. In these cases, detailed instructions are in the Plugin documentation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Each Plugin has a standard release topic, located in the TWiki:Plugins![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Each Plugin has a standard release page, located in the TWiki:Plugins![]() SomePlugin ), there's a separate development page.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
On-Site Pretesting | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | To test new Plugins on your installation before making them public, you may want to use one of these two approaches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The recommended approach to testing new Plugins before making them public is to create a second local TWiki installation, and test the Plugin there. You can allow selected users access to the test area. Once you are satisifed that it won't compromise your main installation, you can install it there as well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | InstalledPlugins shows which Plugins are: 1) installed, 2) loading properly, and 3) what TWiki:Codev.PluginHandlers![]() %FAILEDPLUGINS% variable can be used to debug failures. You may also want to check your webserver error log and the various TWiki log files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Some Notes on Plugin Performance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Checking that Plugins are Working on a Live Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The performance of the system depends to some extent on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). You can only really tell the performance impact by installing the Plugin and by measuring the performance with and without the new Plugin. Use the TWiki:Plugins.PluginBenchmarkAddOn![]() ab utility. Example on Unix:time wget -qO /dev/null /bin/view/TWiki/AbcPlugin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | InstalledPlugins shows which Plugins are: 1) installed, 2) loading properly and 3) what TWiki:Codev.PluginHandlers![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | A Note on Plugin Performance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Managing Installed Plugins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | The performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Enabling Plugins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Managing Plugins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugins can be enabled and disabled with the configure script. An installed Plugin needs to be enabled before it can be used. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | When you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugin Evaluation Order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Setting Preferences | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | By default, TWiki executes Plugins in alphabetical order on Plugin name. It is possible to change the order, for example to evaluate database variables before the speadsheet CALCs. This can be done with {PluginsOrder} in the Plugins section of configure. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Installed Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugin-Specific Settings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Listing Active Plugins | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Plugin status variables let you list all active Plugins wherever needed. There are two list formats: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Plugin status variables let you list all active Plugins wherever needed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | DEMO: Automatically List Active Plugins Using Variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
On this TWiki site, the enabled Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Using %ACTIVATEDPLUGINS% : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | On this TWiki site, the active Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin.
Using % :You can use any of these active TWiki Plugins: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
|
Plugin | Errors |
---|---|
SpreadSheetPlugin | none |
BackupRestorePlugin | none |
ColorPickerPlugin | none |
CommentPlugin | none |
DatePickerPlugin | none |
EditTablePlugin | none |
HeadlinesPlugin | none |
InterwikiPlugin | none |
JQueryPlugin | none |
PreferencesPlugin | none |
SetGetPlugin | none |
SlideShowPlugin | none |
SmiliesPlugin | none |
TWikiSheetPlugin | none |
TablePlugin | none |
TagMePlugin | none |
TinyMCEPlugin | none |
TwistyPlugin | none |
WatchlistPlugin | none |
WysiwygPlugin | none |
Handler | Plugins |
---|---|
afterEditHandler | WysiwygPlugin |
afterRenameHandler | TagMePlugin WatchlistPlugin |
afterSaveHandler | TagMePlugin WatchlistPlugin |
beforeCommonTagsHandler | EditTablePlugin PreferencesPlugin TWikiSheetPlugin TwistyPlugin WysiwygPlugin |
beforeEditHandler | TinyMCEPlugin WysiwygPlugin |
beforeMergeHandler | WysiwygPlugin |
beforeSaveHandler | CommentPlugin WatchlistPlugin WysiwygPlugin |
commonTagsHandler | SpreadSheetPlugin BackupRestorePlugin CommentPlugin EditTablePlugin JQueryPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin |
initPlugin | SpreadSheetPlugin BackupRestorePlugin ColorPickerPlugin CommentPlugin DatePickerPlugin EditTablePlugin HeadlinesPlugin InterwikiPlugin JQueryPlugin PreferencesPlugin SetGetPlugin SlideShowPlugin SmiliesPlugin TWikiSheetPlugin TablePlugin TagMePlugin TinyMCEPlugin TwistyPlugin WatchlistPlugin WysiwygPlugin |
modifyHeaderHandler | WysiwygPlugin |
postRenderingHandler | PreferencesPlugin WysiwygPlugin |
preRenderingHandler | InterwikiPlugin SmiliesPlugin TablePlugin |
lib/TWiki/Func.pm
) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.lib/TWiki/Func.pm
) describes all the interfaces available to Plugins. Plugins should only use the interfaces described in this module.Func.pm
, you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.Func.pm
, you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.lib/TWiki/Plugins/EmptyPlugin.pm
module.lib/TWiki/Plugins/EmptyPlugin.pm
module.DISABLE_
from the function name.
DISABLE_
from the function name.
outsidePREHandler
and insidePREHandler
are particularly expensive.
commonTagsHandler
or startRenderingHandler
for rendering tasks: commonTagsHandler:
Use it to expand %XYZPLUGIN%
and %XYZPLUGIN{...}%
variables
startRenderingHandler:
Use it for your own rendering rules or to overload TWiki's internal rendering like [[links]]
eval
block like:eval
block like this:eval { require IPC::Run }
return "<font color=\"red\">SamplePlugin: Can't load required modules ($@)</font>" if $@;
$VERSION='0.000'
variable, beginning at 1.000
.
initPlugin
handler should check all dependencies and return TRUE if the initialization is OK or FALSE if something went wrong. initPlugin
handler).
$TWiki::Plugins::VERSION
in the TWiki::Plugins
module contains the TWiki Plugin API version, currently 6.10.
%PLUGINVERSION{}%
variable to query the Plugin API version or the version of installed Plugins.
%TWiki::cfg
hash than adding it as preferences in the Plugin topic MyFirstPlugin.pm
MyFirstPlugin.txt
MyFirstPlugin
topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/
directory.
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.
lib/TWiki/Plugins/EmptyPlugin.pm
to <name>Plugin.pm
. The EmptyPlugin.pm
module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs;
instead of just Package Attrs;
. Then call it using:
MyFirstPlugin
, press enter and create the new topic
OUTLINE: Doc Topic Contents
Check the Plugins web on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: Syntax Rules: <Describe any special text formatting that will be rendered.>" Example: <Include an example of the Plugin in action. Possibly include a static HTML version of the example to compare if the installation was a success!>" Plugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>"Plugin Installation Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" Plugin Info: <Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins
- Plugins Preferences <If user settings are needed, explain... Entering values works exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:>"
- Set <EXAMPLE = value added>
web.>"
Plugin
, ex: MyFirstPlugin.pm
, and a documentation page with the same name(MyFirstPlugin.txt
).Plugin
, ex: MyFirstPlugin.pm
, and a documentation page with the same name(MyFirstPlugin.txt
).lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
[a required graphic]
MyFirstPlugin.zip
) and add the entire directory structure from Step 1. The archive should look like this: lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
MyFirstPlugin
MyFirstPlugin.zip
Dev
, ex: MyFirstPluginDev
. This is the discussion page for future development. (User support for Plugins is handled in TWiki:SupportTWiki::Func::getWorkArea()
function, which gives you a persistant directory where you can store data files. By default they will not be web accessible. The directory is guaranteed to exist, and to be writable by the webserver user. For convenience, TWiki::Func::storeFile()
and TWiki::Func::readFile()
are provided to persistently store and retrieve simple data in this area.pubdir/Installweb/FooBarPlugin
Installweb
refers to the name of the web where the Plugin is installed
%PUBURL%/Installweb/FooBarPlugin
_any_name.ext
getPubDir()
to get the attachment root directory
getUrlHost()
and getPubUrlPath()
to build the URL in case you create content for the browser
$installWeb
to get the name of the web where the Plugin is installed
TWiki::Func::saveAttachment()
function to store the data._FooBarPlugin_img123.gif
pubdir/Webname/TopicName
TWiki::Func::saveAttachment()
function to store the data.%PUBURL%/Webname/TopicName
_FooBarPlugin_any_name.ext
getPubDir()
to get the attachment root directory
getUrlHost()
and getPubUrlPath()
to build the URL in case you create content for the browser
sub _make_filename { my ( $web, $topic, $name ) = @_;
_Main_roundedge-ul.gif
Dev
, such as MyFirstPluginDev
. The Plugin development topic is a great resource to discuss feature enhancements and to get feedback from the TWiki community.
TWiki::Plugins
version in which the handler was first deprecated. For example, if we need to define the endRenderingHandler
for compatibility with TWiki::Plugins
versions before 1.1, we would add this to the plugin:
package TWiki::Plugins::SinkPlugin; use vars qw( %TWikiCompatibility ); $TWikiCompatibility{endRenderingHandler} = 1.1;
TWiki::Plugins
before 1.1 will still call the handler as required.TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with a set of Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Checking that Plugins are Working on a Live ServerInstalledPlugins shows which Plugins are: 1) installed, 2) loading properly and 3) what TWiki:Codev.PluginHandlers![]() A Note on Plugin PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
Plugin Version Detection | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | To eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system is provided for automatic compatibility checking. | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
![]() Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; } | ||||||||
Changed: | ||||||||
< < | -- TWiki:Main/PeterThoeny![]() | |||||||
> > | -- TWiki:Main/PeterThoeny![]() | |||||||
-- TWiki:Main/AndreaSterbini![]() -- TWiki:Main/MikeMannix ![]() |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with a set of Plugins as part of the standard installation.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Checking that Plugins are Working on a Live ServerInstalledPlugins shows which Plugins are: 1) installed, 2) loading properly and 3) what TWiki:Codev.PluginHandlers![]() A Note on Plugin PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
![]() Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; }-- TWiki:Main/PeterThoeny ![]() -- TWiki:Main/AndreaSterbini ![]() -- TWiki:Main/MikeMannix ![]() |
Changed: | ||||||||
< < | TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with a set of Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
A Note on Plugin PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
![]() Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; }-- TWiki:Main/PeterThoeny ![]() -- TWiki:Main/AndreaSterbini ![]() -- TWiki:Main/MikeMannix ![]() | |||||||
> > | TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with a set of Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Checking that Plugins are Working on a Live ServerInstalledPlugins shows which Plugins are: 1) installed, 2) loading properly and 3) what TWiki:Codev.PluginHandlers![]() A Note on Plugin PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
![]() Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; } | |||||||
Added: | ||||||||
> > |
-- TWiki:Main/PeterThoeny![]() -- TWiki:Main/AndreaSterbini ![]() -- TWiki:Main/MikeMannix ![]() | |||||||
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with a set of Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
A Note on Plugin PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents | ||||||||
Changed: | ||||||||
< < | Plugin Global Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
> > | Plugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
![]() Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public Use | ||||||||
Changed: | ||||||||
< < | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]() | |||||||
> > | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]() | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < | -- AndreaSterbini? - 29 May 2001 -- PeterThoeny - 11 Dec 2003 -- MikeMannix? - 03 Dec 2001 | |||||||
> > | Thank you very much for sharing your Plugin with the TWiki community ![]() | |||||||
Added: | ||||||||
> > | Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; }-- TWiki:Main/PeterThoeny ![]() -- TWiki:Main/AndreaSterbini ![]() -- TWiki:Main/MikeMannix ![]() | |||||||
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled Plugins | ||||||||
Changed: | ||||||||
< < | TWiki comes with three Plugins as part of the standard installation. | |||||||
> > | TWiki comes with a set of Plugins as part of the standard installation. | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Deleted: | ||||||||
< < |
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Changed: | ||||||||
< < | A Note on Performance | |||||||
> > | A Note on Plugin Performance | |||||||
Changed: | ||||||||
< < | The performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that needs to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin | |||||||
> > | The performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that need to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin | |||||||
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
| ||||||||
Added: | ||||||||
> > | Most Plugins use either the commonTagsHandler or startRenderingHandler for rendering tasks:
![]() Hints on Writing Fast Plugins
| |||||||
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
| ||||||||
Changed: | ||||||||
< < | -- PeterThoeny - 29 Jan 2003 | |||||||
> > | -- PeterThoeny - 11 Dec 2003 | |||||||
-- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
A Note on Performance | ||||||||
Changed: | ||||||||
< < | The performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that needs to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. | |||||||
> > | The performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example, outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that needs to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin. Example for Unix:time wget -qO /dev/null https://tier2.uos.ac.kr/bin/view/TWiki/AbcPlugin | |||||||
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.)
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- PeterThoeny - 29 Jan 2003 -- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Added: | ||||||||
> > |
A Note on PerformanceThe performance of the system depends on the number of Plugins installed and on the Plugin implementation. Some Plugins impose no measurable performance decrease, some do. For example,outsidePREHandler is an expensive callback function, or a Plugin might use many Perl libraries that needs to be initialized with each page view (unless you run mod_perl). It is recommended to measure the performance with and without a new Plugin.
In case you need to install an "expensive" Plugin and you need its functionality only in one web you can place the Plugin topic into that web. TWiki will initialize the Plugin only if the Plugin topic is found (which won't be the case for other webs.) | |||||||
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- PeterThoeny - 29 Jan 2003 -- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- PeterThoeny - 29 Jan 2003 -- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThe TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module. | ||||||||
Deleted: | ||||||||
< < |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl Module | ||||||||
Changed: | ||||||||
< < | Copy file lib/TWiki/Plugins/EmptyPlugin.pm to <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. | |||||||
> > | Copy file lib/TWiki/Plugins/EmptyPlugin.pm to <name>Plugin.pm . The EmptyPlugin.pm module contains mostly empty functions, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information. | |||||||
Added: | ||||||||
> > | If your Plugin uses its own modules and objects, you must include the name of the Plugin in the package name. For example, write Package MyFirstPlugin::Attrs; instead of just Package Attrs; . Then call it using:
use TWiki::Plugins::MyFirstPlugin::Attrs; $var = MyFirstPlugin::Attrs->new(); | |||||||
Writing the Documentation TopicThe 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: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
OUTLINE: Doc Topic Contents | ||||||||
Changed: | ||||||||
< < | Check EmptyPlugin on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: | |||||||
> > | Check the Plugins web on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: | |||||||
Syntax Rules: <Describe any special text formatting that will be rendered.>" | ||||||||
Changed: | ||||||||
< < | MyFirstPlugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
> > | Example: <Include an example of the Plugin in action. Possibly include a static HTML version of the example to compare if the installation was a success!>" | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | Plugin Global Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | How-to Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" | |||||||
> > | Plugin Installation Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" | |||||||
Deleted: | ||||||||
< < | Test Example: <Include an example of the Plugin in action: if it works, the installation was a success!>" | |||||||
Plugin Info: <Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins![]() Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
| ||||||||
Changed: | ||||||||
< < | -- PeterThoeny - 14 Sep 2001 | |||||||
> > | -- PeterThoeny - 29 Jan 2003 | |||||||
-- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core Functions | ||||||||
Changed: | ||||||||
< < | The lib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | |||||||
> > | The TWikiFuncModule? (lib/TWiki/Func.pm ) implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | |||||||
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki. | ||||||||
Deleted: | ||||||||
< < |
| |||||||
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module. | ||||||||
Added: | ||||||||
> > |
| |||||||
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- PeterThoeny - 14 Sep 2001 -- MikeMannix? - 03 Dec 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- PeterThoeny - 14 Sep 2001 | ||||||||
Changed: | ||||||||
< < | -- MikeMannix? - 03 Dec 2001 | |||||||
> > | -- MikeMannix? - 03 Dec 2001 | |||||||
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents | ||||||||
Changed: | ||||||||
< < | Plugins Preferences <If user settings are needed, explain... Entering valuse works exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:>" | |||||||
> > |
| |||||||
![]() Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
| ||||||||
Deleted: | ||||||||
< < | -- MikeMannix? - 01 Sep 2001 | |||||||
-- PeterThoeny - 14 Sep 2001 | ||||||||
Added: | ||||||||
> > | -- MikeMannix? - 03 Dec 2001 | |||||||
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
| ||||||||
Added: | ||||||||
> > | ||||||||
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Managing PluginsWhen you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Automatically List Active Plugins Using Variables Using The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | ||||||||
Changed: | ||||||||
< < | DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki. | |||||||
> > | ![]() Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki. | |||||||
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- MikeMannix? - 01 Sep 2001 -- PeterThoeny - 14 Sep 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverview | ||||||||
Changed: | ||||||||
< < | You can add Plugins to extend TWiki's functionality, without altering the core program code. With a plug-in approach, you can: | |||||||
> > | You can add Plugins to extend TWiki's functionality, without altering the core program code. A plug-in approach lets you: | |||||||
| ||||||||
Changed: | ||||||||
< < | Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki:Plugins![]() | |||||||
> > | Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki:Plugins![]() | |||||||
Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation. | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Managing Plugins | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | When you finish installing a Plugin, you should be able to read the user instructions and go. In fact, some Plugins require additional settings or offer extra options that you have to select. Also, you may want to make a Plugin available only in certain webs, or temporarily disable it. And may want to list all available Plugins in certain topics. You can handle all of these management tasks with simple procedures. | |||||||
Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
| ||||||||
Changed: | ||||||||
< < | DEMO: Active Plugin Variables | |||||||
> > | DEMO: Automatically List Active Plugins Using Variables | |||||||
Changed: | ||||||||
< < | %ACTIVATEDPLUGINS% | |||||||
> > | Using %ACTIVATEDPLUGINS% : | |||||||
On this TWiki site, the active Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin. | ||||||||
Changed: | ||||||||
< < | % | |||||||
> > | Using % : | |||||||
You can use any of these active TWiki Plugins:
The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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. | ||||||||
Added: | ||||||||
> > | ||||||||
The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents | ||||||||
Changed: | ||||||||
< < | Syntax Rules: Describe any special text formatting that will be rendered. | |||||||
> > | Syntax Rules: <Describe any special text formatting that will be rendered.>" | |||||||
Changed: | ||||||||
< < | MyFirstPlugin Settings: Description and settings for custom Plugin %VARIABLES%, and those required by TWiki. | |||||||
> > | MyFirstPlugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
Changed: | ||||||||
< < | Plugins Preferences work exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:
| |||||||
> > | Plugins Preferences <If user settings are needed, explain... Entering valuse works exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:>"
| |||||||
Changed: | ||||||||
< < | How-to Instructions: Step-by-step set-up guide, user help, whatever it takes to install and run, goes here. | |||||||
> > | How-to Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" | |||||||
Changed: | ||||||||
< < | Test Example: Include an example of the Plugin in action: if it works, the installation was a success! | |||||||
> > | Test Example: <Include an example of the Plugin in action: if it works, the installation was a success!>" | |||||||
Changed: | ||||||||
< < | Plugin Info: Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins![]() | |||||||
> > | Plugin Info: <Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins![]() | |||||||
Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- MikeMannix? - 01 Sep 2001 -- PeterThoeny - 14 Sep 2001 |
TWiki PluginsPlug-in enhanced feature add-ons, with a Plugin API for developersOverviewYou can add Plugins to extend TWiki's functionality, without altering the core program code. With a plug-in approach, you can:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsIdeally, 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.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
| ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
DEMO: Active Plugin Variables
%ACTIVATEDPLUGINS% On this TWiki site, the active Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin. % You can use any of these active TWiki Plugins:
The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory.
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.
Creating the Perl ModuleCopy filelib/TWiki/Plugins/EmptyPlugin.pm to <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.
Writing the Documentation TopicThe 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:
| ||||||||
Changed: | ||||||||
< < | OUTLINE: Doc Topic Contents | |||||||
> > | 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:
Syntax Rules: Describe any special text formatting that will be rendered.
MyFirstPlugin Settings: Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.
Plugins Preferences work exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:
![]() Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]()
-- MikeMannix? - 01 Sep 2001 | ||||||||
Changed: | ||||||||
< < | -- PeterThoeny? - 14 Sep 2001 | |||||||
> > | -- PeterThoeny - 14 Sep 2001 | |||||||
TWiki Plugins | ||||||||
Changed: | ||||||||
< < | Plugin use and development; about the Plugin API. | |||||||
> > | Plug-in enhanced feature add-ons, with a Plugin API for developers | |||||||
Overview | ||||||||
Changed: | ||||||||
< < | You can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can: | |||||||
> > | You can add Plugins to extend TWiki's functionality, without altering the core program code. With a plug-in approach, you can: | |||||||
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
| ||||||||
Changed: | ||||||||
< < | Each Plugin has a standard release page, located in the TWiki:Plugins![]() SomePlugin ), there's a separate development page. | |||||||
> > | Each Plugin has a standard release page, located in the TWiki:Plugins![]() SomePlugin ), there's a separate development page. | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Managing PluginsIdeally, 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.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | Plugin execution order in TWiki is determined by searching Plugin topics in a specific sequence: First, full web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web. | |||||||
> > | Plugin execution order in TWiki is determined by searching Plugin topics in a specific sequence: First, full web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web. | |||||||
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
DEMO: Active Plugin Variables | ||||||||
Changed: | ||||||||
< < | %ACTIVATEDPLUGINS% | |||||||
> > | %ACTIVATEDPLUGINS% | |||||||
On this TWiki site, the active Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin. | ||||||||
Changed: | ||||||||
< < | % | |||||||
> > | % | |||||||
You can use any of these active TWiki Plugins:
The TWiki Plugin APIThe 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 01-Sep-2001 release.Available Core Functions | ||||||||
Changed: | ||||||||
< < | The lib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | |||||||
> > | The lib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module. | |||||||
Changed: | ||||||||
< < | DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki. | |||||||
> > | DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki. | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Predefined Hooks | ||||||||
Changed: | ||||||||
< < | In addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in the lib/TWiki/Plugins/EmptyPlugin.pm module. | |||||||
> > | 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 | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | 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. | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
The Perl module can be a block of code that connects with TWiki alone, or it can include other elements, like other Perl modules (including other Plugins), graphics, TWiki templates, external applications (ex: a Java applet), or just about anything else it can call. | ||||||||
Changed: | ||||||||
< < | In particular, files that should be web-accessible (graphics, Java applets ...) are best placed as attachments of the MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory. | |||||||
> > | In particular, files that should be web-accessible (graphics, Java applets ...) are best placed as attachments of the MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory. | |||||||
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.
Creating the Perl Module | ||||||||
Changed: | ||||||||
< < | Copy file lib/TWiki/Plugins/EmptyPlugin.pm to <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. | |||||||
> > | Copy file lib/TWiki/Plugins/EmptyPlugin.pm to <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. | |||||||
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for Distribution | ||||||||
Changed: | ||||||||
< < | A minimum Plugin release consists of a Perl module with a WikiName that ends in Plugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ). | |||||||
> > | A minimum Plugin release consists of a Perl module with a WikiName that ends in Plugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ). | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Publishing for Public Use | ||||||||
Changed: | ||||||||
< < | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() | |||||||
> > | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]() | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
-- AndreaSterbini? - 29 May 2001 -- MikeMannix? - 01 Sep 2001 -- PeterThoeny? - 14 Sep 2001 |
TWiki PluginsPlugin use and development; about the Plugin API.OverviewYou can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can:
| ||||||||
Changed: | ||||||||
< < | Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki.org Plugins web![]() | |||||||
> > | Everything to do with TWiki Plugins - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki:Plugins![]() | |||||||
Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsIdeally, 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.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Active Plugin Variables | ||||||||
Changed: | ||||||||
< < | %ACTIVATEDPLUGINS% | |||||||
> > | %ACTIVATEDPLUGINS% | |||||||
On this TWiki site, the active Plugins are: SpreadSheetPlugin, BackupRestorePlugin, ColorPickerPlugin, CommentPlugin, DatePickerPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, JQueryPlugin, PreferencesPlugin, SetGetPlugin, SlideShowPlugin, SmiliesPlugin, TWikiSheetPlugin, TablePlugin, TagMePlugin, TinyMCEPlugin, TwistyPlugin, WatchlistPlugin, WysiwygPlugin. | ||||||||
Changed: | ||||||||
< < | % | |||||||
> > | % | |||||||
You can use any of these active TWiki Plugins:
The TWiki Plugin API | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | 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 01-Sep-2001 release. | |||||||
Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
Creating PluginsWith 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.The DefaultPlugin Alternative | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Anatomy of a PluginA basic TWiki Plugin consists of two elements: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
The Perl module can be a block of code that connects with TWiki alone, or it can include other elements, like other Perl modules (including other Plugins), graphics, TWiki templates, external applications (ex: a Java applet), or just about anything else it can call. | ||||||||
Changed: | ||||||||
< < | In particular, files that should be web-accessible (graphics, Java applets ...) are best placed as attachments of the YourPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/YourPlugin/ directory. | |||||||
> > | In particular, files that should be web-accessible (graphics, Java applets ...) are best placed as attachments of the MyFirstPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/ directory. | |||||||
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.
Creating the Perl Module | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | Copy file lib/TWiki/Plugins/EmptyPlugin.pm to <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. | |||||||
Writing the Documentation TopicThe 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: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
OUTLINE: Doc Topic Contents | ||||||||
Changed: | ||||||||
< < | 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: Describe any special text formatting that will be rendered. | ||||||||
Changed: | ||||||||
< < | YourPlugin Settings: Description and settings for your custom Plugin %VARIABLES%, and those required by TWiki. | |||||||
> > | MyFirstPlugin Settings: Description and settings for custom Plugin %VARIABLES%, and those required by TWiki. | |||||||
Plugins Preferences work exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:
![]() Packaging for Distribution | ||||||||
Changed: | ||||||||
< < | 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 ). | |||||||
> > | A minimum Plugin release consists of a Perl module with a WikiName that ends in Plugin , ex: MyFirstPlugin.pm , and a documentation page with the same name(MyFirstPlugin.txt ). | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]()
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | -- AndreaSterbini? - 29 May 2001 -- MikeMannix? - 01 Sep 2001 | |||||||
> > | -- AndreaSterbini? - 29 May 2001 -- MikeMannix? - 01 Sep 2001 | |||||||
Added: | ||||||||
> > | -- PeterThoeny? - 14 Sep 2001 | |||||||
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:
![]() | ||||||||
Changed: | ||||||||
< < | Preinstalled Plugins | |||||||
> > | Preinstalled Plugins | |||||||
TWiki comes with three Plugins as part of the standard installation.
| ||||||||
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.
Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
| ||||||||
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:
| ||||||||
Added: | ||||||||
> > | Managing Plugins | |||||||
Deleted: | ||||||||
< < | 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:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
| ||||||||
Changed: | ||||||||
< < | Listing Active Plugins | |||||||
> > | Listing Active Plugins | |||||||
Plugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Active Plugin Variables | ||||||||
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.
DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
| ||||||||
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.
| ||||||||
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:
YourPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/YourPlugin/ directory.
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:
OUTLINE: Doc Topic Contents | ||||||||
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 ).
| ||||||||
Changed: | ||||||||
< < | Publishing for Public Use | |||||||
> > | Publishing for Public Use | |||||||
You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]()
-- MikeMannix? - 01 Sep 2001 |
TWiki PluginsPlugin use and development; about the Plugin API.OverviewYou can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can:
![]() Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
![]() SomePlugin ), there's a separate development page.
On-Site PretestingTo test new Plugins on your installation before making them public, you may want to use one of these two approaches:
Managing PluginsIdeally, 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.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
web.topicname name, if specified in INSTALLEDPLUGINS ; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Listing Active PluginsPlugin status variables let you list all active Plugins wherever needed. There are two list formats:
DEMO: Active Plugin Variables The TWiki Plugin APIThe 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.Available Core FunctionsThelib/TWiki/Func.pm implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
DevALERT: If you use functions not in Func.pm , you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
Predefined HooksIn addition to TWiki core functions, Plugins can use predefined hooks, or call backs, listed in thelib/TWiki/Plugins/EmptyPlugin.pm module.
Plugin Version DetectionTo eliminate the incompatibility problems bound to arise from active open Plugin development, a Plugin versioning system and an APIGetVersion detection routine are provided for automatic compatibility checking.
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Creating PluginsWith 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.The DefaultPlugin Alternative
Anatomy of a PluginA basic TWiki Plugin consists of two elements:
| ||||||||
Added: | ||||||||
> > | In particular, files that should be web-accessible (graphics, Java applets ...) are best placed as attachments of the YourPlugin topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/YourPlugin/ directory. | |||||||
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.
Creating the Perl ModuleCopy 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.
Writing the Documentation TopicThe 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:
OUTLINE: Doc Topic Contents Packaging for DistributionA minimum Plugin release consists of a Perl module with a WikiName that ends inPlugin , ex: YourPlugin.pm , and a documentation page with the same name(YourPlugin.txt ).
Publishing for Public UseYou can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]()
-- MikeMannix? - 01 Sep 2001 |
TWiki Plugins | ||||||||
Changed: | ||||||||
< < | TWikiPlugins allow you to add new features to TWiki without changing the core program. Using a plug-in approach means that you can: | |||||||
> > | Plugin use and development; about the Plugin API. | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | Overview | |||||||
Added: | ||||||||
> > |
You can add Plugins to greatly extend TWiki's functionality, without alering the program core. With a plug-in approach, you can:
| |||||||
| ||||||||
Changed: | ||||||||
< < | 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 - demos, new releases, downloads, development, general discussion - is available at TWiki.org, in the TWiki.org Plugins web![]() | |||||||
Added: | ||||||||
> > | Preinstalled PluginsTWiki comes with three Plugins as part of the standard installation.
| |||||||
Installing PluginsEach 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. Most Plugins can be installed in three easy steps, with no programming skills required:
| ||||||||
Changed: | ||||||||
< < | Some Plugins need certain Perl modules to be pre-installed on the host system. Plugins may also use other resources, like graphics, other modules, applications, templates. In these cases, detailed instructions are in the Plugin documentation. | |||||||
> > | Special Requests: Some Plugins need certain Perl modules to be preinstalled on the host system. Plugins may also use other resources, like graphics, other modules, applications, templates. In these cases, detailed instructions are in the Plugin documentation. | |||||||
Changed: | ||||||||
< < | TWikiPlugin documentation pages are located at TWiki.org, in TWiki:Plugins![]() SomePlugin ) and a separate development page. | |||||||
> > | Each Plugin has a standard release page, located in the TWiki:Plugins![]() SomePlugin ), there's a separate development page. | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | Preinstalled Plugins | |||||||
> > | On-Site Pretesting | |||||||
Changed: | ||||||||
< < | TWiki comes with three Plugins as part of the standard installation. | |||||||
> > | To test new Plugins on your installation before making them public, you may want to use one of these two approaches: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Deleted: | ||||||||
< < |
| |||||||
Managing PluginsIdeally, 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.Setting PreferencesInstalled Plugins can be toggled on or off, site-wide or by web, through TWikiPreferences and individual WebPreferences:
|