Log In | Users | Register
Welcome, Registration, and other StartingPoints; Foswiki history & Wiki style; All the docs...
Edit | Attach | New | Raw | Diff | Print | Subscribe | Tools
You are here: System » Plugins

Foswiki Plugins

Add functionality to Foswiki with plugins

Overview

You can add plugins to extend Foswiki functionality without altering the core code. A plug-in approach lets you:

  • add virtually unlimited features while keeping the main Foswiki code compact and efficient;
  • heavily customize an installation and still do clean updates to new versions of Foswiki;
  • rapidly develop new Foswiki functions in Perl using the plugin API.

Everything to do with Foswiki plugins - demos, new releases, downloads, development, general discussion - is available at Foswiki.org, in the Foswiki:Extensions web.

Foswiki 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 Foswiki, but are independently developed and maintained.

Most TWiki® plugins can also be used with Foswiki if the TWikiCompatibilityPlugin is installed (it is by default).

See other types of extensions: Contribs, Skins

Installed Plugins

  • TWikiCompatibilityPlugin (Foswiki-1.0.9, $Rev: 6017 (2010-01-11) $): add TWiki personality to Foswiki
  • SpreadSheetPlugin (10 Nov 2009, $Rev: 5484 (2009-11-10) $): Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text
  • BatchUploadPlugin: (disabled)
  • BreadCrumbsPlugin (v2.42, $Rev: 4694 (2009-08-20) $): A flexible way to display breadcrumbs navigation
  • CalendarPlugin (2.000, $Rev: 8058 (2010-07-07) $): Show a monthly calendar with highlighted events
  • CommentPlugin (24 Feb 2010, $Rev: 6512 (2010-02-24) $): Quickly post comments to a page without an edit/save cycle
  • DBCachePlugin (3.50, $Rev: 8342 (2010-07-28) $): Lightweighted frontend to the DBCacheContrib
  • EditChapterPlugin (2.12, $Rev: 6337 (2010-02-15) $): An easy sectional edit facility
  • EditTablePlugin (4.34, $Rev: 5854 (2009-12-23) $): Edit tables using edit fields, date pickers and drop down boxes
  • ExplicitNumberingPlugin (1.6, $Rev: 6482 (2010-02-23) $): Use the ##., ##.. etc. notation to insert outline numbering sequences (1, 1.1, 2, 2.1) in topic's text. Also support numbered headings.
  • ExternalLinkPlugin (1.21, $Rev: 5906 (2009-12-31) $): Adds a visual indicator to outgoing links
  • FilterPlugin (2.03, $Rev: 8284 (2010-07-23) $): Substitute and extract information from content by using regular expressions
  • FlexWebListPlugin (v1.51, $Rev: 5698 (2009-12-02) $): Flexible way to display hierarchical weblists
  • GenPDFAddOnPlugin (1.2, $Rev: 7410 (2010-05-14) $): GenPDFAddOnPlugin helper plugin for GenPDFAddOn renders the %GENPDF% tag
  • IfDefinedPlugin (v2.00, $Rev: 4422 (2009-07-03) $): Render content conditionally
  • ImagePlugin (2.31, $Rev: 6307 (2010-02-12) $): Control the display and alignment of images using an easy syntax
  • InterwikiPlugin (20 Sep 2009, $Rev: 5022 (2009-09-20) $): Link ExternalSite?:Page text to external sites based on aliases defined in a rules topic
  • JQueryPlugin (3.51, $Rev: 20090710 (2009-07-10) $): jQuery JavaScript library for Foswiki
  • LatexModePlugin (4.0, $Rev: 4721 (2009-08-28) $): Enables LaTeX markup (mathematics and more) in Foswiki topics
  • MathModePlugin (4.01, $Rev: 4640 (2009-08-10) $): Include LaTeX formatted math in your Foswiki pages
  • NatEditPlugin (v4.21, $Rev: 6336 (2010-02-15) $): A Wikiwyg Editor
  • NatSkinPlugin (3.96, $Rev: 6287 (2010-02-12) $): Theming engine for NatSkin
  • PreferencesPlugin (20 Sep 2009, $Rev: 5037 (2009-09-20) $): Allows editing of preferences using fields predefined in a form
  • RedirectPlugin (1.1, $Rev: 7923 (2010-06-26) $): Create a redirect to another topic or website.
  • RenderListPlugin (2.2, $Rev: 5042 (2009-09-20) $): Render bullet lists in a variety of formats
  • RenderPlugin (3.0, $Rev: 4818 (2009-09-09) $): Render WikiApplications asynchronously
  • SendEmailPlugin (1.5.1, $Rev: 6581 (2010-02-28) $): Allows to send e-mails through an e-mail form.
  • SetVariablePlugin (1.02, $Rev: 4287 (2009-06-23) $): Flexible handling of topic variables
  • SlideShowPlugin (02 Aug 2008, $Rev: 2742 (2009-02-26) $): Create web based presentations based on topics with headings.
  • SmiliesPlugin (20 Sep 2009, $Rev: 5046 (2009-09-20) $): Render smilies like smile as icons
  • SubscribePlugin (03 Dec 2008, $Rev: 13787 (18 May 2007) $): Subscribe to web notification
  • TablePlugin (1.046, $Rev: 6733 (2010-03-13) $): Control attributes of tables and sorting of table columns
  • TwistyPlugin (1.5.4, $Rev: 6281 (2010-02-12) $): Twisty section Javascript library to open/close content dynamically
  • UploadPlugin (1.11, $Rev: 4414 (2009-07-03) $): Attach multiple files to a topic in one go
  • ZonePlugin (2.1, $Rev: 6966 (2010-03-28) $): Gather content of a page in named zones while rendering it

