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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.