- Timestamp:
- 04/15/09 17:38:37 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/RenderListPlugin/lib/Foswiki/Plugins/RenderListPlugin.pm
r1408 r3450 23 23 # ========================= 24 24 use vars qw( 25 $web $topic $user $installWeb $VERSION $RELEASE $pluginName26 $ debug $pubUrl $attachUrl25 $web $topic $user $installWeb 26 $pubUrl $attachUrl 27 27 ); 28 28 29 $VERSION = '$Rev: 16234 $'; 30 $RELEASE = '2.1'; 31 $pluginName = 'RenderListPlugin'; # Name of this Plugin 29 our $VERSION = '$Rev: 16234 $'; 30 our $RELEASE = '2.1'; 31 our $pluginName = 'RenderListPlugin'; # Name of this Plugin 32 our $NO_PREFS_IN_TOPIC = 1; 33 our $SHORTDESCRIPTION = 'Render bullet lists in a variety of formats'; 34 35 our %defaultThemes = ( 36 THREAD => 'tree, 1', 37 HOME => 'icon, 1, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif', 38 ORG => 'icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif', 39 GROUP => 'icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/group.gif', 40 EMAIL => 'icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/email.gif', 41 TREND => 'icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/trend.gif', 42 FILE => 'icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/file.gif', 43 ); 32 44 33 45 # ========================= … … 42 54 } 43 55 44 # Get plugin debug flag45 $debug = Foswiki::Func::getPreferencesFlag( "\U$pluginName\E_DEBUG" );46 47 56 # one time initialization 48 57 $pubUrl = Foswiki::Func::getUrlHost() . Foswiki::Func::getPubUrlPath(); … … 50 59 51 60 # Plugin correctly initialized 52 Foswiki::Func::writeDebug( "- Foswiki::Plugins::${pluginName}::initPlugin( $web.$topic ) is OK" ) if $debug;53 61 return 1; 54 62 } … … 58 66 { 59 67 ### my ( $text, $web ) = @_; # do not uncomment, use $_[0], $_[1] instead 60 61 Foswiki::Func::writeDebug( "- ${pluginName}::startRenderingHandler( $_[1] )" ) if $debug;62 68 63 69 # This handler is called by getRenderedVersion just before the line loop … … 86 92 my $theme = &Foswiki::Func::extractNameValuePair( $theAttr, "theme" ) || 87 93 &Foswiki::Func::extractNameValuePair( $theAttr ); 88 $theme = "RENDERLISTPLUGIN_" . uc( $theme ) . "_THEME"; 89 $theme = &Foswiki::Func::getPreferencesValue( $theme ) || "unrecognized theme type"; 94 $theme = uc($theme || ''); 95 if (defined $defaultThemes{$theme}) { 96 $theme = $defaultThemes{$theme}; 97 } else { 98 $theme = "RENDERLISTPLUGIN_${theme}_THEME"; 99 $theme = &Foswiki::Func::getPreferencesValue( $theme ) 100 || "unrecognized theme type"; 101 } 90 102 my ( $type, $params ) = split( /, */, $theme, 2 ); 91 103 $type = lc( $type );
Note: See TracChangeset
for help on using the changeset viewer.