Failed Plugins

PluginErrors
TWikiCompatibilityPlugin none
SpreadSheetPlugin none
BatchUploadPlugin
Foswiki::Plugins::BatchUploadPlugin could not be loaded.  Errors were:
Can't locate Archive/Zip.pm in @INC (you may need to install the Archive::Zip module) (@INC contains: /data/wiki.c2sm.ethz.ch/foswiki/lib . /opt/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/x86_64-linux /opt/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2 /opt/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/x86_64-linux /opt/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2 /data/wiki.c2sm.ethz.ch/foswiki/lib/CPAN/lib//arch /data/wiki.c2sm.ethz.ch/foswiki/lib/CPAN/lib//5.18.2/x86_64-linux /data/wiki.c2sm.ethz.ch/foswiki/lib/CPAN/lib//5.18.2 /data/wiki.c2sm.ethz.ch/foswiki/lib/CPAN/lib/) at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27.
 at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27.
   Foswiki::Plugins::BatchUploadPlugin::BEGIN() called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   eval {...} called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   require Foswiki/Plugins/BatchUploadPlugin.pm called at (eval 41) line 2
   Foswiki::Plugin::BEGIN() called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   eval {...} called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   eval 'use Foswiki::Plugins::BatchUploadPlugin' called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugin.pm line 133
   Foswiki::Plugin::load('Foswiki::Plugin=HASH(0x1f6a288)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins.pm line 174
   Foswiki::Plugins::load('Foswiki::Plugins=HASH(0x1168c10)', undef) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Users.pm line 247
   Foswiki::Users::initialiseUser('Foswiki::Users=HASH(0x1925618)', 'guest') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki.pm line 1593
   Foswiki::new('Foswiki', undef, 'Foswiki::Request=HASH(0x187b590)', 'HASH(0x1847978)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 293
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x187b590)', 'CODE(0x1168568)', 'view', 1) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 275
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x187b590)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Engine/CGI.pm line 29
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x165f170)') called at /data/wiki.c2sm.ethz.ch/foswiki/bin/view line 45
BEGIN failed--compilation aborted at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27.
 at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27.
   require Foswiki/Plugins/BatchUploadPlugin.pm called at (eval 41) line 2
   Foswiki::Plugin::BEGIN() called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   eval {...} called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins/BatchUploadPlugin.pm line 27
   eval 'use Foswiki::Plugins::BatchUploadPlugin' called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugin.pm line 133
   Foswiki::Plugin::load('Foswiki::Plugin=HASH(0x1f6a288)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins.pm line 174
   Foswiki::Plugins::load('Foswiki::Plugins=HASH(0x1168c10)', undef) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Users.pm line 247
   Foswiki::Users::initialiseUser('Foswiki::Users=HASH(0x1925618)', 'guest') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki.pm line 1593
   Foswiki::new('Foswiki', undef, 'Foswiki::Request=HASH(0x187b590)', 'HASH(0x1847978)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 293
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x187b590)', 'CODE(0x1168568)', 'view', 1) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 275
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x187b590)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Engine/CGI.pm line 29
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x165f170)') called at /data/wiki.c2sm.ethz.ch/foswiki/bin/view line 45
Compilation failed in require at (eval 41) line 2.
 at (eval 41) line 2.
   Foswiki::Plugin::BEGIN() called at (eval 41) line 2
   eval {...} called at (eval 41) line 2
   eval 'use Foswiki::Plugins::BatchUploadPlugin' called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugin.pm line 133
   Foswiki::Plugin::load('Foswiki::Plugin=HASH(0x1f6a288)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins.pm line 174
   Foswiki::Plugins::load('Foswiki::Plugins=HASH(0x1168c10)', undef) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Users.pm line 247
   Foswiki::Users::initialiseUser('Foswiki::Users=HASH(0x1925618)', 'guest') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki.pm line 1593
   Foswiki::new('Foswiki', undef, 'Foswiki::Request=HASH(0x187b590)', 'HASH(0x1847978)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 293
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x187b590)', 'CODE(0x1168568)', 'view', 1) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 275
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x187b590)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Engine/CGI.pm line 29
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x165f170)') called at /data/wiki.c2sm.ethz.ch/foswiki/bin/view line 45
BEGIN failed--compilation aborted at (eval 41) line 2.
 at (eval 41) line 2.
   eval 'use Foswiki::Plugins::BatchUploadPlugin' called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugin.pm line 133
   Foswiki::Plugin::load('Foswiki::Plugin=HASH(0x1f6a288)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Plugins.pm line 174
   Foswiki::Plugins::load('Foswiki::Plugins=HASH(0x1168c10)', undef) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Users.pm line 247
   Foswiki::Users::initialiseUser('Foswiki::Users=HASH(0x1925618)', 'guest') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki.pm line 1593
   Foswiki::new('Foswiki', undef, 'Foswiki::Request=HASH(0x187b590)', 'HASH(0x1847978)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 293
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x187b590)', 'CODE(0x1168568)', 'view', 1) called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/UI.pm line 275
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x187b590)') called at /data/wiki.c2sm.ethz.ch/foswiki/lib/Foswiki/Engine/CGI.pm line 29
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x165f170)') called at /data/wiki.c2sm.ethz.ch/foswiki/bin/view line 45

