[Jifty-commit] r6289 - in jifty/trunk: lib/Jifty/Plugin lib/Jifty/Plugin/NewsFeed

Jifty commits jifty-commit at lists.jifty.org
Tue Feb 3 08:11:30 EST 2009


Author: c9s
Date: Tue Feb  3 08:11:30 2009
New Revision: 6289

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/NewsFeed.pm
   jifty/trunk/lib/Jifty/Plugin/NewsFeed/View.pm

Log:
 r7073 at Oulixeus:  c9s | 2009-02-03 19:23:04 +0800
  - fix newsfeed pod


Modified: jifty/trunk/lib/Jifty/Plugin/NewsFeed.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/NewsFeed.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/NewsFeed.pm	Tue Feb  3 08:11:30 2009
@@ -17,7 +17,7 @@
 
 =head1 DESCRIPTION
 
-Provides a way to include site news feeds in your Jifty app
+Provides templates to include site news feeds in your Jifty app. See L<Jifty::Plugin::NewsFeed::View>
 
 =cut
 

Modified: jifty/trunk/lib/Jifty/Plugin/NewsFeed/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/NewsFeed/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/NewsFeed/View.pm	Tue Feb  3 08:11:30 2009
@@ -6,19 +6,14 @@
 
 =head1 NAME
 
-Jifty::Plugin::SiteNews::View - /newsfeed pages for your app
+Jifty::Plugin::NewsFeed::View - template for feed
 
 =head1 DESCRIPTION
 
-The tempaltes for L<Jifty::Plugin::NewsFeed>
+The templates for L<Jifty::Plugin::NewsFeed>
 
 =cut
 
-template 'feedpage' => page { title => "Feed" } 
-content {
-    h1 { "I am NEWS FEED PLUGIN!" } ;
-};
-
 =head1 Templates
 
 =head2 display_feed feed_url , {  title => TITLE , before => BEFORE , cache_ttl => TTL  , ... } 
@@ -81,8 +76,9 @@
 
     my $feed_title = decode_utf8 ( $feed->title );
 
-    # filter
     my @entries = $feed->entries;
+
+    # filter entry
     if( defined $options->{before} ) {
         my $before = $options->{before};
         my ( $num , $slice ) = ( $before =~ m/^(\d+)\s*(\w+)$/ );
@@ -93,8 +89,8 @@
         } 
     }
 
-    splice @entries,0,scalar @entries
-            if( defined $options->{max} );
+    splice @entries,0,$options->{max_items}
+            if( defined $options->{max_items} );
 
     @entries = reverse @entries 
             if( defined $options->{order} and $options->{order} eq 'ASC' );


More information about the Jifty-commit mailing list