Changeset 1061


Ignore:
Timestamp:
11/29/08 12:42:26 (3 years ago)
Author:
CrawfordCurrie
Message:

Item175: tidy build in CommentPlugin; remove the poinless tie in compat plugin; tweak location of config options for publish and mailer extensions

Location:
trunk
Files:
7 edited

Legend:

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

    r1022 r1061  
    215215 
    216216---++ Settings 
    217 <!-- required for compatibility 
    218                 * Set SHORTDESCRIPTION = Allows users to quickly post comments to a page without an edit/preview/save cycle. 
    219         * Name of file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from %SYSTEMWEB%.CommentPluginTemplate 
    220                 * Set TEMPLATES = comments 
    221         * Default template type (if not present, defaults to "below") 
    222                 * Set DEFAULT_TYPE = above 
     217<!-- Not used by the plugin 
     218        * Set SHORTDESCRIPTION = Quickly post comments to a page without an edit/preview/save cycle. 
    223219--> 
    224220Two [[%SYSTEMWEB%.PreferenceSettings][preference settings]] are recognised by the CommentPlugin: 
  • trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm

    r1050 r1061  
    1212use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION $NO_PREFS_IN_TOPIC ); 
    1313 
    14 # This should always be $Rev: 15788 $ so that TWiki can determine the checked-in 
    15 # status of the plugin. It is used by the build automation tools, so 
    16 # you should leave it alone. 
    17 $VERSION = '$Rev: 15788 $'; 
    18  
    19 # This is a free-form string you can use to "name" your own plugin version. 
    20 # It is *not* used by the build automation tools, but is reported as part 
    21 # of the version number in PLUGINDESCRIPTIONS. 
    22 $RELEASE = '03 Aug 2008'; 
    23  
    24 $SHORTDESCRIPTION = 'Allows users to quickly post comments to a page without an edit/preview/save cycle'; 
     14our $VERSION = '$Rev: 15788 $'; 
     15our $RELEASE = 'Foswiki-1.0.0'; 
     16our $SHORTDESCRIPTION = 'Quickly post comments to a page without an edit/preview/save cycle'; 
     17our $NO_PREFS_IN_TOPIC = 1; 
    2518 
    2619sub initPlugin { 
    2720    #my ( $topic, $web, $user, $installWeb ) = @_; 
    28  
    29     if( $Foswiki::Plugins::VERSION < 1.026 ) { 
    30         Foswiki::Func::writeWarning( "CommentPlugin $VERSION requires Foswiki::Plugins::VERSION >= 1.026, $Foswiki::Plugins::VERSION found." ); 
    31         return 0; 
    32     } 
    33  
    3421    return 1; 
    3522} 
  • trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/Comment.pm

    r1050 r1061  
    5656    #my ( $previewing, $text, $web, $topic ) = @_; 
    5757 
    58     my $defaultType = Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') || 'above'; 
     58    my $defaultType = 
     59      Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') 
     60          || 'above'; 
    5961 
    6062    my $message = ''; 
     
    214216    my $templateFile = $templatetopic 
    215217        || Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_TEMPLATES') 
    216         || 'comments'; 
     218          || 'comments'; 
    217219 
    218220    my $templates = 
     
    249251    my $type = $query->param( 'comment_type' ) || 
    250252      Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') || 
    251           'below'; 
     253          'above'; 
    252254    my $index = $query->param( 'comment_index' ) || 0; 
    253255    my $anchor = $query->param( 'comment_anchor' ); 
  • trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/build.pl

    r811 r1061  
    11#!/usr/bin/perl -w 
    22# 
    3 package CommentPluginBuild; 
    4  
    53BEGIN { 
    6     foreach my $pc (split(/:/, $ENV{TWIKI_LIBS})) { 
     4    foreach my $pc (split(/:/, $ENV{FOSWIKI_LIBS})) { 
    75        unshift @INC, $pc; 
    86    } 
     
    108use Foswiki::Contrib::Build; 
    119 
    12 @CommentPluginBuild::ISA = ( "Foswiki::Contrib::Build" ); 
    13  
    14 sub new { 
    15     my $class = shift; 
    16     return bless( $class->SUPER::new( "CommentPlugin" ), $class ); 
    17 } 
    18  
    19 $build = new CommentPluginBuild(); 
     10my $build = new Foswiki::Contrib::Build("CommentPlugin"); 
    2011$build->build($build->{target}); 
  • trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Config.spec

    r811 r1061  
    1 # ---+ Mailer Contrib 
    2 # Settings for the mailer that sends out topic change notifications. 
     1# ---+ Mail and Proxies 
    32# **REGEX** 
    43# Define the regular expression that an email address entered in WebNotify 
  • trunk/PublishPlugin/lib/Foswiki/Plugins/PublishPlugin/Config.spec

    r1009 r1061  
    1 #---+ Publish Plugin 
     1#---+ Extensions 
     2#---++ Publish Plugin 
    23# **PATH** 
    34# File path to the directory where published files will be generated. 
  • trunk/TWikiCompatibilityPlugin/lib/TWiki/Plugins.pm

    r837 r1061  
    11package TWiki::Plugins; 
    2  
    3 use TWiki; 
    42 
    53use Foswiki::Plugins; 
    64 
    7 # Compatible version of TWiki::Plugins 
     5# Compatible version of TWiki::Plugins. Note that this has to be versioned 
     6# separately from $Foswiki::Plugins::VERSION. 
    87our $VERSION = 1.2; 
    98 
    10 # Access to $TWiki::Plugins::SESSION is via a tie to $Foswiki::Plugins::SESSION 
    11 { 
    12     package TWiki::Plugins::SESSION_TIE; 
    13     use base 'Tie::Scalar'; 
    14  
    15     sub TIESCALAR { return bless({}, shift) } 
    16     sub FETCH { return $Foswiki::Plugins::SESSION; } 
    17     sub STORE { } # no way, Jose! 
    18 }; 
    19  
    20 tie($SESSION, 'TWiki::Plugins::SESSION_TIE'); 
     9*TWiki::Plugins::SESSION =\*Foswiki::Plugins::SESSION; 
    2110 
    22111; 
Note: See TracChangeset for help on using the changeset viewer.