----
BreadCrumbsPlugin none
CalendarPlugin none
CommentPlugin none
DBCachePlugin none
EditChapterPlugin none
EditTablePlugin none
ExplicitNumberingPlugin none
ExternalLinkPlugin none
FilterPlugin none
FlexWebListPlugin none
GenPDFAddOnPlugin none
IfDefinedPlugin none
ImagePlugin none
InterwikiPlugin none
JQueryPlugin none
LatexModePlugin none
MathModePlugin none
NatEditPlugin none
NatSkinPlugin none
PreferencesPlugin none
RedirectPlugin none
RenderListPlugin none
RenderPlugin none
SendEmailPlugin none
SetVariablePlugin none
SlideShowPlugin none
SmiliesPlugin none
SubscribePlugin none
TablePlugin none
TwistyPlugin none
UploadPlugin none
ZonePlugin none
HandlerPlugins
afterAttachmentSaveHandlerDBCachePlugin
afterCommonTagsHandlerLatexModePlugin
afterRenameHandlerDBCachePlugin
afterSaveHandlerDBCachePlugin
beforeCommonTagsHandlerEditTablePlugin
PreferencesPlugin
beforeSaveHandlerCommentPlugin
NatEditPlugin
SetVariablePlugin
commonTagsHandlerSpreadSheetPlugin
CommentPlugin
EditChapterPlugin
EditTablePlugin
ExplicitNumberingPlugin
ExternalLinkPlugin
FilterPlugin
IfDefinedPlugin
LatexModePlugin
MathModePlugin
SlideShowPlugin
SmiliesPlugin
completePageHandlerNatSkinPlugin
ZonePlugin
earlyInitPluginTWikiCompatibilityPlugin
initPluginTWikiCompatibilityPlugin
SpreadSheetPlugin
BreadCrumbsPlugin
CalendarPlugin
CommentPlugin
DBCachePlugin
EditChapterPlugin
EditTablePlugin
ExplicitNumberingPlugin
ExternalLinkPlugin
FilterPlugin
FlexWebListPlugin
GenPDFAddOnPlugin
IfDefinedPlugin
ImagePlugin
InterwikiPlugin
JQueryPlugin
LatexModePlugin
MathModePlugin
NatEditPlugin
NatSkinPlugin
PreferencesPlugin
RedirectPlugin
RenderListPlugin
RenderPlugin
SendEmailPlugin
SetVariablePlugin
SlideShowPlugin
SmiliesPlugin
SubscribePlugin
TablePlugin
TwistyPlugin
UploadPlugin
ZonePlugin
modifyHeaderHandlerJQueryPlugin
postRenderingHandlerEditChapterPlugin
EditTablePlugin
MathModePlugin
NatSkinPlugin
PreferencesPlugin
preRenderingHandlerInterwikiPlugin
NatSkinPlugin
SmiliesPlugin
TablePlugin
renderWikiWordHandlerDBCachePlugin
startRenderingHandlerRenderListPlugin
This handler is deprecated - please check for updated versions of the plugins that use it!
35 plugins

