Update of /cvsroot/xoops/xoops2/modules/news In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/news Modified Files: archive.php article.php index.php submit.php xoops_version.php Added Files: comment_delete.php comment_edit.php comment_new.php comment_post.php comment_reply.php Removed Files: deletecomment.php editcomment.php newcomment.php postcomment.php replycomment.php Log Message: added global comments feature --- NEW FILE: comment_delete.php --- <?php // $Id: comment_delete.php,v 1.1 2003/01/07 21:32:15 okazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include XOOPS_ROOT_PATH.'/include/comment_delete.php'; ?> --- NEW FILE: comment_edit.php --- <?php // $Id: comment_edit.php,v 1.1 2003/01/07 21:32:17 okazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include XOOPS_ROOT_PATH.'/include/comment_edit.php'; ?> --- NEW FILE: comment_new.php --- <?php // $Id: comment_new.php,v 1.1 2003/01/07 21:32:18 okazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; $com_itemid = isset($HTTP_GET_VARS['com_itemid']) ? intval($HTTP_GET_VARS['com_itemid']) : 0; if ($com_itemid > 0) { $article = new NewsStory($com_itemid); $com_replytext = _NW_POSTERC.' '.$article->uname().' '._NW_DATEC.' '.formatTimestamp($article->published()).'<br /><br />'.$article->hometext(); $bodytext = $article->bodytext(); if ($bodytext != '') { $com_replytext .= '<br /><br />'.$bodytext.''; } $com_replytitle = $article->title(); include XOOPS_ROOT_PATH.'/include/comment_new.php'; } ?> --- NEW FILE: comment_post.php --- <?php // $Id: comment_post.php,v 1.1 2003/01/07 21:32:18 okazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include XOOPS_ROOT_PATH.'/include/comment_post.php'; ?> --- NEW FILE: comment_reply.php --- <?php // $Id: comment_reply.php,v 1.1 2003/01/07 21:32:23 okazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include XOOPS_ROOT_PATH.'/include/comment_reply.php'; ?> Index: archive.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/archive.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** archive.php 2 Jan 2003 18:57:03 -0000 1.1 --- archive.php 7 Jan 2003 21:32:09 -0000 1.2 *************** *** 5,13 **** // Copyright (c) 2000 XOOPS.org // // <http://www.xoops.org/> // - // ------------------------------------------------------------------------ // - // Based on: // - // myPHPNUKE Web Portal System - http://myphpnuke.com/ // - // PHP-NUKE Web Portal System - http://phpnuke.org/ // - // Thatware - http://thatware.org/ // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // --- 5,8 ---- *************** *** 35,40 **** ###################################################################### ! include './header.php'; ! $xoopsOption['template_used'] = array('news_archive.html'); $xoopsOption['template_main'] = 'news_archive.html'; include XOOPS_ROOT_PATH.'/header.php'; --- 30,34 ---- ###################################################################### ! include '../../mainfile.php'; $xoopsOption['template_main'] = 'news_archive.html'; include XOOPS_ROOT_PATH.'/header.php'; Index: article.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/article.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** article.php 2 Jan 2003 18:57:03 -0000 1.1 --- article.php 7 Jan 2003 21:32:10 -0000 1.2 *************** *** 26,31 **** // ------------------------------------------------------------------------ // ! include "header.php"; ! include_once XOOPS_ROOT_PATH."/class/xoopscomments.php"; include_once "class/class.newsstory.php"; foreach ($HTTP_POST_VARS as $k => $v) { --- 26,30 ---- // ------------------------------------------------------------------------ // ! include "../../mainfile.php"; include_once "class/class.newsstory.php"; foreach ($HTTP_POST_VARS as $k => $v) { *************** *** 33,49 **** } $item_id = (!empty($HTTP_GET_VARS['item_id'])) ? intval($HTTP_GET_VARS['item_id']) : 0; ! $storyid = (!empty($HTTP_GET_VARS['storyid'])) ? intval($HTTP_GET_VARS['storyid']) : 0; ! $comment_id = (!empty($HTTP_GET_VARS['comment_id'])) ? intval($HTTP_GET_VARS['comment_id']) : 0; ! if (empty($storyid) && empty($item_id)) { redirect_header("index.php",2,_NW_NOSTORY); exit(); } ! if (isset($HTTP_GET_VARS['mode'])) { ! $mode = $HTTP_GET_VARS['mode']; ! } ! if (isset($HTTP_GET_VARS['order'])) { ! $order = intval($HTTP_GET_VARS['order']); ! } ! $xoopsOption['template_used'] = array('news_article.html', 'news_item.html', 'news_comments_flat.html', 'news_comments_thread.html', 'news_comment.html'); $xoopsOption['template_main'] = 'news_article.html'; --- 32,41 ---- } $item_id = (!empty($HTTP_GET_VARS['item_id'])) ? intval($HTTP_GET_VARS['item_id']) : 0; ! $item_id = (empty($item_id) && !empty($HTTP_GET_VARS['storyid'])) ? intval($HTTP_GET_VARS['storyid']) : 0; ! if (empty($item_id)) { redirect_header("index.php",2,_NW_NOSTORY); exit(); } ! $xoopsOption['template_main'] = 'news_article.html'; *************** *** 51,87 **** $myts =& MyTextSanitizer::getInstance(); // set comment mode if not set - if ( !isset($mode) || trim($mode) == '' || ($mode != 'nocomments' && $mode != 'thread' && $mode != 'flat') ) { - if ( $xoopsUser ) { - $mode = $xoopsUser->getVar('umode'); - } else { - $mode = $xoopsConfig['com_mode']; - } - } - $xoopsTpl->assign('commentmode', $mode); - // set comment order if not set - if ( !isset($order) ) { - if ( $xoopsUser ) { - $order = $xoopsUser->getVar('uorder'); - } else { - $order = $xoopsConfig['com_order']; - } - } - if ( $order == 1 ) { - $orderby = 'date DESC'; - $xoopsTpl->assign('commentorder', 1); - $xoopsTpl->assign('order_other', 0); - } else { - $xoopsTpl->assign('commentorder', 0); - $xoopsTpl->assign('order_other', 1); - $orderby = 'date ASC'; - } - if ( !empty($comment_id ) ) { - $artcomment = new XoopsComments($xoopsDB->prefix('comments'), $comment_id); - } else { - $artcomment = new XoopsComments($xoopsDB->prefix('comments')); - } - $item_id = (!empty($storyid)) ? $storyid : $item_id; - $artcomment->setVar('item_id', $item_id); $article = new NewsStory($item_id); --- 43,47 ---- *************** *** 91,95 **** } ! if ( $artcomment->getVar('pid') == 0 ) { $article->updateCounter(); } --- 51,56 ---- } ! // update counter only when viewing top page ! if (empty($HTTP_GET_VARS['com_id'])) { $article->updateCounter(); } *************** *** 131,248 **** $xoopsTpl->assign('lang_printerpage', _NW_PRINTERFRIENDLY); $xoopsTpl->assign('lang_sendstory', _NW_SENDSTORY); - $xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_NW_INTARTICLE,$xoopsConfig['sitename']).'&body='.sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/news/article.php?item_id='.$article->storyid()); - if ( $mode == 'flat' ) { - $criteria = array('item_id='.$item_id); - $commentsArray =& $artcomment->getAllComments($criteria, true, $orderby); - } elseif ( $mode == 'thread' ) { - $criteria = array('item_id='.$item_id, 'pid='.$artcomment->getVar('pid')); - $commentsArray =& $artcomment->getAllComments($criteria, true, $orderby); - } else { - $commentsArray = array(); - } - ob_start(); - $artcomment->printNavBar($item_id, $mode, $order); - $xoopsTpl->assign('commentsnav', ob_get_contents()); - ob_end_clean(); - - // Now, show comments - $count = count($commentsArray); - if ( is_array($commentsArray) && $count > 0 ) { - if ($xoopsUser) { - $xoopsTpl->assign('viewer_userid', $xoopsUser->getVar('uid')); - if (!isset($isadmin)) { - if ($xoopsUser->isAdmin($xoopsModule->mid())) { - $xoopsTpl->assign('isadmin', true); - } - } else { - $xoopsTpl->assign('isadmin', $isadmin); - } - } else { - $xoopsTpl->assign('viewer_userid', 0); - $xoopsTpl->assign('isadmin', false); - $xoopsTpl->assign('anon_canpost', $xoopsConfig['anonpost']); - } - $xoopsTpl->assign('commentorder', $order); - if ( $mode == 'flat' ) { - $temp_posters = array(); - for ( $i = 0; $i < $count; $i++ ) { - $icon_image = $commentsArray[$i]->getVar('icon'); - $icon_image = ($icon_image != '') ? '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />' : '<img src="'.XOOPS_URL.'/images/icons/fposticon.gif" alt="" />'; - $poster_id = $commentsArray[$i]->getVar('user_id'); - if ($poster_id > 0) { - if (!in_array($poster_id, array_keys($temp_posters))) { - $temp_posters[$poster_id] =& new XoopsUser($poster_id); - } - $poster_rank = $temp_posters[$poster_id]->rank(); - $poster_status = $temp_posters[$poster_id]->isOnline() ? _ONLINE : ''; - if ( $poster_rank['image'] != '' ) { - $poster_rank['image'] = '<img src="'.XOOPS_URL.'/uploads/'.$poster_rank['image'].'" alt="" />'; - } - $xoopsTpl->append('comments', array('ip' => $commentsArray[$i]->getVar('ip'), 'id' => $commentsArray[$i]->getVar('comment_id'), 'image' => $icon_image, 'title' => $commentsArray[$i]->getVar('subject'), 'text' => $commentsArray[$i]->getVar('comment'), 'date' => formatTimestamp($commentsArray[$i]->getVar('date'), 'm'), 'poster_id' => $poster_id, 'poster' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster_id.'">'.$temp_posters[$poster_id]->getVar('uname').'</a>', 'poster_rank_image' => $poster_rank['image'], 'poster_rank_title' => $poster_rank['title'], 'poster_avatar' => $temp_posters[$poster_id]->getVar('user_avatar'), 'poster_regdate' => formatTimestamp($temp_posters[$poster_id]->getVar('user_regdate'), 's'), 'poster_from' => $temp_posters[$poster_id]->getVar('user_from'), 'poster_postnum' => $temp_posters[$poster_id]->getVar('posts'), 'poster_status' => $poster_status)); - } else { - $xoopsTpl->append('comments', array('ip' => $commentsArray[$i]->getVar('ip'), 'id' => $commentsArray[$i]->getVar('comment_id'), 'image' => $icon_image, 'title' => $commentsArray[$i]->getVar('subject'), 'text' => $commentsArray[$i]->getVar('comment'), 'date' => formatTimestamp($commentsArray[$i]->getVar('date'), 'm'), 'poster_id' => 0, 'poster' => $xoopsConfig['anonymous'])); - } - } - } elseif ( $mode == 'thread' ) { - $temp_posters = array(); - for ( $i = 0; $i < $count; $i++ ) { - $treeArray =& $commentsArray[$i]->getCommentTree(); - $tcount = count($treeArray); - $comment_trees = array(); - if ( $tcount > 0 ) { - for ( $j = 0; $j < $tcount; $j++ ) { - $prefix = str_replace('.', ' ', $treeArray[$j]->getVar('prefix')); - $date = formatTimestamp($treeArray[$j]->getVar('date'),'m'); - if ( $treeArray[$j]->getVar('icon') != '' ) { - $icon = 'subject/'.$treeArray[$j]->getVar('icon', 'E'); - } else { - $icon = 'icons/fposticon.gif'; - } - $comment_trees[] = array('image' => '<img src="'.XOOPS_URL.'/images/'.$icon.'" alt="" />', 'prefix' => $prefix, 'date' => $date, 'title' => '<a href="'.XOOPS_URL.'/modules/news/article.php?item_id='.$item_id.'&mode='.$mode.'&order='.$order.'&comment_id='.$treeArray[$j]->getVar('comment_id').'">'.$treeArray[$j]->getVar('subject').'</a>', 'poster' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$treeArray[$j]->getVar('user_id').'">'.XoopsUser::getUnameFromId($treeArray[$j]->getVar('user_id')).'</a>'); - } - } - $icon_image = $commentsArray[$i]->getVar('icon'); - $icon_image = ($icon_image != '') ? '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />' : '<img src="'.XOOPS_URL.'/images/icons/fposticon.gif" alt="" />'; - if ( $commentsArray[$i]->getVar('pid') != 0 ) { - $xoopsTpl->assign('lang_top', _TOP); - $xoopsTpl->assign('lang_parent', _PARENT); - $xoopsTpl->assign('showthreadnav', true); - } else { - $xoopsTpl->assign('showthreadnav', false); - } - $poster_id = $commentsArray[$i]->getVar('user_id'); - if ( $poster_id > 0 ) { - if ( !in_array($poster_id, array_keys($temp_posters)) ) { - $temp_posters[$poster_id] =& new XoopsUser($poster_id); - } - $poster_rank = $temp_posters[$poster_id]->rank(); - $poster_status = $temp_posters[$poster_id]->isOnline() ? _ONLINE : ''; - if ( $poster_rank['image'] != '' ) { - $poster_rank['image'] = '<img src="'.XOOPS_URL.'/uploads/'.$poster_rank['image'].'" alt="" />'; - } - $xoopsTpl->append('comments', array('ip' => $commentsArray[$i]->getVar('ip'), 'pid' => $commentsArray[$i]->getVar('pid'), 'id' => $commentsArray[$i]->getVar('comment_id'), 'image' => $icon_image, 'title' => $commentsArray[$i]->getVar('subject'), 'text' => $commentsArray[$i]->getVar('comment'), 'date' => formatTimestamp($commentsArray[$i]->getVar('date'), 'm'), 'poster_id' => $poster_id, 'poster' => '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster_id.'">'.$temp_posters[$poster_id]->getVar('uname').'</a>', 'poster_rank_image' => $poster_rank['image'], 'poster_rank_title' => $poster_rank['title'], 'poster_avatar' => $temp_posters[$poster_id]->getVar('user_avatar'), 'poster_regdate' => formatTimestamp($temp_posters[$poster_id]->getVar('user_regdate'), 's'), 'poster_from' => $temp_posters[$poster_id]->getVar('user_from'), 'poster_postnum' => $temp_posters[$poster_id]->getVar('posts'), 'poster_status' => $poster_status, 'trees' => $comment_trees)); - } else { - $xoopsTpl->append('comments', array('ip' => $commentsArray[$i]->getVar('ip'), 'pid' => $commentsArray[$i]->getVar('pid'), 'id' => $commentsArray[$i]->getVar('comment_id'), 'image' => $icon_image, 'title' => $commentsArray[$i]->getVar('subject'), 'text' => $commentsArray[$i]->getVar('comment'), 'date' => formatTimestamp($commentsArray[$i]->getVar('date'), 'm'), 'poster_id' => 0, 'poster' => $xoopsConfig['anonymous'], 'trees' => $comment_trees)); - } - unset($comment_trees); - } - } else { - //EMPTY - } - } $xoopsTpl->assign('lang_on', _ON); $xoopsTpl->assign('lang_postedby', _POSTEDBY); $xoopsTpl->assign('lang_reads', _READS); ! $xoopsTpl->assign('lang_from', _FROM); ! $xoopsTpl->assign('lang_joined', _JOINED); ! $xoopsTpl->assign('lang_posts', _POSTS); ! $xoopsTpl->assign('lang_poster', _POSTER); ! $xoopsTpl->assign('lang_thread', _THREAD); ! $xoopsTpl->assign('lang_edit', _EDIT); ! $xoopsTpl->assign('lang_delete', _DELETE); ! $xoopsTpl->assign('lang_reply', _REPLY); ! $xoopsTpl->assign('lang_subject', _REPLIES); ! $xoopsTpl->assign('lang_date', _DATE); ! $xoopsTpl->assign('lang_commentsad' , _NW_COMMENTS_ADVERT); include XOOPS_ROOT_PATH.'/footer.php'; ?> --- 92,103 ---- $xoopsTpl->assign('lang_printerpage', _NW_PRINTERFRIENDLY); $xoopsTpl->assign('lang_sendstory', _NW_SENDSTORY); $xoopsTpl->assign('lang_on', _ON); $xoopsTpl->assign('lang_postedby', _POSTEDBY); $xoopsTpl->assign('lang_reads', _READS); ! $xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_NW_INTARTICLE,$xoopsConfig['sitename']).'&body='.sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/news/article.php?item_id='.$article->storyid()); ! ! $com_itemid = $item_id; ! include XOOPS_ROOT_PATH.'/include/comment_view.php'; ! include XOOPS_ROOT_PATH.'/footer.php'; ?> Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 4 Jan 2003 06:27:58 -0000 1.3 --- index.php 7 Jan 2003 21:32:11 -0000 1.4 *************** *** 25,30 **** // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // ! include 'header.php'; ! $xoopsOption['template_used'] = array('news_index.html', 'news_item.html'); $xoopsOption['template_main'] = 'news_index.html'; if ( $xoopsConfig['startpage'] == 'news' ) { --- 25,29 ---- // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // ! include '../../mainfile.php'; $xoopsOption['template_main'] = 'news_index.html'; if ( $xoopsConfig['startpage'] == 'news' ) { *************** *** 105,109 **** $morelink .= ' | '; } ! $ccount = $sarray[$i]->getCommentsCount(); $morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$sarray[$i]->storyid().''; $morelink2 = '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$sarray[$i]->storyid().''; --- 104,108 ---- $morelink .= ' | '; } ! $ccount = xoops_comment_count($xoopsModule->getVar('mid'), $sarray[$i]->storyid()); $morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$sarray[$i]->storyid().''; $morelink2 = '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$sarray[$i]->storyid().''; Index: submit.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/submit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** submit.php 5 Jan 2003 19:18:41 -0000 1.2 --- submit.php 7 Jan 2003 21:32:12 -0000 1.3 *************** *** 25,31 **** // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // ! include 'header.php'; include_once 'class/class.newsstory.php'; ! if ( !$xoopsModuleConfig['anonpost'] && !$xoopsUser ) { redirect_header("index.php", 0, _NW_ANONNOTALLOWED); exit(); --- 25,31 ---- // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // ! include '../../mainfile.php'; include_once 'class/class.newsstory.php'; ! if (!$xoopsModuleConfig['anonpost'] && !is_object($xoopsUser)) { redirect_header("index.php", 0, _NW_ANONNOTALLOWED); exit(); Index: xoops_version.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/xoops_version.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xoops_version.php 5 Jan 2003 19:18:41 -0000 1.2 --- xoops_version.php 7 Jan 2003 21:32:13 -0000 1.3 *************** *** 41,47 **** // Tables created by sql file (without prefix!) ! $modversion['tables'][0] = "comments"; ! $modversion['tables'][1] = "stories"; ! $modversion['tables'][2] = "topics"; // Admin things --- 41,46 ---- // Tables created by sql file (without prefix!) ! $modversion['tables'][0] = "stories"; ! $modversion['tables'][1] = "topics"; // Admin things *************** *** 55,68 **** $modversion['templates'][2]['file'] = 'news_article.html'; $modversion['templates'][2]['description'] = ''; ! $modversion['templates'][3]['file'] = 'news_comment.html'; $modversion['templates'][3]['description'] = ''; ! $modversion['templates'][4]['file'] = 'news_comments_flat.html'; $modversion['templates'][4]['description'] = ''; - $modversion['templates'][5]['file'] = 'news_comments_thread.html'; - $modversion['templates'][5]['description'] = ''; - $modversion['templates'][6]['file'] = 'news_index.html'; - $modversion['templates'][6]['description'] = ''; - $modversion['templates'][7]['file'] = 'news_item.html'; - $modversion['templates'][7]['description'] = ''; --- 54,61 ---- $modversion['templates'][2]['file'] = 'news_article.html'; $modversion['templates'][2]['description'] = ''; ! $modversion['templates'][3]['file'] = 'news_index.html'; $modversion['templates'][3]['description'] = ''; ! $modversion['templates'][4]['file'] = 'news_item.html'; $modversion['templates'][4]['description'] = ''; *************** *** 108,111 **** --- 101,108 ---- $modversion['search']['func'] = "news_search"; + // Comments + $modversion['hasComments'] = 1; + $modversion['comments']['pageName'] = 'article.php'; + $modversion['comments']['itemName'] = 'storyid'; // Config Settings (only for modules that need config settings generated automatically) *************** *** 152,159 **** $modversion['config'][3]['default'] = 1; ! $modversion['config'][4]['name'] = 'anonpost'; ! $modversion['config'][4]['title'] = '_MI_ANONPOST'; ! $modversion['config'][4]['description'] = ''; ! $modversion['config'][4]['formtype'] = 'yesno'; ! $modversion['config'][4]['valuetype'] = 'int'; ! $modversion['config'][4]['default'] = 0; \ No newline at end of file --- 149,156 ---- $modversion['config'][3]['default'] = 1; ! $modversion['config'][4]['name'] = 'anonpost'; ! $modversion['config'][4]['title'] = '_MI_ANONPOST'; ! $modversion['config'][4]['description'] = ''; ! $modversion['config'][4]['formtype'] = 'yesno'; ! $modversion['config'][4]['valuetype'] = 'int'; ! $modversion['config'][4]['default'] = 0; --- deletecomment.php DELETED --- --- editcomment.php DELETED --- --- newcomment.php DELETED --- --- postcomment.php DELETED --- --- replycomment.php DELETED --- |