[Scummvm-cvs-logs] CVS: web index.php,1.38,1.39

Max Horn fingolfin at users.sourceforge.net
Mon Dec 19 14:03:37 CET 2005


Update of /cvsroot/scummvm/web
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32142

Modified Files:
	index.php 
Log Message:
Parse the <DATE> field of news items using strtotime; use this to present news item dates in a uniform style, and to make it possible to link to specific news items

Index: index.php
===================================================================
RCS file: /cvsroot/scummvm/web/index.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- index.php	26 Nov 2005 19:52:45 -0000	1.38
+++ index.php	19 Dec 2005 22:02:07 -0000	1.39
@@ -231,7 +231,7 @@
 
     $news_date = "";
     if (eregi("<DATE>(.*)</DATE>", $data, $out)) {
-      $news_date = $out[1];
+      $news_date = strtotime($out[1]);
     }
 
     $news_author = "";
@@ -259,7 +259,7 @@
 
   echo '<div class="par-item">'.
 	 '<div class="par-head">'.
-	   '<span class="newsdate">'.$news_date."</span>: ".
+	   '<a name="' . date("Y-m-d", $news_date) . '"></a><span class="newsdate">' . date("M. jS, Y", $news_date) . "</span>: ".
            $news_title.
 	 '</div>'.
          '<div class="par-content">'.





More information about the Scummvm-git-logs mailing list