Installing Plugins

Each Foswiki 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 Foswiki:Extensions web at Foswiki.org. There's usually a number of other related topics, such as a developers page, and an appraisal page.

On-Site Pretesting

The recommended approach to testing new plugins before making them public is to create a second local Foswiki installation, and test the plugin there. You can allow selected users access to the test area. Once you are satisfied that it won't compromise your main installation, you can install it there as well.

The plugins page shows which plugins are: 1) installed, 2) loading properly, and 3) what plugin handlers they invoke. Any failures are shown in the Errors section. The %FAILEDPLUGINS% macro can be used to debug failures. You may also want to check your webserver error log and the various Foswiki log files.

Some Notes on Plugin Performance

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, on real data.

TIP If you need to install an "expensive" plugin, but you only need its functionality only in a subset of your data, you can disable it elsewhere by defining the %DISABLEDPLUGINS% setting.

Define DISABLEDPLUGINS to be a comma-separated list of names of plugins to disable. Define it in Main.SitePreferences 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 Plugins

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:

Listing Active Plugins

Plugin status macros let you list all active plugins wherever needed.

This site is running Foswiki version Foswiki-1.0.9, Sun, 17 Jan 2010, build 6075, plugin API version 2.0

  • %ACTIVATEDPLUGINS% - shows the activated plugins
  • %PLUGINVERSION% - shows the plugins API version
  • %FAILEDPLUGINS% - shows what plugins failed, and why

Enabling Plugins

Plugins can be enabled and disabled with the configure script. An installed plugin needs to be enabled before it can be used.

Plugin Evaluation Order

By default, plugins are executed in alphabetical order on plugin name. It is possible to change the order, for example to evaluate database macros before the spreadsheet CALCs. This can be done with {PluginsOrder} in the plugins section of configure.

Plugin-Specific Settings

Some plugins are configured with plugin preference settings, newer plugins with configure settings.

configure settings are accessible though the configure interface.

Plugin preference settings are defined in the plugin topic and can be overloaded. The SHORTDESCRIPTION setting is always present, it is needed for the automation in the extensions repository. Example preference settings defined in the TablePlugin topic:

  • Set SHORTDESCRIPTION = Control attributes of tables and sorting of table columns

Preference settings of active plugins can be retrieved anywhere in Foswiki with %<pluginname>_<var>%, such as %TABLEPLUGIN_SHORTDESCRIPTION%. They can also be redefined with the %<pluginname>_<var>% setting at a lower level in the Main.SitePreferences or at the web level. For an easier upgrade it is recommended to customize plugin preference settings in Main.SitePreferences only.

Installing Plugins

Each Foswiki 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 Foswiki:Extensions web at Foswiki.org. There's usually a number of other related topics, such as a developers page, and an appraisal page.

On-Site Pretesting

The recommended approach to testing new plugins before making them public is to create a second local Foswiki installation, and test the plugin there. You can allow selected users access to the test area. Once you are satisfied that it won't compromise your main installation, you can install it there as well.

The plugins page shows which plugins are: 1) installed, 2) loading properly, and 3) what plugin handlers they invoke. Any failures are shown in the Errors section. The %FAILEDPLUGINS% macro can be used to debug failures. You may also want to check your webserver error log and the various Foswiki log files.

Some Notes on Plugin Performance

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, on real data.

TIP If you need to install an "expensive" plugin, but you only need its functionality only in a subset of your data, you can disable it elsewhere by defining the %DISABLEDPLUGINS% setting.

Define DISABLEDPLUGINS to be a comma-separated list of names of plugins to disable. Define it in Main.SitePreferences 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

The Foswiki Perl Application Programming Interface

Developing plugins provides a simple introduction to hooking into Foswiki code from your own Perl modules. Foswiki:Development.GettingStarted is the starting point for more comprehensive documentation.


Related Topics: DeveloperDocumentationCategory, AdminDocumentationCategory spacer
This site is managed by the Center for Climate Systems Modeling (C2SM).
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding C2SM Wiki? Send feedback