Changeset 1369

Show
Ignore:
Timestamp:
08/18/06 00:54:13
Author:
miyagawa
Message:

Filter::Thumbnail: Added set_per_entry config which defaults to 0. Added unit test and fixed bug (YAY)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/Thumbnail.pm

    r1367 r1369  
    88        $self, 
    99        'update.feed.fixup'  => \&feed, 
    10         'update.entry.fixup' => \&entry, 
    1110    ); 
     11 
     12    if ($self->conf->{set_per_entry}) { 
     13        $context->register_hook( 
     14            $self, 
     15            'update.entry.fixup' => \&entry, 
     16        ); 
     17    } 
    1218} 
    1319 
     
    2935 
    3036    $context->log(info => "Add thumbnail as image to " . $args->{entry}->permalink); 
    31     $args->{feed}->image( $self->build_image($args->{entry}->title, $args->{entry}->permalink) ); 
     37    $args->{entry}->icon( $self->build_image($args->{entry}->title, $args->{entry}->permalink) ); 
    3238} 
    3339 
     
    6672(free) serviced out there. 
    6773 
     74=head1 CONFIG 
     75 
     76=over 4 
     77 
     78=item set_per_entry 
     79 
     80With I<set_per_entry> set, it adds each entry thumbnail as entry's 
     81icon, in addition to the feed logo. Optional and defaults to 0. 
     82 
     83=back 
     84 
    6885=head1 AUTHOR 
    6986