Enlightenment CVS committal

Author  : raster
Project : web
Module  : www

Dir     : web/www/p/news


Modified Files:
        en-body 
Added Files:
        class.news.php fr-body fr-title www-news.patch 


Log Message:


add rookmoot's news stuff

===================================================================
RCS file: /cvs/e/web/www/p/news/en-body,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- en-body     22 Apr 2007 04:21:16 -0000      1.3
+++ en-body     27 May 2007 12:54:51 -0000      1.4
@@ -1,9 +1,28 @@
 <h1>News</h1>
-<p>
-Now web.enlightenment.org should auto-update within 1 minute of any CVS commit
-to the www module. I am making this change here to test to see if that actually
-works now.
-</p><p>
-*FIXME* - this needs to become site php to show all items from the news
-repository with the most recent 10 here and older ones linked to.
-</p>
+
+<?php
+require_once 'class.news.php';
+
+setlocale(LC_ALL, 'en_EN');
+
+$news = new news;
+$list = $news->get(10);
+foreach($list as $new)
+{
+   if (($new = $news->read_content($new)) !== NULL)
+   {
+     echo "<div class='post'>\n";
+     echo "<p class='news-date'>".$new['date']."</p>\n";
+     echo "<p class='news-title'><a 
href='p.php?p=news/show&l=".$_GET['l']."&news_id=$new[id]'>".$new['title']."</a></p>";
+     echo "<p class='tiny'><a 
href='mailto:".$new['email']."'>".$new['author']."</a> - ".$new['date']."</p>";
+     echo "<p class='news-content'>".$new['content']."</p>\n";
+     echo "</div>\n";
+   }
+}
+
+if ($news->has_archives() == true)
+{
+   echo "<p align='right'>more in the <a 
href='p.php?p=news/archives&l=".$_GET['l']."' title='Read 
archives'>archive</a></p>";
+}
+
+?>



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to