[Slashdotjp-dev 1542] [1073] * Add HTML "<meta name=description>" into sevaral pages

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 3月 16日 (月) 16:39:30 JST


Revision: 1073
          http://svn.sourceforge.jp/view?root=slashdotjp&view=rev&rev=1073
Author:   tach
Date:     2009-03-16 16:39:30 +0900 (Mon, 16 Mar 2009)

Log Message:
-----------
 * Add HTML "<meta name=description>" into sevaral pages
   - article.pl: already inserted, change content to introtext

Modified Paths:
--------------
    slashjp/trunk/debian/changelog
    slashjp/trunk/themes/slashcode/htdocs/article.pl


-------------- next part --------------
Modified: slashjp/trunk/debian/changelog
===================================================================
--- slashjp/trunk/debian/changelog	2009-03-16 04:28:59 UTC (rev 1072)
+++ slashjp/trunk/debian/changelog	2009-03-16 07:39:30 UTC (rev 1073)
@@ -1,9 +1,11 @@
 slash (2.5.0.233-8) unstable; urgency=low
 
-  * NOT RELEASED YET
+  * Add HTML "<meta name=description>" into sevaral pages
+    - article.pl: already inserted, change content to introtext
 
- -- Taku YASUI <tach****@osdn*****>  Mon, 16 Mar 2009 04:28:28 +0000
 
+ -- Taku YASUI <tach****@osdn*****>  Mon, 16 Mar 2009 07:36:54 +0000
+
 slash (2.5.0.233-7) unstable; urgency=low
 
   * Fix slow query on getStoryByTime()

Modified: slashjp/trunk/themes/slashcode/htdocs/article.pl
===================================================================
--- slashjp/trunk/themes/slashcode/htdocs/article.pl	2009-03-16 04:28:59 UTC (rev 1072)
+++ slashjp/trunk/themes/slashcode/htdocs/article.pl	2009-03-16 07:39:30 UTC (rev 1073)
@@ -147,7 +147,9 @@
 			my $last = pop @topic_desc;
 			$a = join(', ', @topic_desc) . ", and $last";
 		}
-		my $meta_desc = "$story->{title} -- article related to $a.";
+		my $meta_desc = strip_nohtml($story->{introtext});
+		$meta_desc =~ s/[\r\n]//g;
+		$meta_desc = shorten($meta_desc, 250);
 
 		header($links, $story->{section}, {
 			story_title	=> $story->{title},



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