[Slashdotjp-dev 1568] [1099] add "content:encoded" for type="rss"

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 2日 (木) 18:49:01 JST


Revision: 1099
          http://svn.sourceforge.jp/view?root=slashdotjp&view=rev&rev=1099
Author:   tach
Date:     2009-04-02 18:49:01 +0900 (Thu, 02 Apr 2009)

Log Message:
-----------
add "content:encoded" for type="rss"

Modified Paths:
--------------
    slashjp/trunk/themes/slashcode/tasks/open_backend.pl


-------------- next part --------------
Modified: slashjp/trunk/themes/slashcode/tasks/open_backend.pl
===================================================================
--- slashjp/trunk/themes/slashcode/tasks/open_backend.pl	2009-04-02 09:09:32 UTC (rev 1098)
+++ slashjp/trunk/themes/slashcode/tasks/open_backend.pl	2009-04-02 09:49:01 UTC (rev 1099)
@@ -110,6 +110,15 @@
 		};
 	}
 
+	# for slashdot.jp (tach, 2009-04-02)
+	if ($type eq 'rss') {
+		@items = ();
+		foreach my $story (@$stories) {
+			my $encoded = $story->{introtext} . getData('rss_item_suffix', { story => $story }, 'article');
+			push @items, { story => $story, 'content:encoded' => $encoded };
+		}
+	}
+
 	my $rss = xmlDisplay($type, {
 		channel		=> {
 			title		=> $title,



Slashdotjp-dev メーリングリストの案内
Back to archive index