[Openfirst-cvscommit] news comments.php,1.8,1.9 index.php,1.13,1.14 newcomment.php,1.3,1.4 openfirst
Brought to you by:
xtimg
From: Jamie <ast...@us...> - 2006-02-23 16:35:28
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24914/news Modified Files: comments.php index.php newcomment.php openfirst.info.xml rssfeed.php viewnews.php Log Message: The basics are mostly working, still have a long, long ways to go. Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/news/openfirst.info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openfirst.info.xml 6 Feb 2006 01:42:54 -0000 1.1 --- openfirst.info.xml 23 Feb 2006 16:35:17 -0000 1.2 *************** *** 1,3 **** ! <?xml version="1.0"?> <module xmlns="http://openfirst.org/xml/module/1.0" id="openfirst.news"> <!-- Info --> --- 1,3 ---- ! <?xml version="1.0" ?> <module xmlns="http://openfirst.org/xml/module/1.0" id="openfirst.news"> <!-- Info --> *************** *** 29,33 **** <!-- Should be self explainatory --> <field name="ID" null="no" autoincrement="yes"><type length="6" unsigned="yes">int</type></field> ! <field name="post_date"><type>date</type></field> <field name="poster"><type>text</type></field> <field name="title"><type>tinytext</type></field> --- 29,33 ---- <!-- Should be self explainatory --> <field name="ID" null="no" autoincrement="yes"><type length="6" unsigned="yes">int</type></field> ! <field name="post_date"><type>datetime</type></field> <field name="poster"><type>text</type></field> <field name="title"><type>tinytext</type></field> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/index.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** index.php 6 Feb 2006 01:52:07 -0000 1.13 --- index.php 23 Feb 2006 16:35:17 -0000 1.14 *************** *** 1,5 **** <?php /* ! * openFIRST.news - index.php * * Copyright (C) 2005, --- 1,5 ---- <?php /* ! * openfirst.news - index.php * * Copyright (C) 2005, Index: viewnews.php =================================================================== RCS file: /cvsroot/openfirst/news/viewnews.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** viewnews.php 6 Feb 2006 01:42:54 -0000 1.16 --- viewnews.php 23 Feb 2006 16:35:17 -0000 1.17 *************** *** 1,5 **** <?php /* ! * openFIRST.news - viewnews.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openfirst.news - viewnews.php * * Copyright (C) 2003, *************** *** 26,39 **** * */ - function shownews($limit = 5,$admin=false) { // Get a list of the users able to // be contacted via the feedback form. global $BasePath, $ogDB; ! $query = $ogDB->select('news', '*', '', array('order' => 'ID', 'limit' => $limit)); if ($ogDB->numberOfRows($query) != 0){ while($news = $ogDB->fetchObject($query)){ echo("<br /><table width='500'> <tr><th><strong>{$news->title}</strong></th></tr>"); --- 26,39 ---- * */ function shownews($limit = 5,$admin=false) { // Get a list of the users able to // be contacted via the feedback form. global $BasePath, $ogDB; ! $query = $ogDB->select('news', '*', '', array('ORDER BY' => '`post_date` DESC', 'limit' => $limit)); if ($ogDB->numberOfRows($query) != 0){ while($news = $ogDB->fetchObject($query)){ + $date = date('r', $news->post_date); echo("<br /><table width='500'> <tr><th><strong>{$news->title}</strong></th></tr>"); *************** *** 41,45 **** echo("<tr><td><center><img src='{$news->image}' alt='{$news->title}'></center></td></tr>"); } ! echo("<tr><td class='sub'>Posted on {$news->date} by {$news->poster}</td></tr><tr><td>"); if(function_exists("emoticon_translate")){ echo(emoticon_translate($news->news)); --- 41,45 ---- echo("<tr><td><center><img src='{$news->image}' alt='{$news->title}'></center></td></tr>"); } ! echo("<tr><td class='sub'>Posted on {$date} by {$news->poster}</td></tr><tr><td>"); if(function_exists("emoticon_translate")){ echo(emoticon_translate($news->news)); *************** *** 50,54 **** if ($admin) { echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$BasePath.'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$BasePath.'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$BasePath.'admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$BasePath.'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } echo("</table><br />"); --- 50,54 ---- if ($admin) { echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$BasePath.'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$BasePath.'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$BasePath.'/news/admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$BasePath.'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } echo("</table><br />"); Index: newcomment.php =================================================================== RCS file: /cvsroot/openfirst/news/newcomment.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newcomment.php 24 Dec 2003 00:46:37 -0000 1.3 --- newcomment.php 23 Feb 2006 16:35:17 -0000 1.4 *************** *** 1,5 **** <?php /* ! * openFIRST.news - newcomment.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openfirst.news - newcomment.php * * Copyright (C) 2003, *************** *** 27,32 **** */ ! include_once("../config/globals.php"); ! include_once($header); if(isset($_POST["comment"])&&$_POST["comment"]!=""&&isset($_POST["uname"])&&$_POST["uname"]!=""){ --- 27,32 ---- */ ! include_once("../includes/globals.php"); ! include_once($ogHeader); if(isset($_POST["comment"])&&$_POST["comment"]!=""&&isset($_POST["uname"])&&$_POST["uname"]!=""){ *************** *** 52,55 **** echo('[ <a href="index.php">News Main</a> ]'); ! include_once($footer); ?> --- 52,55 ---- echo('[ <a href="index.php">News Main</a> ]'); ! include_once($ogFooter); ?> Index: comments.php =================================================================== RCS file: /cvsroot/openfirst/news/comments.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** comments.php 8 Jan 2004 00:48:50 -0000 1.8 --- comments.php 23 Feb 2006 16:35:17 -0000 1.9 *************** *** 1,5 **** <?php /* ! * openFIRST.news - comments.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openfirst.news - comments.php * * Copyright (C) 2003, *************** *** 27,31 **** */ define("newsforum","news"); ! include_once("../config/globals.php"); $id=0; --- 27,31 ---- */ define("newsforum","news"); ! include_once("../includes/globals.php"); $id=0; *************** *** 34,43 **** } ! $admin=false; ! if (isset($user->membertype)){ ! $admin=($user->membertype == "administrator"); ! } ! if(function_exists("latest_posts")){ /*!!!important!!! The StoryID Field is required for Forum integration. --- 34,41 ---- } ! $admin = $ogUser->isAdmin(); ! if (function_exists("latest_posts")) { ! /// @todo Add this to openfirst.forum module class. /*!!!important!!! The StoryID Field is required for Forum integration. *************** *** 57,61 **** } } else { ! include_once($header); ?> <h2>Comments</h2> --- 55,59 ---- } } else { ! include_once($ogHeader); ?> <h2>Comments</h2> *************** *** 114,118 **** [ <a href="index.php">News Main</a> ] <?php ! include_once($footer); } ?> --- 112,116 ---- [ <a href="index.php">News Main</a> ] <?php ! include_once($ogFooter); } ?> Index: rssfeed.php =================================================================== RCS file: /cvsroot/openfirst/news/rssfeed.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rssfeed.php 14 Mar 2005 00:53:58 -0000 1.8 --- rssfeed.php 23 Feb 2006 16:35:17 -0000 1.9 *************** *** 1,5 **** <?php /* ! * openFIRST.news - index.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openfirst.news - index.php * * Copyright (C) 2003, *************** *** 26,31 **** * */ ! include_once("../config/globals.php"); ! include_once($header); ?> <h2>RSS Feed Option</h2> --- 26,31 ---- * */ ! include_once("../includes/globals.php"); ! include_once($ogHeader); ?> <h2>RSS Feed Option</h2> *************** *** 89,92 **** </p> <?php ! include_once($footer); ?> --- 89,92 ---- </p> <?php ! include_once($ogFooter); ?> |