• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

There was much discussion in TWiki:Codev.MainTWikiPreferencesOverridePluginSettings on how we should handle plugin settings.

We differentiated

  1. Plugin preferences
  2. Plugin customization/personalization
  3. Plugin configuration

The agreement was that we should attempt to move (3) into the standard config format, as this will allow us to read that only once, rather than every time a plugin is called.

In order to make this process easier, I have updated the bin/configure script to allow it to read plugin settings.

For this, in the plugin directory, for example, lib/TWiki/Plugins/ControlsPlugin/, there should be a file Plugin.spec which is layed out in the format of the configure *.spec files. The section marker should be "Plugins", in order to show up under the plugin section, albeit we could also create a separate section for each plugin.

If we do not want to rely on the user to give the correct section, we could enhance TWiki::Configure::TWikiCfg::_parse to take a section argument, which would assume all what follows is in that section. I did not do this yet.

An example spec file would be

#---+ Plugins
# EditTablerowPlugin debug setting
$TWiki::cfg{Plugins}{EditTablerowPlugin}{DEBUG} = 0;

Checked this in as 11578.

  1. It already loads all .spec files found on the path, but this approach is neater and more consistent with the way extensions are published.
  2. Please make sure it picks up .spec files for Contribs as well as Plugins (all non-plugin extensions are classed as contribs)
  3. To add a section, you need to put this at the top of your .spec:
# ---+ Section Name
I will check in an example (MailInContrib)


Your update has the same problem than the one I tried earlier: the config file in the contrib directories is not interpreted correctly:
  • The format string line seems to be ignored. In my experiment with JSCalendarContrib I used a different size prompt box, but both come up with the default value.
  • The values in the Config.spec file is ignored, and the empty value is assumed.

However, the Config.spec file is read enough to pick up that there are two items to configure. -- TW

I also have a question... Why are you scanning the INC path when looking for contrib and plugins. Certainly they are only on lib/Twiki/*! Why look in all the other places? -- TW

Confirming that both Contrib and Plugins load now... --TW

Still not sure whether we really should search all of @INC but I guess it is no big deal one way or the other -- TW

I explained in mail why @INC is searched; it is because .spec files live in the code tree, and the code tree is whatever is under @INC.

Anyway, I think this is done now, so marking ready for release.


4.1.0 released


Summary Allow Plugin config variables to be set in bin/configure
ReportedBy TWiki:Main.ThomasWeigert
Codebase ~twiki4
SVN Range TWiki-4.1, Sat, 23 Sep 2006, build 11571
AppliesTo Engine

Priority Enhancement
CurrentState Closed

Checkins 11578 11581 11582 11583 11596 11597
TargetRelease minor
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r16 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback