Changeset 928 for trunk/FluidApp

Show
Ignore:
Timestamp:
08/03/08 05:25:03 (20 months ago)
Author:
breese
Message:

made fluid work system wide, probably need to add a preference to have it report only about specific blogs

Location:
trunk/FluidApp
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/FluidApp/mt-static/plugins/FluidApp/fluid.js

    r926 r928  
    11(function () { 
    2   var DEBUG = 1; 
     2  var DEBUG = 0; 
    33  if (typeof fluid == 'undefined') return; 
    44 
     
    3434      'arguments': { 
    3535        '__mode' : 'fluid_update', 
    36         'blog_id' : 3, 
    3736        'since' : (lastQuery == undefined ? '' : lastQuery) 
    3837      } 
  • trunk/FluidApp/plugins/FluidApp/lib/FluidApp/Plugin.pm

    r926 r928  
    1818    my $app = shift; 
    1919    my $q = $app->{query}; 
    20     my $blog = $app->blog; 
    2120    require MT::Comment; 
    2221    my $now = time; 
     
    2423    my @growls; 
    2524    if ($q->param('since') && $q->param('since') ne '') { 
    26         my @comments = MT::Comment->load({ created_on => { ">=" => $q->param('since') }, junk_status => 1, blog_id => $blog->id, }, 
     25        my @comments = MT::Comment->load({ created_on => { ">=" => $q->param('since') }, junk_status => 1, }, 
    2726                                         { limit => 10, sort => "created_on" }); 
    2827        foreach my $c (@comments) { 
    2928            if ($c->visible) { 
    30                 push @growls, { title => "New Comment", description => sprintf("%s posted a comment",$c->author) }; 
     29                push @growls, { title => sprintf("New Comment"),  
     30                                description => sprintf("%s posted a comment on %s",$c->author,$c->blog->name),  
     31                                blog_id => $c->blog->id }; 
    3132            } else { 
    32                 push @growls, { title => "New Comment", description => sprintf("A comment from %s is being held for moderation",$c->author) }; 
     33                push @growls, { title => sprintf("New Comment on %s",$c->blog->name),  
     34                                description => sprintf("A comment from %s is being held for moderation on %s",$c->author,$c->blog->name), 
     35                                blog_id => $c->blog->id }; 
    3336            } 
    3437        } 
    3538    } 
    36     my $count = MT::Comment->count({ visible => 0, junk_status => 1, blog_id => $blog->id, }); 
     39    my $count = MT::Comment->count({ visible => 0, junk_status => 1, }); 
    3740    return $app->json_result({  
    3841        label => 'Comments in moderation',