Changeset 3449


Ignore:
Timestamp:
04/15/09 16:59:44 (3 years ago)
Author:
CrawfordCurrie
Message:

Item1383: make plugin get its preferences from global preferences, instead of from the plugin topic

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SpreadSheetPlugin/data/System/SpreadSheetPlugin.txt

    r3448 r3449  
    740740 
    741741<!-- 
    742    * Set SHORTDESCRIPTION = Add spreadsheet calculation like ="$SUM( $ABOVE() )"= to Foswiki tables and other topic text 
     742   * Set SHORTDESCRIPTION = Add spreadsheet calculations like ="$SUM( $ABOVE() )"= to Foswiki tables and other topic text 
    743743--> 
    744744| *Preference* | *Meaning* | *Default* | 
  • trunk/SpreadSheetPlugin/lib/Foswiki/Plugins/SpreadSheetPlugin.pm

    r3448 r3449  
    3434our $RELEASE = '29 Mar 2009'; 
    3535our $NO_PREFS_IN_TOPIC = 1; 
     36our $SHORTDESCRIPTION = 'Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text'; 
    3637 
    3738$doInit = 0; 
  • trunk/TwistyPlugin/data/System/TwistyPlugin.txt

    r3416 r3449  
    569569---++ Plugin Settings 
    570570 
    571 Plugin settings are stored as [[%SYSTEMWEB%.PreferenceSettings][preference settings]]. To reference 
    572 a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>TWISTYPLUGIN_SHORTDESCRIPTION%== 
    573  
    574    * Set TWISTYSHOWLINK = %MAKETEXT{"More..."}% 
    575       * For example: =More...= 
    576    * Set TWISTYHIDELINK = %MAKETEXT{"Close"}% 
    577       * For example: =Close= 
    578    * Set TWISTYMODE =  
    579       * Either =div= or =span=; =span= if nothing set 
    580    * Set TWISTYREMEMBER =  
    581       * Either =on= or =off=; default is not specified. If set to =on= all Twisty states will be stored in a FOSWIKIPREF cookie; if set to =off= the FOSWIKIPREF cookie will be cleared 
    582  
     571You can override some default settings in the plugin by setting the following [[%SYSTEMWEB%.PreferenceSettings][preferences]]. 
     572| *Preference* | *Meaning* | *Default* | 
     573| =TWISTYSHOWLINK= | For example: =More...= | %MAKETEXT{"More..."}% | 
     574| =TWISTYHIDELINK= | For example: =Close= | %MAKETEXT{"Close"}% | 
     575| =TWISTYMODE= | Either =div= or =span= | =span= | 
     576| =TWISTYREMEMBER= | Either =on= or =off=. If set to =on= all Twisty states will be stored in a FOSWIKIPREF cookie; if set to =off= the FOSWIKIPREF cookie will be cleared | not specified | 
     577 
     578<!-- 
    583579   * Set SHORTDESCRIPTION = Twisty section !JavaScript library to open/close content dynamically 
    584    * Set DEBUG = 0 
     580--> 
    585581    
    586582---++ Plugin Installation Instructions 
    587    * Download the ZIP file from the Plugin web (see below) 
    588    * Unzip it in your Foswiki installation directory. Content:  
    589      | *File:* | *Description:* | 
    590 %$MANIFEST% 
    591  
    592    * Optionally, if it exists, run ==%TOPIC%_installer== to automatically check and install other Foswiki modules that this module depends on. You can also do this step manually. 
    593    * Alternatively, manually make sure the dependencies listed in the table below are resolved. 
    594 %$DEPENDECIES% 
    595    * Visit =configure= in your Foswiki installation, and enable the plugin in the {Plugins} section. 
    596  
     583%$INSTALL_INSTRUCTIONS% 
    597584 
    598585---++ Plugin Info 
  • trunk/TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm

    r3204 r3449  
    2525package Foswiki::Plugins::TwistyPlugin; 
    2626 
    27 use Foswiki::Func; 
    28 use CGI::Cookie; 
     27use Foswiki::Func (); 
     28use CGI::Cookie (); 
    2929use strict; 
    3030 
    3131use vars 
    32   qw( $VERSION $RELEASE $pluginName @modes $doneHeader $doneDefaults $twistyCount 
     32  qw( @modes $doneHeader $doneDefaults $twistyCount 
    3333  $prefMode $prefShowLink $prefHideLink $prefRemember); 
    3434 
    35 # This should always be $Rev$ so that Foswiki can determine the checked-in 
    36 # status of the plugin. It is used by the build automation tools, so 
    37 # you should leave it alone. 
    38 $VERSION = '$Rev$'; 
    39  
    40 # This is a free-form string you can use to "name" your own plugin version. 
    41 # It is *not* used by the build automation tools, but is reported as part 
    42 # of the version number in PLUGINDESCRIPTIONS. 
    43 $RELEASE = '1.5.2'; 
    44  
    45 $pluginName = 'TwistyPlugin'; 
     35our $VERSION = '$Rev$'; 
     36 
     37our $RELEASE = '1.5.2'; 
     38our $SHORTDESCRIPTION = 'Twisty section Javascript library to open/close content dynamically'; 
     39our $NO_PREFS_IN_TOPIC = 1; 
     40 
     41our $pluginName = 'TwistyPlugin'; 
    4642 
    4743my $TWISTYPLUGIN_COOKIE_PREFIX  = "TwistyPlugin_"; 
     
    8682         Foswiki::Func::getPreferencesValue('TWISTYSHOWLINK') 
    8783      || Foswiki::Func::getPluginPreferencesValue('TWISTYSHOWLINK') 
    88       || ''; 
     84      || '%MAKETEXT{"More..."}%'; 
    8985    $prefHideLink = 
    9086         Foswiki::Func::getPreferencesValue('TWISTYHIDELINK') 
    9187      || Foswiki::Func::getPluginPreferencesValue('TWISTYHIDELINK') 
    92       || ''; 
     88      || '%MAKETEXT{"Close"}%'; 
    9389    $prefRemember = 
    9490         Foswiki::Func::getPreferencesValue('TWISTYREMEMBER') 
Note: See TracChangeset for help on using the changeset viewer.