Ignore:
Timestamp:
01/22/12 15:23:10 (4 months ago)
Author:
GeorgeClark
Message:

Item9551: More updates to ImmediateNotify

Pulled the Twitter and IRC code from TweetOnSavePlugin and IrcPlugin.
Not functional here yet, need converting. Changed the templates to real
templates, so they can be more easily overridden using Topic templates.

Added a beforeSaveHandler and a NewTopic context - so the messages can
more easily show created vs updated topics.

Eliminated the MIME multipart headers from the email template, since a
single part message using multipart headers causes issues in Outlook.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ImmediateNotifyPlugin/lib/Foswiki/Plugins/ImmediateNotifyPlugin.pm

    r13772 r13777  
    8181        next if ( $method eq "Module" ); 
    8282        next if ( $method eq "Enabled" ); 
     83        next if ( $method eq "Bitly" ); 
    8384        if ( $Foswiki::cfg{Plugins}{ImmediateNotifyPlugin}{$method}{Enabled} ) { 
    8485            debug("Allowing method $method"); 
     
    215216                my ( $method, $parms ) = 
    216217                  $methodString =~ m/^(.*?)(?:\((.*?)\))?$/; 
     218                  $parms |= ''; 
    217219                debug( 
    218220"- ImmediateNotifyPlugin: processName: User $name found method ($method) parms ($parms) " 
     
    236238} 
    237239 
     240 
     241=begin TML 
     242 
     243---+ beforeSaveHandler 
     244 
     245Set a flag if this is a new topic. 
     246 
     247=cut 
     248 
     249sub beforeSaveHandler { 
     250    my ( $text, $topic, $web, $meta ) = @_; 
     251 
     252    unless ( Foswiki::Func::topicExists($web, $topic) ) { 
     253      Foswiki::Func::getContext()->{'NewTopic'} = 1; 
     254    } 
     255} 
     256 
    238257=begin TML 
    239258 
Note: See TracChangeset for help on using the changeset viewer.