Tags:
create new tag
, view all tags

Implemented: Enable Specific Plugins with URL parameter

This small feature allows one to enable and disable installed Plugins with a debugenableplugins URL parameter. Plugin authors can use it to measure and document the TWiki:Plugins/Benchmark numbers. The PluginBenchmarkAddOn assumes this feature.

Test:

  • Enable Plugins for debug:
    • Note: Enter comma separated list of Plugin names

Patch:

Index: Plugins.pm
===================================================================
--- Plugins.pm  (revision 3185)
+++ Plugins.pm  (working copy)
@@ -349,6 +349,11 @@
     # append discovered plugin modules to installed plugin list
     push( @instPlugins, @discoveredPlugins );

+    # debug enable Plugins, for TWiki:Plugins/Benchmark
+    my $debugEnablePlugins = "";
+    $debugEnablePlugins = $TWiki::cgiQuery->param( 'debugenableplugins' ) if( $TWiki::cgiQuery );
+    @instPlugins = split( /[\, ]+/, $debugEnablePlugins ) if( $debugEnablePlugins );
+
     # for efficiency we register all possible handlers at once
     my $user = "";
     my $posUser = "";

This feature is in SVN MainBranch and on TWiki.org.

-- PeterThoeny - 10 Nov 2004

Im trying to use the PluginBenchmarkAddOn with TWiki 4.1 and would need this patch, though it seems to be outdated.

-- AndrewRJones - 05 Feb 2007

No need, this patch has been incorporated into the core a long time ago.

-- PeterThoeny - 05 Feb 2007

 
Topic revision: r6 - 17 Feb 2007 - 03:26:02 - PeterThoeny
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback