Ignore:
Timestamp:
11/08/08 18:07:57 (4 years ago)
Author:
KennethLavrsen
Message:

Item109: Rename TWikiAddOns to ContributedAddOns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/data/TWiki/TWikiPlugins.txt

    r14 r470  
    1 %META:TOPICINFO{author="TWikiContributor" date="1208648630" format="1.1" version="$Rev: 16166 $"}% 
     1%META:TOPICINFO{author="TWikiContributor" date="1208648630" format="1.1" version="$Rev: 16704 $"}% 
    22%STARTINCLUDE% 
    33---+ TWiki Plugins 
     
    2626   * TWiki:Plugins.PluginPackageHowTo - template to create a new plugin package 
    2727 
    28 __See other types of extensions:__ TWikiAddOns, TWikiContribs, TWikiSkins 
     28__See other types of extensions:__ ContributedAddOns, TWikiContribs, TWikiSkins 
    2929 
    3030#InstallPlugin 
     
    290290 
    291291---+++ Structure of a <code>Config.spec</code> file 
    292 The =Config.spec= file for an extension starts with the extension announcing what it is: 
     292The =Config.spec= file for a plugin starts with the plugin announcing what it is: 
    293293<verbatim> 
    294294# ---+ BathPlugin 
     
    304304# **NUMBER** 
    305305# Enter the chain length in cm 
    306 $TWiki::cfg{BathPlugin}{ChainLength} = 30; 
     306$TWiki::cfg{BathPlugin}{ChainLength} = '30'; 
    307307 
    308308# **BOOLEAN EXPERT** 
    309 # Set this option to 0 to disable the water temperature alarm 
    310 $TWiki::cfg{BathPlugin}{TempSensorEnabled} = 1; 
     309# Turn this option off to disable the water temperature alarm 
     310$TWiki::cfg{BathPlugin}{TempSensorEnabled} = '1'; 
    311311</verbatim> 
    312 The type (e.g. =**SELECT**= ) tells =configure= to how to prompt for the value. It also tells =configure= how to do some basic checking on the value you actually enter. All the comments between the type and the configuration item are taken as part of the description. The configuration item itself defines the default value for the configuration item. The above spec defines the configuration items =$TWiki::cfg{BathPlugin}{PlugType}=, =$TWiki::cfg{BathPlugin}{ChainLength}=, and =$TWiki::cfg{BathPlugin}{TempSensorEnabled}= for use in your plugin. For example, 
     312The type (e.g. =**SELECT**= ) tells =configure= to how to prompt for the value. It also tells configure how to do some basic checking on the value you actually enter. All the comments between the type and the configuration item are taken as part of the description. The configuration item itself defines the default value for the configuration item. The above spec defines the configuration items =$TWiki::cfg{BathPlugin}{PlugType}=, =$TWiki::cfg{BathPlugin}{ChainLength}=, and =$TWiki::cfg{BathPlugin}{TempSensorEnabled}= for use in your plugin. For example, 
    313313<verbatim> 
    314314if( $TWiki::cfg{BathPlugin}{TempSensorEnabled} && $curTemperature > 50 ) { 
     
    317317</verbatim> 
    318318 
    319 The config.spec file is read by =configure=, which then writes =LocalSite.cfg= with the values chosen by the local site admin. 
     319The config.spec file is read by configure, and =configure= then writes =LocalSite.cfg= with the values chosen by the local site admin. 
    320320 
    321321A range of types are available for use in =Config.spec= files: 
     
    343343See =lib/TWiki.spec= for many more examples. 
    344344 
    345 =Config.spec= files for non-plugin extensions are stored under the =Contrib= directory instead of the =Plugins= directory. 
    346  
    347 Note that from TWiki 5.0 onwards, CGI scripts (in the TWiki =bin= directory) provided by extensions must also have an entry in the =Config.spec= file. This entry looks like this (example taken from Publish<nop>Contrib) 
    348  
    349 <verbatim> 
    350 # **PERL H** 
    351 # Bin script registration - do not modify 
    352 $TWiki::cfg{SwitchBoard}{publish} = [ "TWiki::Contrib::Publish", "publish", { publishing => 1 } ]; 
    353 </verbatim> 
    354 =PERL= specifies a perl data structure, and =H= a hidden setting (it won't appear in =configure=). The first field of the data value specifies the class where the function that implements the script can be found. The second field specifies the name of the function, which must be the same as the name of the script. The third parameter is a hash of initial context settings for the script. 
     345=Config.spec= files are also used for other (non-plugin) extensions. in this case they are stored under the =Contrib= directory instead of the =Plugins= directory. 
    355346 
    356347TWiki:TWiki/SpecifyingConfigurationItemsForExtensions has supplemental documentation on configure settings. 
     
    400391__Related Topics:__ DeveloperDocumentationCategory, AdminDocumentationCategory, TWiki:TWiki.TWikiPluginsSupplement 
    401392 
    402 -- __Contributors:__ TWiki:Main.PeterThoeny, TWiki:Main.AndreaSterbini, TWiki:Main.MikeMannix, TWiki:Main.CrawfordCurrie, TWiki:Main.ArthurClemens, TWiki:Main.WillNorris 
    403  
Note: See TracChangeset for help on using the changeset viewer.