[Slashdotjp-dev 1097] [624] * Change RSS item description suffix

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 5月 1日 (木) 18:34:31 JST


Revision: 624
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=624
Author:   tach
Date:     2008-05-01 18:34:31 +0900 (Thu, 01 May 2008)

Log Message:
-----------
 * Change RSS item description suffix
   - use template "rss_item_description;misc;default" to change description

Modified Paths:
--------------
    slashjp/branches/2.5.0.192/Slash/XML/RSS/RSS.pm
    slashjp/branches/2.5.0.192/debian/changelog

Added Paths:
-----------
    slashjp/branches/2.5.0.192/themes/slashcode/templates/rss_item_description;misc;default


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/Slash/XML/RSS/RSS.pm
===================================================================
--- slashjp/branches/2.5.0.192/Slash/XML/RSS/RSS.pm	2008-05-01 08:48:57 UTC (rev 623)
+++ slashjp/branches/2.5.0.192/Slash/XML/RSS/RSS.pm	2008-05-01 09:34:31 UTC (rev 624)
@@ -28,6 +28,7 @@
 use strict;
 use Slash;
 use Slash::Utility;
+use Slash::Display;
 use XML::RSS;
 use base 'Slash::XML';
 use vars qw($VERSION);
@@ -453,8 +454,11 @@
 	if ($version >= 1.0) {
 		my $desc = $self->rss_item_description($item->{description} || $story->{introtext});
 		if ($desc) {
-			$encoded_item->{description} = $desc;
-			$encoded_item->{description} .= "<p><a href=\"$action\">Read more of this story</a> at $constants->{sitename}.</p>" if $action;
+			$encoded_item->{description} = slashDisplay("rss_item_description", {
+				desc		=> $desc,
+				more		=> $story->{bodytext},
+				link		=> $action,
+			}, { Return => 1, Nocomm => 1 });
 			# add poll if any
 			$encoded_item->{description} .= pollbooth($story->{qid},1, 0, 1) if $story->{qid};
 		}

Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-05-01 08:48:57 UTC (rev 623)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-05-01 09:34:31 UTC (rev 624)
@@ -1,3 +1,10 @@
+slash (2.5.0.192-11) unstable; urgency=low
+
+  * Change RSS item description suffix
+    - use template "rss_item_description;misc;default" to change description
+
+ -- Taku YASUI <tach****@osdn*****>  Thu,  1 May 2008 09:33:34 +0000
+
 slash (2.5.0.192-10) unstable; urgency=low
 
   * Fix to take discussion id from journal-submission

Added: slashjp/branches/2.5.0.192/themes/slashcode/templates/rss_item_description;misc;default
===================================================================
--- slashjp/branches/2.5.0.192/themes/slashcode/templates/rss_item_description;misc;default	                        (rev 0)
+++ slashjp/branches/2.5.0.192/themes/slashcode/templates/rss_item_description;misc;default	2008-05-01 09:34:31 UTC (rev 624)
@@ -0,0 +1,29 @@
+__skin__
+default
+__description__
+これがそのまま description に入り、XML::RSS モジュールに渡される
+
+ * desc - description 本文
+ * more - 本文に続きがあるときにはその続き
+ * link - URL
+ * comment_link - コメントを書くときの URL
+__title__
+RSS アイテムの description
+__page__
+misc
+__lang__
+en_US
+__name__
+rss_item_description
+__template__
+[% desc %][% IF link %]
+<p>
+<a href="[% link %]">[% IF more && more.length > 0; "続きの" _ more.length _ "バイトを読む..."; ELSE; "続きを読む..."; END %]</a>
+[% IF comment_link %] | <a href="[% comment_link %]">コメントする</a>[% END %]
+</p>[% END %]
+
+
+__seclev__
+10000
+__version__
+


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