You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(361) |
Oct
(65) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(798) |
Feb
(694) |
Mar
(586) |
Apr
(145) |
May
(24) |
Jun
(24) |
Jul
(56) |
Aug
(11) |
Sep
(138) |
Oct
(107) |
Nov
(58) |
Dec
(39) |
2004 |
Jan
(157) |
Feb
(24) |
Mar
(13) |
Apr
(14) |
May
(73) |
Jun
(106) |
Jul
(217) |
Aug
(91) |
Sep
(116) |
Oct
(357) |
Nov
(27) |
Dec
(272) |
2005 |
Jan
(97) |
Feb
(40) |
Mar
(167) |
Apr
(365) |
May
(344) |
Jun
(357) |
Jul
(407) |
Aug
(529) |
Sep
(204) |
Oct
(52) |
Nov
(80) |
Dec
(1) |
2006 |
Jan
(2) |
Feb
(1) |
Mar
(11) |
Apr
(112) |
May
(121) |
Jun
(86) |
Jul
(51) |
Aug
(48) |
Sep
(107) |
Oct
(20) |
Nov
(50) |
Dec
(11) |
2007 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(11) |
May
(2) |
Jun
(25) |
Jul
(67) |
Aug
(134) |
Sep
(54) |
Oct
(69) |
Nov
(10) |
Dec
(74) |
2008 |
Jan
(73) |
Feb
(81) |
Mar
(64) |
Apr
(98) |
May
(157) |
Jun
(68) |
Jul
(80) |
Aug
(108) |
Sep
(176) |
Oct
(107) |
Nov
(265) |
Dec
(60) |
2009 |
Jan
(149) |
Feb
(140) |
Mar
(195) |
Apr
(141) |
May
(53) |
Jun
(45) |
Jul
(98) |
Aug
(153) |
Sep
(160) |
Oct
(138) |
Nov
(139) |
Dec
(104) |
2010 |
Jan
(188) |
Feb
(259) |
Mar
(133) |
Apr
(104) |
May
(42) |
Jun
(121) |
Jul
(38) |
Aug
(223) |
Sep
(259) |
Oct
(255) |
Nov
(106) |
Dec
(157) |
2011 |
Jan
(202) |
Feb
(110) |
Mar
(261) |
Apr
(272) |
May
(218) |
Jun
(108) |
Jul
(141) |
Aug
(205) |
Sep
(326) |
Oct
(279) |
Nov
(368) |
Dec
(238) |
2012 |
Jan
(239) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <w4...@us...> - 2003-01-07 22:43:22
|
Update of /cvsroot/xoops/xoops2/modules/system/language/spanish/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14617/modules/system/language/spanish/admin Modified Files: preferences.php Log Message: update the spanish lang Index: preferences.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/language/spanish/admin/preferences.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** preferences.php 2 Jan 2003 20:34:20 -0000 1.1 --- preferences.php 7 Jan 2003 22:43:18 -0000 1.2 *************** *** 17,21 **** define("_MD_AM_THEMESET","Theme Set"); define("_MD_AM_ANONNAME","Nombre de Usuario para Anónimos"); - define("_MD_AM_ANONPOST","¿Permitir el envío a anónimos?"); define("_MD_AM_MINPASS","Mínima longitud de la cotraseña requerida"); define("_MD_AM_NEWUNOTIFY","¿Notificar por mail cuando un usuario se registra?"); --- 17,20 ---- *************** *** 131,142 **** define('_MD_AM_MINSEARCH', 'Mínima longitud de palabra'); define('_MD_AM_MINSEARCHDSC', 'Ingrese la Mínima longitud de palabra que el usuario requiere para realizar una Busqueda'); - - define('_MD_AM_IMAGE', 'Manejador de Imágenes'); - define('_MD_AM_IMAGEW', 'Ancho máximo de la imágen (pixels)'); - define('_MD_AM_IMAGEWDSC', 'Ingrese el Ancho máximo permitido para subir una imágen'); - define('_MD_AM_IMAGEH', 'Alto máximo de la imágen (pixels)'); - define('_MD_AM_IMAGEHDSC', 'Ingrese el Alto máximo permitido para subir una imágen'); - define('_MD_AM_IMAGEMAX', 'Tamaño máximo de la imágen (bytes)'); - define('_MD_AM_IMAGEMAXDSC', 'Ingrese el tamaño máximo permitido para subir una imágen'); define('_MD_AM_MODCONFIG', 'Opciónes de configuración del módulo'); define('_MD_AM_DSPDSCLMR', '¿Mostrar Condiciones de Registro?'); --- 130,133 ---- |
From: <ok...@us...> - 2003-01-07 22:33:28
|
Update of /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin In directory sc8-pr-cvs1:/tmp/cvs-serv10607/modules/system/admin/modulesadmin Modified Files: modulesadmin.php Log Message: fixed comment config generation bug Index: modulesadmin.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin/modulesadmin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** modulesadmin.php 7 Jan 2003 21:32:36 -0000 1.3 --- modulesadmin.php 7 Jan 2003 22:33:23 -0000 1.4 *************** *** 339,344 **** } else { if ($module->getVar('hascomments') != 0) { include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); ! $configs = array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '_CM_COMRULES', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)); array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '_CM_COMANONPOST', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); } --- 339,345 ---- } else { if ($module->getVar('hascomments') != 0) { + $configs = array(); include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); ! $configs[] = array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '_CM_COMRULES', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)); array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '_CM_COMANONPOST', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); } |
From: <ok...@us...> - 2003-01-07 22:19:00
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1:/tmp/cvs-serv4577/include Modified Files: comment_new.php Log Message: added comment reply title check Index: comment_new.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/comment_new.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comment_new.php 7 Jan 2003 21:32:46 -0000 1.1 --- comment_new.php 7 Jan 2003 22:18:47 -0000 1.2 *************** *** 38,46 **** if ($com_itemid > 0) { include XOOPS_ROOT_PATH.'/header.php'; ! themecenterposts($com_replytitle, $com_replytext); ! $myts =& MyTextSanitizer::getInstance(); ! $com_title = $myts->htmlSpecialChars($com_replytitle); ! if (!preg_match("/^re:/i", $com_title)) { ! $com_title = "Re: ".substr($com_title, 0, 56); } if (isset($HTTP_GET_VARS['com_mode'])) { --- 38,52 ---- if ($com_itemid > 0) { include XOOPS_ROOT_PATH.'/header.php'; ! if (isset($com_replytitle)) { ! if (isset($com_replytext)) { ! themecenterposts($com_replytitle, $com_replytext); ! } ! $myts =& MyTextSanitizer::getInstance(); ! $com_title = $myts->htmlSpecialChars($com_replytitle); ! if (!preg_match("/^re:/i", $com_title)) { ! $com_title = "Re: ".substr($com_title, 0, 56); ! } ! } else { ! $com_title = ''; } if (isset($HTTP_GET_VARS['com_mode'])) { |
From: <ok...@us...> - 2003-01-07 22:02:10
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1:/tmp/cvs-serv28721/include Modified Files: functions.php Log Message: fixed anon user post delete bug Index: functions.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions.php 7 Jan 2003 21:07:58 -0000 1.4 --- functions.php 7 Jan 2003 22:02:02 -0000 1.5 *************** *** 521,525 **** // store poster ID and deleted post number into array for later use $poster_id = $comments[$i]->getVar('com_uid'); ! $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1); } } --- 521,527 ---- // store poster ID and deleted post number into array for later use $poster_id = $comments[$i]->getVar('com_uid'); ! if ($poster_id != 0) { ! $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1); ! } } } |
From: <ok...@us...> - 2003-01-07 22:00:49
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1:/tmp/cvs-serv28142/include Modified Files: comment_delete.php Log Message: fixed anon post delete bug Index: comment_delete.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/comment_delete.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comment_delete.php 7 Jan 2003 21:56:46 -0000 1.2 --- comment_delete.php 7 Jan 2003 22:00:43 -0000 1.3 *************** *** 77,84 **** exit(); } ! // update user posts ! $member_handler =& xoops_gethandler('member'); ! $com_poster =& $member_handler->getUser($comment->getVar('com_uid')); ! $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - 1); // get all comments posted later within the same thread --- 77,86 ---- exit(); } ! // update user posts if its not an anonymous post ! if ($comment->getVar('com_uid') != 0) { ! $member_handler =& xoops_gethandler('member'); ! $com_poster =& $member_handler->getUser($comment->getVar('com_uid')); ! $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - 1); ! } // get all comments posted later within the same thread |
From: <ok...@us...> - 2003-01-07 21:56:50
|
Update of /cvsroot/xoops/xoops2/include In directory sc8-pr-cvs1:/tmp/cvs-serv26052/include Modified Files: comment_delete.php Log Message: fixed anon user problem when delete Index: comment_delete.php =================================================================== RCS file: /cvsroot/xoops/xoops2/include/comment_delete.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comment_delete.php 7 Jan 2003 21:32:40 -0000 1.1 --- comment_delete.php 7 Jan 2003 21:56:46 -0000 1.2 *************** *** 153,157 **** // store poster ID and deleted post number into array for later use $poster_id = $child_comments[$i]->getVar('com_uid'); ! $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1); } } --- 153,159 ---- // store poster ID and deleted post number into array for later use $poster_id = $child_comments[$i]->getVar('com_uid'); ! if ($poster_id > 0) { ! $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1); ! } } } |
From: <ok...@us...> - 2003-01-07 21:47:32
|
Update of /cvsroot/xoops/xoops2/modules/system/language/english/admin In directory sc8-pr-cvs1:/tmp/cvs-serv21214/modules/system/language/english/admin Modified Files: preferences.php Log Message: removed anonymous comment option Index: preferences.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/language/english/admin/preferences.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** preferences.php 2 Jan 2003 20:24:53 -0000 1.1 --- preferences.php 7 Jan 2003 21:47:27 -0000 1.2 *************** *** 17,21 **** define("_MD_AM_THEMESET","Theme Set"); define("_MD_AM_ANONNAME","Username for anonymous users"); - define("_MD_AM_ANONPOST","Allow anonymous users to post comments?"); define("_MD_AM_MINPASS","Minimum length of password required"); define("_MD_AM_NEWUNOTIFY","Notify by mail when a new user is registered?"); --- 17,20 ---- |
From: <ok...@us...> - 2003-01-07 21:47:31
|
Update of /cvsroot/xoops/xoops2/install In directory sc8-pr-cvs1:/tmp/cvs-serv21214/install Modified Files: index.php Log Message: removed anonymous comment option Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/install/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 7 Jan 2003 21:45:13 -0000 1.8 --- index.php 7 Jan 2003 21:47:23 -0000 1.9 *************** *** 1441,1445 **** $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('config')." VALUES (29, 0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', '35000', '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('config')." VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '".$adminmail."', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); - $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('config')." VALUES (31, 0, 1, 'anonpost', '_MD_AM_ANONPOST', '0', '_MD_AM_ANONPOSTDSC', 'yesno', 'int', 32)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('config')." VALUES (32, 0, 2, 'self_delete', '_MD_AM_SELFDELETE', '0', '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('config')." VALUES (33, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'thread', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); --- 1441,1444 ---- |
From: <ok...@us...> - 2003-01-07 21:45:19
|
Update of /cvsroot/xoops/xoops2/install In directory sc8-pr-cvs1:/tmp/cvs-serv20308/install Modified Files: index.php Log Message: fix for new comments feature Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/install/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 7 Jan 2003 21:31:58 -0000 1.7 --- index.php 7 Jan 2003 21:45:13 -0000 1.8 *************** *** 1545,1556 **** # Dumping data for table 'configoption' # ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (1, '_MD_AM_DEBUGMODE1', '1', 13)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (2, '_MD_AM_DEBUGMODE2', '2', 13)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (3, '_NOCOMMENTS', '0', 33)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (4, '_FLAT', 'flat', 33)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (5, '_THREADED', 'thread', 33)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (6, '_OLDESTFIRST', '0', 34)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (7, '_NEWESTFIRST', '1', 34)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (8, '_MD_AM_USERACTV', '0', 21)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (9, '_MD_AM_AUTOACTV', '1', 21)"); --- 1545,1556 ---- # Dumping data for table 'configoption' # ! include_once '../include/comment_constants.php'; $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (1, '_MD_AM_DEBUGMODE1', '1', 13)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (2, '_MD_AM_DEBUGMODE2', '2', 13)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (3, '_NESTED', 'nest', 33)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (4, '_FLAT', 'flat', 33)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (5, '_THREADED', 'thread', 33)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (6, '_OLDESTFIRST', ".XOOPS_COMMENT_OLD1ST.", 34)"); ! $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (7, '_NEWESTFIRST', ".XOOPS_COMMENT_NEW1ST.", 34)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (8, '_MD_AM_USERACTV', '0', 21)"); $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('configoption')." VALUES (9, '_MD_AM_AUTOACTV', '1', 21)"); |
From: <ok...@us...> - 2003-01-07 21:33:43
|
Update of /cvsroot/xoops/xoops2/modules/system/admin/preferences In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/system/admin/preferences Modified Files: main.php Log Message: added global comments feature Index: main.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/preferences/main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.php 2 Jan 2003 20:12:28 -0000 1.1 --- main.php 7 Jan 2003 21:32:37 -0000 1.2 *************** *** 200,203 **** --- 200,209 ---- include_once XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php'; } + + // if has comments feature, need comment lang file + if ($module->getVar('hascomments') == 1) { + include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php'; + } + $modname = $module->getVar('name'); $form->addElement(new XoopsFormHidden('redirect', XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex'))); |
From: <ok...@us...> - 2003-01-07 21:33:41
|
Update of /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/system/admin/modulesadmin Modified Files: modulesadmin.php Log Message: added global comments feature Index: modulesadmin.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin/modulesadmin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modulesadmin.php 5 Jan 2003 18:40:14 -0000 1.2 --- modulesadmin.php 7 Jan 2003 21:32:36 -0000 1.3 *************** *** 140,143 **** --- 140,147 ---- $module =& $module_handler->create(); $module->loadInfoAsVar($dirname); + // set hasconfig to 1 if has comments feature + if ($module->getVar('hascomments') == 1) { + $module->setVar('hasconfig', 1); + } $module->setVar('weight', 1); $error = false; *************** *** 328,331 **** --- 332,348 ---- $configs = $module->getInfo('config'); if ($configs != false) { + if ($module->getVar('hascomments') != 0) { + include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); + array_push($configs, array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '_CM_COMRULES', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN))); + array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '_CM_COMANONPOST', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); + } + } else { + if ($module->getVar('hascomments') != 0) { + include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); + $configs = array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '_CM_COMRULES', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)); + array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '_CM_COMANONPOST', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); + } + } + if ($configs != false) { $msgs[] = 'Adding module config data...'; $config_handler =& xoops_gethandler('config'); *************** *** 476,479 **** --- 493,497 ---- } else { + // delete template files $tplfile_handler = xoops_gethandler('themeset', 'tplfile'); $criteria = new CriteriaCompo(new Criteria('tpl_refid', $module->getVar('mid'))); *************** *** 493,496 **** --- 511,515 ---- unset($templates); + // delete blocks and block tempalte files $block_arr =& XoopsBlock::getByModule($module->getVar('mid')); if (is_array($block_arr)) { *************** *** 521,524 **** --- 540,545 ---- } } + + // delete tables used by this module $modtables = $module->getInfo('tables'); if ($modtables != false && is_array($modtables)) { *************** *** 538,554 **** } } ! $config_handler =& xoops_gethandler('config'); ! $configs =& $config_handler->getConfigs(new Criteria('conf_modid', $module->getVar('mid'))); ! $confcount = count($configs); ! if (is_array($configs) && $confcount > 0) { ! $msgs[] = 'Deleting module config options...'; ! for ($i = 0; $i < $confcount; $i++) { ! if (!$config_handler->deleteConfig($configs[$i])) { ! $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete config data from the database. Config ID: <b>'.$configs[$i]->getvar('conf_id').'</b></span>'; ! } else { ! $msgs[] = ' Config data deleted from the database. Config ID: <b>'.$configs[$i]->getVar('conf_id').'</b>'; } } } $msgs[] = '</code><p>'.sprintf(_MD_AM_OKUNINS, "<b>".$module->getVar('name')."</b>").'</p>'; } --- 559,591 ---- } } ! ! // delete comments if any ! if ($module->getVar('hascomments') != 0) { ! $msgs[] = 'Deleting comments...'; ! $comment_handler =& xoops_gethandler('comment'); ! if (!$comment_handler->deleteByModule($module->getVar('mid'))) { ! $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete comments</span>'; ! } else { ! $msgs[] = ' Comments deleted'; ! } ! } ! ! // delete module config options if any ! if ($module->getVar('hasconfig') != 0) { ! $config_handler =& xoops_gethandler('config'); ! $configs =& $config_handler->getConfigs(new Criteria('conf_modid', $module->getVar('mid'))); ! $confcount = count($configs); ! if (is_array($configs) && $confcount > 0) { ! $msgs[] = 'Deleting module config options...'; ! for ($i = 0; $i < $confcount; $i++) { ! if (!$config_handler->deleteConfig($configs[$i])) { ! $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete config data from the database. Config ID: <b>'.$configs[$i]->getvar('conf_id').'</b></span>'; ! } else { ! $msgs[] = ' Config data deleted from the database. Config ID: <b>'.$configs[$i]->getVar('conf_id').'</b>'; ! } } } } + $msgs[] = '</code><p>'.sprintf(_MD_AM_OKUNINS, "<b>".$module->getVar('name')."</b>").'</p>'; } |
From: <ok...@us...> - 2003-01-07 21:33:40
|
Update of /cvsroot/xoops/xoops2/modules/news/templates In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/news/templates Modified Files: news_article.html Removed Files: news_comment.html news_comments_flat.html news_comments_thread.html Log Message: added global comments feature Index: news_article.html =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/templates/news_article.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** news_article.html 5 Jan 2003 14:18:45 -0000 1.2 --- news_article.html 7 Jan 2003 21:32:33 -0000 1.3 *************** *** 1,21 **** ! <div style="margin: 0; padding: 0;"> <{include file="db:news_item.html" story=$story}> </div> ! <div style="margin: 0; padding: 5px; text-align: right;"> <a href="print.php?storyid=<{$story.id}>"><img src="images/print.gif" border="0" alt="<{$lang_printerpage}>" /></a> <a target="_top" href="<{$mail_link}>"><img src="images/friend.gif" border="0" alt="<{$lang_sendstory}>" /></a> </div> ! <div style="text-align:center; margin: 0; padding: 0;"> <{$commentsnav}> ! <{$lang_commentsad}> </div> ! <div style="margin: 0; padding: 0;"> <!-- start comments loop --> ! <{if $commentmode == "flat"}> ! <{include file="db:news_comments_flat.html"}> <{else}> ! <{include file="db:news_comments_thread.html"}> <{/if}> <!-- end comments loop --> --- 1,23 ---- ! <div style="padding: 3px; margin-right:3px;"> <{include file="db:news_item.html" story=$story}> </div> ! <div style="padding: 5px; text-align: right; margin-right:3px;"> <a href="print.php?storyid=<{$story.id}>"><img src="images/print.gif" border="0" alt="<{$lang_printerpage}>" /></a> <a target="_top" href="<{$mail_link}>"><img src="images/friend.gif" border="0" alt="<{$lang_sendstory}>" /></a> </div> ! <div style="text-align:center; padding: 3px; margin-right:3px;"> <{$commentsnav}> ! <{$lang_notice}> </div> ! <div style="margin-top: 3px; margin-right:3px; padding: 3px;"> <!-- start comments loop --> ! <{if $comment_mode == "flat"}> ! <{include file="db:system_comments_flat.html"}> ! <{elseif $comment_mode == "thread"}> ! <{include file="db:system_comments_thread.html"}> <{else}> ! <{include file="db:system_comments_nest.html"}> <{/if}> <!-- end comments loop --> --- news_comment.html DELETED --- --- news_comments_flat.html DELETED --- --- news_comments_thread.html DELETED --- |
From: <ok...@us...> - 2003-01-07 21:33:37
|
Update of /cvsroot/xoops/xoops2/kernel/member/handler In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/member/handler Modified Files: member.php Log Message: added global comments feature Index: member.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/member/handler/member.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 |
From: <ok...@us...> - 2003-01-07 21:33:37
|
Update of /cvsroot/xoops/xoops2/modules/news/sql In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/news/sql Modified Files: mysql.sql Log Message: added global comments feature Index: mysql.sql =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/sql/mysql.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql.sql 2 Jan 2003 19:22:36 -0000 1.1 --- mysql.sql 7 Jan 2003 21:32:33 -0000 1.2 *************** *** 1,34 **** - # phpMyAdmin MySQL-Dump - # version 2.2.2 - # http://phpwizard.net/phpMyAdmin/ - # http://phpmyadmin.sourceforge.net/ (download page) - # - # -------------------------------------------------------- - - # - # Table structure for table `comments` - # - - CREATE TABLE comments ( - comment_id int(8) unsigned NOT NULL auto_increment, - pid int(8) unsigned NOT NULL default '0', - item_id int(8) unsigned NOT NULL default '0', - date int(10) NOT NULL default '0', - user_id int(5) NOT NULL default '0', - ip varchar(15) NOT NULL default '', - subject varchar(255) default NULL, - comment text NOT NULL, - nohtml tinyint(1) NOT NULL default '0', - nosmiley tinyint(1) NOT NULL default '0', - noxcode tinyint(1) NOT NULL default '0', - icon varchar(25) NOT NULL default '', - PRIMARY KEY (comment_id), - KEY pid (pid), - KEY item_id (item_id), - KEY user_id (user_id), - KEY subject (subject(40)) - ) TYPE=MyISAM; - # -------------------------------------------------------- - # # Table structure for table `stories` --- 1,2 ---- *************** *** 76,78 **** ) TYPE=MyISAM; ! INSERT INTO topics VALUES (1,0,'xoops.gif','XOOPS') \ No newline at end of file --- 44,46 ---- ) TYPE=MyISAM; ! INSERT INTO topics VALUES (1,0,'xoops.gif','XOOPS'); |
From: <ok...@us...> - 2003-01-07 21:33:36
|
Update of /cvsroot/xoops/xoops2/modules/news/class In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/news/class Modified Files: class.newsstory.php Log Message: added global comments feature Index: class.newsstory.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/class/class.newsstory.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** class.newsstory.php 2 Jan 2003 19:32:36 -0000 1.1 --- class.newsstory.php 7 Jan 2003 21:32:29 -0000 1.2 *************** *** 40,44 **** $this->db =& Database::getInstance(); $this->table = $this->db->prefix("stories"); - $this->commentstable = $this->db->prefix("comments"); $this->topicstable = $this->db->prefix("topics"); if (is_array($storyid)) { --- 40,43 ---- |
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 --- |
From: <ok...@us...> - 2003-01-07 21:33:33
|
Update of /cvsroot/xoops/xoops2/install In directory sc8-pr-cvs1:/tmp/cvs-serv14503/install Modified Files: index.php Log Message: added global comments feature Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/install/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 6 Jan 2003 09:07:18 -0000 1.6 --- index.php 7 Jan 2003 21:31:58 -0000 1.7 *************** *** 874,877 **** --- 874,878 ---- `hassearch` tinyint(1) unsigned NOT NULL default '0', `hasconfig` tinyint(1) unsigned NOT NULL default '0', + hascomments tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`mid`), KEY `hasmain` (`hasmain`), *************** *** 891,895 **** } ! $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix("modules")." VALUES (1, '"._MI_SYSTEM_NAME."', 100, ".time().", 0, 1, 'system', 0, 1, 0, 0)"); --- 892,896 ---- } ! $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix("modules")." VALUES (1, '"._MI_SYSTEM_NAME."', 100, ".time().", 0, 1, 'system', 0, 1, 0, 0, 0)"); *************** *** 1280,1284 **** `user_msnm` varchar(100) NOT NULL default '', `pass` varchar(32) NOT NULL default '', ! `posts` mediumint(8) NOT NULL default '0', `attachsig` TINYINT(1) unsigned NOT NULL default '0', `rank` smallint(5) unsigned NOT NULL default '0', --- 1281,1285 ---- `user_msnm` varchar(100) NOT NULL default '', `pass` varchar(32) NOT NULL default '', ! `posts` mediumint(8) unsigned NOT NULL default '0', `attachsig` TINYINT(1) unsigned NOT NULL default '0', `rank` smallint(5) unsigned NOT NULL default '0', *************** *** 1859,1862 **** --- 1860,1900 ---- } $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('imgset_themeset_link')." VALUES (1, 'default')"); + + + $result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix('comments')." ( + com_id mediumint(8) unsigned NOT NULL auto_increment, + com_pid mediumint(8) unsigned NOT NULL default '0', + com_rootid mediumint(8) unsigned NOT NULL default '0', + com_modid smallint(5) unsigned NOT NULL default '0', + com_itemid mediumint(8) unsigned NOT NULL default '0', + com_icon varchar(25) NOT NULL default '', + com_created int(10) unsigned NOT NULL default '0', + com_modified int(10) unsigned NOT NULL default '0', + com_uid mediumint(8) unsigned NOT NULL default '0', + com_ip varchar(15) NOT NULL default '', + com_title varchar(255) NOT NULL default '', + com_text text NOT NULL, + com_sig tinyint(1) unsigned NOT NULL default '0', + com_status tinyint(1) unsigned NOT NULL default '0', + dohtml tinyint(1) unsigned NOT NULL default '0', + dosmiley tinyint(1) unsigned NOT NULL default '0', + doxcode tinyint(1) unsigned NOT NULL default '0', + doimage tinyint(1) unsigned NOT NULL default '0', + dobr tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (com_id), + KEY com_pid (com_pid), + KEY com_itemid (com_itemid), + KEY com_uid (com_uid), + KEY com_title (com_title(40)) + ) TYPE=MyISAM"); + + if (!$result) { + for ($i = 0; $i < count($madetables); $i++) { + $xoopsDB->queryF("DROP table ".$madetables[$i].""); + } + dieXoopsInstall("<b>".sprintf(_INSTALL_L44, $xoopsDB->prefix('comments'))."</b>"); + } else { + array_push($madetables, $xoopsDB->prefix('comments')); + } $result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix('online')." ( |
From: <ok...@us...> - 2003-01-07 21:33:14
|
Update of /cvsroot/xoops/xoops2/modules/news/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14503/modules/news/admin Modified Files: index.php Log Message: added global comments feature Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/news/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 6 Jan 2003 20:23:50 -0000 1.2 --- index.php 7 Jan 2003 21:32:08 -0000 1.3 *************** *** 448,451 **** --- 448,452 ---- $story = new NewsStory($storyid); $story->delete(); + xoops_comment_delete($xoopsModule->getVar('mid'), $storyid); redirect_header(XOOPS_ADMIN_URL,1,_AM_DBUPDATED); exit(); |
From: <ok...@us...> - 2003-01-07 21:33:12
|
Update of /cvsroot/xoops/xoops2/kernel/object/object In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/object/object Modified Files: object.php Log Message: added global comments feature Index: object.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/object/object/object.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** object.php 5 Jan 2003 19:56:13 -0000 1.6 --- object.php 7 Jan 2003 21:32:07 -0000 1.7 *************** *** 207,215 **** case 1: $ts =& MyTextSanitizer::getInstance(); ! $html = (!isset($this->vars['nohtml']['value']) || intval($this->vars['nohtml']['value']) > 0) ? 0 : 1; ! $xcode = (!empty($this->vars['noxcode']['value'])) ? 0 : 1; ! $smiley = (!empty($this->vars['nosmiley']['value'])) ? 0 : 1; ! $image = (!empty($this->vars['noimage']['value'])) ? 0 : 1; ! $ret =& $ts->displayTarea($ret, $html, $smiley, $xcode, $image); break 1; case 2: --- 207,216 ---- case 1: $ts =& MyTextSanitizer::getInstance(); ! $html = !empty($this->vars['dohtml']['value']) ? 1 : 0; ! $xcode = (!isset($this->vars['doxcode']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $smiley = (!isset($this->vars['dosmiley']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $image = (!isset($this->vars['doimage']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $br = (!isset($this->vars['dobr']['value']) || $this->vars['dobr']['value'] == 1) ? 1 : 0; ! $ret =& $ts->displayTarea($ret, $html, $smiley, $xcode, $image, $br); break 1; case 2: *************** *** 218,226 **** case 3: $ts =& MyTextSanitizer::getInstance(); ! $html = (!isset($this->vars['nohtml']['value']) || intval($this->vars['nohtml']['value']) > 0) ? 0 : 1; ! $xcode = (!empty($this->vars['noxcode']['value'])) ? 0 : 1; ! $smiley = (!empty($this->vars['nosmiley']['value'])) ? 0 : 1; ! $image = (!empty($this->vars['noimage']['value'])) ? 0 : 1; ! $ret =& $ts->previewTarea($ret, $html, $smiley, $xcode, $image); break 1; case 4: --- 219,228 ---- case 3: $ts =& MyTextSanitizer::getInstance(); ! $html = !empty($this->vars['dohtml']['value']) ? 1 : 0; ! $xcode = (!isset($this->vars['doxcode']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $smiley = (!isset($this->vars['dosmiley']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $image = (!isset($this->vars['doimage']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0; ! $br = (!isset($this->vars['dobr']['value']) || $this->vars['dobr']['value'] == 1) ? 1 : 0; ! $ret =& $ts->previewTarea($ret, $html, $smiley, $xcode, $image, $br); break 1; case 4: |
From: <ok...@us...> - 2003-01-07 21:33:12
|
Update of /cvsroot/xoops/xoops2/kernel/module/object In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/module/object Modified Files: module.php Log Message: added global comments feature Index: module.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/module/object/module.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** module.php 5 Jan 2003 18:25:19 -0000 1.2 --- module.php 7 Jan 2003 21:32:06 -0000 1.3 *************** *** 51,54 **** --- 51,55 ---- $this->initVar('hassearch', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasconfig', XOBJ_DTYPE_INT, 0, false); + $this->initVar('hascomments', XOBJ_DTYPE_INT, 0, false); } *************** *** 65,72 **** --- 66,75 ---- $hassearch = (isset($this->modinfo['hasSearch']) && $this->modinfo['hasSearch'] == 1) ? 1 : 0; $hasconfig = isset($this->modinfo['config']) && is_array($this->modinfo['config']) ? 1 : 0; + $hascomments = (isset($this->modinfo['hasComments']) && $this->modinfo['hasComments'] == 1) ? 1 : 0; $this->setVar('hasmain', $hasmain); $this->setVar('hasadmin', $hasadmin); $this->setVar('hassearch', $hassearch); $this->setVar('hasconfig', $hasconfig); + $this->setVar('hascomments', $hascomments); } |
From: <ok...@us...> - 2003-01-07 21:33:10
|
Update of /cvsroot/xoops/xoops2/kernel/module/manager In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/module/manager Modified Files: module.php Log Message: added global comments feature Index: module.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/module/manager/module.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** module.php 5 Jan 2003 18:25:19 -0000 1.3 --- module.php 7 Jan 2003 21:32:03 -0000 1.4 *************** *** 118,124 **** if ($module->isNew()) { $mid = $this->db->genId('modules_mid_seq'); ! $sql = sprintf("INSERT INTO %s (mid, name, version, last_update, weight, isactive, dirname, hasmain, hasadmin, hassearch, hasconfig) VALUES (%u, '%s', %u, %u, %u, %u, '%s', %u, %u, %u, %u)", $this->db->prefix('modules'), $mid, $name, $version, time(), $weight, 1, $dirname, $hasmain, $hasadmin, $hassearch, $hasconfig); } else { ! $sql = sprintf("UPDATE %s SET name = '%s', dirname = '%s', version = %u, last_update = %u, weight = %u, isactive = %u, hasmain = %u, hasadmin = %u, hassearch = %u, hasconfig = %u WHERE mid = %u", $this->db->prefix('modules'), $name, $dirname, $version, time(), $weight, $isactive, $hasmain, $hasadmin, $hassearch, $hasconfig, $mid); } if (!$result = $this->db->query($sql)) { --- 118,124 ---- if ($module->isNew()) { $mid = $this->db->genId('modules_mid_seq'); ! $sql = sprintf("INSERT INTO %s (mid, name, version, last_update, weight, isactive, dirname, hasmain, hasadmin, hassearch, hasconfig, hascomments) VALUES (%u, '%s', %u, %u, %u, %u, '%s', %u, %u, %u, %u, %u)", $this->db->prefix('modules'), $mid, $name, $version, time(), $weight, 1, $dirname, $hasmain, $hasadmin, $hassearch, $hasconfig, $hascomments); } else { ! $sql = sprintf("UPDATE %s SET name = '%s', dirname = '%s', version = %u, last_update = %u, weight = %u, isactive = %u, hasmain = %u, hasadmin = %u, hassearch = %u, hasconfig = %u, hascomments = %u WHERE mid = %u", $this->db->prefix('modules'), $name, $dirname, $version, time(), $weight, $isactive, $hasmain, $hasadmin, $hassearch, $hasconfig, $hascomments, $mid); } if (!$result = $this->db->query($sql)) { |
From: <ok...@us...> - 2003-01-07 21:33:08
|
Update of /cvsroot/xoops/xoops2/install/templates/default_skin In directory sc8-pr-cvs1:/tmp/cvs-serv14503/install/templates/default_skin Modified Files: style.css styleMAC.css styleNN.css Log Message: added global comments feature Index: style.css =================================================================== RCS file: /cvsroot/xoops/xoops2/install/templates/default_skin/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** style.css 7 Jan 2003 06:51:54 -0000 1.2 --- style.css 7 Jan 2003 21:31:59 -0000 1.3 *************** *** 88,90 **** div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} \ No newline at end of file --- 88,104 ---- div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} ! ! ! .comTitle {font-weight: bold; margin-bottom: 2px;} ! .comText {padding: 2px;} ! .comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;} ! .comUserStatCaption {font-weight: normal;} ! .comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;} ! .comUserRank {margin: 2px;} ! .comUserRankText {font-size: 10px;font-weight:bold;} ! .comUserRankImg {border: 0;} ! .comUserName {} ! .comUserImg {margin: 2px;} ! .comDate {font-weight: normal; font-style: italic; font-size: smaller} ! .comDateCaption {font-weight: bold; font-style: normal;} \ No newline at end of file Index: styleMAC.css =================================================================== RCS file: /cvsroot/xoops/xoops2/install/templates/default_skin/styleMAC.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** styleMAC.css 7 Jan 2003 06:51:54 -0000 1.2 --- styleMAC.css 7 Jan 2003 21:32:01 -0000 1.3 *************** *** 88,90 **** div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} \ No newline at end of file --- 88,104 ---- div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} ! ! ! .comTitle {font-weight: bold; margin-bottom: 2px;} ! .comText {padding: 2px;} ! .comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;} ! .comUserStatCaption {font-weight: normal;} ! .comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;} ! .comUserRank {margin: 2px;} ! .comUserRankText {font-size: 10px;font-weight:bold;} ! .comUserRankImg {border: 0;} ! .comUserName {} ! .comUserImg {margin: 2px;} ! .comDate {font-weight: normal; font-style: italic; font-size: smaller} ! .comDateCaption {font-weight: bold; font-style: normal;} \ No newline at end of file Index: styleNN.css =================================================================== RCS file: /cvsroot/xoops/xoops2/install/templates/default_skin/styleNN.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** styleNN.css 7 Jan 2003 06:51:54 -0000 1.2 --- styleNN.css 7 Jan 2003 21:32:01 -0000 1.3 *************** *** 88,90 **** div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} \ No newline at end of file --- 88,104 ---- div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold;} ! div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid #silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666;} ! ! ! .comTitle {font-weight: bold; margin-bottom: 2px;} ! .comText {padding: 2px;} ! .comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;} ! .comUserStatCaption {font-weight: normal;} ! .comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;} ! .comUserRank {margin: 2px;} ! .comUserRankText {font-size: 10px;font-weight:bold;} ! .comUserRankImg {border: 0;} ! .comUserName {} ! .comUserImg {margin: 2px;} ! .comDate {font-weight: normal; font-style: italic; font-size: smaller} ! .comDateCaption {font-weight: bold; font-style: normal;} \ No newline at end of file |
From: <ok...@us...> - 2003-01-07 21:33:02
|
Update of /cvsroot/xoops/xoops2/class In directory sc8-pr-cvs1:/tmp/cvs-serv14503/class Modified Files: xoopsstory.php Added Files: commentrenderer.php tree.php Log Message: added global comments feature --- NEW FILE: commentrenderer.php --- <?php // $Id: commentrenderer.php,v 1.1 2003/01/07 21:31:56 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 // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // // Project: The XOOPS Project (http://www.xoops.org/) // // ------------------------------------------------------------------------- // class XoopsCommentRenderer { var $_tpl; var $_comments = null; var $_useIcons = true; var $_doIconCheck = false; var $_memberHandler; var $_statusText; function XoopsCommentRenderer(&$tpl, $use_icons = true, $do_iconcheck = false) { $this->_tpl =& $tpl; $this->_useIcons = $use_icons; $this->_doIconCheck = $do_iconcheck; $this->_memberHandler =& xoops_gethandler('member'); $this->_statusText = array(XOOPS_COMMENT_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'._CM_PENDING.'</span>', XOOPS_COMMENT_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._CM_ACTIVE.'</span>', XOOPS_COMMENT_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._CM_HIDDEN.'</span>'); } function &instance(&$tpl, $use_icons = true, $do_iconcheck = false) { static $instance; if (!isset($instance)) { $instance = new XoopsCommentRenderer($tpl, $use_icons, $do_iconcheck); } return $instance; } function setComments(&$comments_arr) { if (isset($this->_comments)) { unset($this->_comments); } $this->_comments =& $comments_arr; } function renderFlatView($admin_view = false) { $count = count($this->_comments); for ($i = 0; $i < $count; $i++) { if (false != $this->_useIcons) { $title = $this->_getTitleIcon($this->_comments[$i]->getVar('com_icon')).' '.$this->_comments[$i]->getVar('com_title'); } else { $title = $this->_comments[$i]->getVar('com_title'); } $poster = $this->_getPosterArray($this->_comments[$i]->getVar('com_uid')); if (false != $admin_view) { $text = $this->_comments[$i]->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$this->_comments[$i]->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$this->_comments[$i]->getVar('com_ip').'</span></div>'; } else { // hide comments that are not active if (XOOPS_COMMENT_ACTIVE != $this->_comments[$i]->getVar('com_status')) { continue; } else { $text = $this->_comments[$i]->getVar('com_text'); } } $this->_tpl->append('comments', array('id' => $this->_comments[$i]->getVar('com_id'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($this->_comments[$i]->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($this->_comments[$i]->getVar('com_modified'), 'm'), 'poster' => $poster)); } } function renderThreadView($comment_id = 0, $admin_view = false, $show_nav = true) { include_once XOOPS_ROOT_PATH.'/class/tree.php'; // construct comment tree $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid'); $tree =& $xot->getTree(); if (false != $this->_useIcons) { $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).' '.$tree[$comment_id]['obj']->getVar('com_title'); } else { $title = $tree[$comment_id]['obj']->getVar('com_title'); } if (false != $show_nav && $tree[$comment_id]['obj']->getVar('com_pid') != 0) { $this->_tpl->assign('lang_top', _CM_TOP); $this->_tpl->assign('lang_parent', _CM_PARENT); $this->_tpl->assign('show_threadnav', true); } else { $this->_tpl->assign('show_threadnav', false); } if (false != $admin_view) { // admins can see all $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>'; } else { // hide comments that are not active if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) { // if there are any child comments, display them as root comments if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { foreach ($tree[$comment_id]['child'] as $child_id) { $this->renderThreadView($child_id, $admin_view, false); } } return; } else { $text = $tree[$comment_id]['obj']->getVar('com_text'); } } $replies = array(); $this->_renderThreadReplies($tree, $comment_id, $replies, ' ', $admin_view); $show_replies = (count($replies) > 0) ? true : false; $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies, 'show_replies' => $show_replies)); } function _renderThreadReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0, $current_prefix = '') { if ($depth > 0) { if (false != $this->_useIcons) { $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).' '.$thread[$key]['obj']->getVar('com_title'); } else { $title = $thread[$key]['obj']->getVar('com_title'); } $title = (false != $admin_view) ? $title.' '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')] : $title; $replies[] = array('id' => $key, 'prefix' => $current_prefix, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'title' => $title, 'root_id' => $thread[$key]['obj']->getVar('com_rootid'), 'status' => $this->_statusText[$thread[$key]['obj']->getVar('com_status')], 'poster' => $this->_getPosterName($thread[$key]['obj']->getVar('com_uid'))); $current_prefix .= $prefix; } if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) { $depth++; foreach ($thread[$key]['child'] as $childkey) { if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) { // skip this comment if it is not active and continue on processing its child comments instead if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) { foreach ($thread[$childkey]['child'] as $childchildkey) { $this->_renderThreadReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth); } } } else { $this->_renderThreadReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth, $current_prefix); } } } } function renderNestView($comment_id = 0, $admin_view = false) { include_once XOOPS_ROOT_PATH.'/class/tree.php'; $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid'); $tree =& $xot->getTree(); if (false != $this->_useIcons) { $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).' '.$tree[$comment_id]['obj']->getVar('com_title'); } else { $title = $tree[$comment_id]['obj']->getVar('com_title'); } if (false != $admin_view) { $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>'; } else { // skip this comment if it is not active and continue on processing its child comments instead if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) { // if there are any child comments, display them as root comments if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) { foreach ($tree[$comment_id]['child'] as $child_id) { $this->renderNestView($child_id, $admin_view); } } return; } else { $text = $tree[$comment_id]['obj']->getVar('com_text'); } } $replies = array(); $this->_renderNestReplies($tree, $comment_id, $replies, 25, $admin_view); $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies)); } function _renderNestReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0) { if ($depth > 0) { if (false != $this->_useIcons) { $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).' '.$thread[$key]['obj']->getVar('com_title'); } else { $title = $thread[$key]['obj']->getVar('com_title'); } $text = (false != $admin_view) ? $thread[$key]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$thread[$key]['obj']->getVar('com_ip').'</span></div>' : $thread[$key]['obj']->getVar('com_text'); $replies[] = array('id' => $key, 'prefix' => $prefix, 'pid' => $thread[$key]['obj']->getVar('com_pid'), 'itemid' => $thread[$key]['obj']->getVar('com_itemid'), 'rootid' => $thread[$key]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($thread[$key]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($thread[$key]['obj']->getVar('com_uid'))); $prefix = $prefix + 25; } if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) { $depth++; foreach ($thread[$key]['child'] as $childkey) { if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) { // skip this comment if it is not active and continue on processing its child comments instead if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) { foreach ($thread[$childkey]['child'] as $childchildkey) { $this->_renderNestReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth); } } } else { $this->_renderNestReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth); } } } } function _getPosterName($poster_id) { $poster['id'] = intval($poster_id); if ($poster['id'] > 0) { $com_poster =& $this->_memberHandler->getUser($poster_id); $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>'; } else { $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous']; } return $poster; } function _getPosterArray($poster_id) { $poster['id'] = intval($poster_id); if ($poster['id'] > 0) { $com_poster =& $this->_memberHandler->getUser($poster_id); $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>'; $poster_rank = $com_poster->rank(); if ( $poster_rank['image'] != '' ) { $poster['rank_image'] = $poster_rank['image']; } $poster['rank_title'] = $poster_rank['title']; $poster['avatar'] = $com_poster->getVar('user_avatar'); $poster['regdate'] = formatTimestamp($com_poster->getVar('user_regdate'), 's'); $poster['from'] = $com_poster->getVar('user_from'); $poster['postnum'] = $com_poster->getVar('posts'); $poster['status'] = $com_poster->isOnline() ? _CM_ONLINE : ''; } else { $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous']; $poster['rank_title'] = ''; $poster['avatar'] = 'blank.gif'; $poster['regdate'] = ''; $poster['from'] = ''; $poster['postnum'] = 0; $poster['status'] = ''; } return $poster; } function _getTitleIcon($icon_image) { if ($icon_image != '') { if (false != $this->_doIconCheck) { if (!file_exists(XOOPS_URL.'/images/subject/'.$icon_image)) { return '<img src="'.XOOPS_URL.'/images/icons/posticon.gif" alt="" />'; } else { return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />'; } } else { return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />'; } } return '<img src="'.XOOPS_URL.'/images/icons/posticon.gif" alt="" />'; } } ?> --- NEW FILE: tree.php --- <?php // $Id: tree.php,v 1.1 2003/01/07 21:31:58 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 // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // // Project: The XOOPS Project (http://www.xoops.org/) // // ------------------------------------------------------------------------- // class XoopsObjectTree { var $_parentId; var $_myId; var $_rootId = null; var $_tree = array(); var $_objects; function XoopsObjectTree(&$objectArr, $myId, $parentId, $rootId = null) { $this->_objects =& $objectArr; $this->_myId = $myId; $this->_parentId = $parentId; if (isset($rootId)) { $this->_rootId = $rootId; } $this->_initialize(); } function _initialize() { $count = count($this->_objects); for ($i = 0; $i < $count; $i++) { $key1 = $this->_objects[$i]->getVar($this->_myId); $this->_tree[$key1]['obj'] =& $this->_objects[$i]; $key2 = $this->_objects[$i]->getVar($this->_parentId); $this->_tree[$key1]['parent'] = $key2; $this->_tree[$key2]['child'][] = $key1; if (isset($this->_rootId)) { $this->_tree[$key1]['root'] = $this->_objects[$i]->getVar($this->_rootId); } } } function &getTree() { return $this->_tree; } function &getFirstChild($key) { $ret = array(); if (isset($this->_tree[$key]['child'])) { foreach ($this->_tree[$key]['child'] as $childkey) { $ret[$childkey] =& $this->_tree[$childkey]['obj']; } } return $ret; } function &getAllChild($key, $ret = array()) { if (isset($this->_tree[$key]['child'])) { foreach ($this->_tree[$key]['child'] as $childkey) { $ret[$childkey] =& $this->_tree[$childkey]['obj']; $children =& $this->getAllChild($childkey, $ret); $count = count($children); foreach (array_keys($children) as $newkey) { $ret[$newkey] =& $children[$newkey]; } } } return $ret; } function _makeSelBoxOptions($fieldName, $key, &$ret, $prefix, $original=null) { $original = !isset($original) ? $prefix : $original; if ($key > 0) { $ret .= '<option value="'.$this->_tree[$key]['obj']->getVar($this->_myId).'">'.$prefix.$this->_tree[$key]['obj']->getVar($fieldName).'</option>'; $prefix .= $original; } if (isset($this->_tree[$key]['child']) && !empty($this->_tree[$key]['child'])) { foreach ($this->_tree[$key]['child'] as $childkey) { $this->_makeSelBoxOptions($fieldName, $childkey, $ret, $prefix, $original); } } } function &makeSelBox($name, $fieldName, $key=0, $prefix='-') { $ret = '<select name='.$name.'>'; $this->_makeSelBoxOptions($fieldName, $key, $ret, $prefix); return $ret.'</select>'; } } ?> Index: xoopsstory.php =================================================================== RCS file: /cvsroot/xoops/xoops2/class/xoopsstory.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xoopsstory.php 2 Jan 2003 15:15:24 -0000 1.1 --- xoopsstory.php 7 Jan 2003 21:31:54 -0000 1.2 *************** *** 30,34 **** // ------------------------------------------------------------------------- // - include_once XOOPS_ROOT_PATH."/class/xoopscomments.php"; include_once XOOPS_ROOT_PATH."/class/xoopstopic.php"; include_once XOOPS_ROOT_PATH."/class/xoopsuser.php"; --- 30,33 ---- *************** *** 56,60 **** var $topicalign; var $db; - var $commentstable; var $topicstable; --- 55,58 ---- *************** *** 63,67 **** $this->db =& Database::getInstance(); $this->table = ""; - $this->commentstable = ""; $this->topicstable = ""; if ( is_array($storyid) ) { --- 61,64 ---- *************** *** 220,232 **** return false; } - if ( isset($this->commentstable) && $this->commentstable != "" ) { - $commentsarray = array(); - $com = new XoopsComments($this->commentstable,"storyid"); - $criteria = array("item_id=".$this->storyid."", "pid=0"); - $commentsarray = $com->getAllComments($criteria); - foreach($commentsarray as $comment){ - $comment->delete(); - } - } return true; } --- 217,220 ---- *************** *** 409,419 **** } return $this->topicalign; - } - - function getCommentsCount() - { - $result = $this->db->query("SELECT COUNT(*) FROM ".$this->commentstable." WHERE item_id=".$this->storyid.""); - list($count) = $this->db->fetchRow($result); - return $count; } } --- 397,400 ---- |
From: <ok...@us...> - 2003-01-07 21:33:01
|
Update of /cvsroot/xoops/xoops2/kernel/comment/object In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/comment/object Added Files: comment.php Log Message: added global comments feature --- NEW FILE: comment.php --- <?php // $Id: comment.php,v 1.1 2003/01/07 21:32:56 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 // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // // Project: The XOOPS Project (http://www.xoops.org/) // // ------------------------------------------------------------------------- // require_once XOOPS_ROOT_PATH.'/kernel/object/object/object.php'; class XoopsComment extends XoopsObject { function XoopsComment() { $this->XoopsObject(); $this->initVar('com_id', XOBJ_DTYPE_INT, NULL, false); $this->initVar('com_pid', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_modid', XOBJ_DTYPE_INT, NULL, false); $this->initVar('com_icon', XOBJ_DTYPE_OTHER, NULL, false); $this->initVar('com_title', XOBJ_DTYPE_TXTBOX, NULL, true, 255, true); $this->initVar('com_text', XOBJ_DTYPE_TXTAREA, NULL, true, NULL, true); $this->initVar('com_created', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_modified', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_uid', XOBJ_DTYPE_INT, 0, true); $this->initVar('com_ip', XOBJ_DTYPE_OTHER, NULL, false); $this->initVar('com_sig', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_itemid', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_rootid', XOBJ_DTYPE_INT, 0, false); $this->initVar('com_status', XOBJ_DTYPE_INT, 0, false); $this->initVar('dohtml', XOBJ_DTYPE_INT, 0, false); $this->initVar('dosmiley', XOBJ_DTYPE_INT, 0, false); $this->initVar('doxcode', XOBJ_DTYPE_INT, 0, false); $this->initVar('doimage', XOBJ_DTYPE_INT, 0, false); $this->initVar('dobr', XOBJ_DTYPE_INT, 0, false); } function isRoot() { return ($this->getVar('com_id') == $this->getVar('com_rootid')); } } ?> |
From: <ok...@us...> - 2003-01-07 21:32:59
|
Update of /cvsroot/xoops/xoops2/kernel/comment/manager In directory sc8-pr-cvs1:/tmp/cvs-serv14503/kernel/comment/manager Added Files: comment.php Log Message: added global comments feature --- NEW FILE: comment.php --- <?php // $Id: comment.php,v 1.1 2003/01/07 21:32:53 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 // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // // Project: The XOOPS Project (http://www.xoops.org/) // // ------------------------------------------------------------------------- // include_once XOOPS_ROOT_PATH.'/kernel/comment/object/comment.php'; /** * XOOPS comment manager class. * This class is responsible for providing data access mechanisms to the data source * of XOOPS comment class objects. * * * @author Kazumi Ono <on...@xo...> */ class XoopsCommentManager extends XoopsObjectManager { function XoopsCommentManager(&$db, &$mf) { $this->XoopsObjectManager($db, $mf); } function &instance(&$db, &$mf) { static $instance; if (!isset($instance)) { $instance = new XoopsCommentManager($db, $mf); } return $instance; } function &create($isNew = true) { $comment = new XoopsComment(); if ($isNew) { $comment->setNew(); } return $comment; } function &get($id) { $id = intval($id); if ($id > 0) { $sql = 'SELECT * FROM '.$this->db->prefix('comments').' WHERE com_id='.$id; if (!$result = $this->db->query($sql)) { return false; } $numrows = $this->db->getRowsNum($result); if ($numrows == 1) { $comment = new XoopsComment(); $comment->assignVars($this->db->fetchArray($result)); return $comment; } } return false; } function insert(&$comment) { if (get_class($comment) != 'xoopscomment') { return false; } if (!$comment->isDirty()) { return true; } if (!$comment->cleanVars()) { return false; } foreach ($comment->cleanVars as $k => $v) { ${$k} = $v; } if ($comment->isNew()) { $com_id = $this->db->genId('comments_com_id_seq'); $sql = sprintf("INSERT INTO %s (com_id, com_pid, com_modid, com_icon, com_title, com_text, com_created, com_modified, com_uid, com_ip, com_sig, com_itemid, com_rootid, com_status, dohtml, dosmiley, doxcode, doimage, dobr) VALUES (%u, %u, %u, '%s', '%s', '%s', %u, %u, %u, '%s', %u, %u, %u, %u, %u, %u, %u, %u, %u)", $this->db->prefix('comments'), $com_id, $com_pid, $com_modid, $com_icon, $com_title, $com_text, $com_created, $com_modified, $com_uid, $com_ip, $com_sig, $com_itemid, $com_rootid, $com_status, $dohtml, $dosmiley, $doxcode, $doimage, $dobr); } else { $sql = sprintf("UPDATE %s SET com_pid = %u, com_icon = '%s', com_title = '%s', com_text = '%s', com_created = %u, com_modified = %u, com_uid = %u, com_ip = '%s', com_sig = %u, com_itemid = %u, com_rootid = %u, com_status = %u, dohtml = %u, dosmiley = %u, doxcode = %u, doimage = %u, dobr = %u WHERE com_id = %u", $this->db->prefix('comments'), $com_pid, $com_icon, $com_title, $com_text, $com_created, $com_modified, $com_uid, $com_ip, $com_sig, $com_itemid, $com_rootid, $com_status, $dohtml, $dosmiley, $doxcode, $doimage, $dobr, $com_id); } if (!$result = $this->db->query($sql)) { return false; } if (empty($com_id)) { $com_id = $this->db->getInsertId(); $comment->assignVar('com_id', $com_id); } return true; } function delete(&$comment) { if (get_class($comment) != 'xoopscomment') { return false; } $sql = sprintf("DELETE FROM %s WHERE com_id = %u", $this->db->prefix('comments'), $comment->getVar('com_id')); if (!$result = $this->db->query($sql)) { return false; } return true; } function &getObjects($criteria = null) { $ret = array(); $limit = $start = 0; $sql = 'SELECT * FROM '.$this->db->prefix('comments'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' '.$criteria->renderWhere(); $sql .= ' ORDER BY com_id '.$criteria->getOrder(); $limit = $criteria->getLimit(); $start = $criteria->getStart(); } $result = $this->db->query($sql, $limit, $start); if (!$result) { return false; } while ($myrow = $this->db->fetchArray($result)) { $comment = new XoopsComment(); $comment->assignVars($myrow); $ret[] =& $comment; unset($comment); } return $ret; } function getCount($criteria = null) { $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('comments'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' '.$criteria->renderWhere(); } if (!$result =& $this->db->query($sql)) { return false; } list($count) = $this->db->fetchRow($result); return $count; } function deleteAll($criteria = null) { $sql = 'DELETE FROM '.$this->db->prefix('comments'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' '.$criteria->renderWhere(); } if (!$result = $this->db->query($sql)) { return false; } return true; } /* function updateAll($fieldname, $fieldvalue, $criteria = null) { $set_clause = is_numeric($fieldvalue) ? $filedname.' = '.$fieldvalue : $filedname." = '".$fieldvalue."'"; $sql = 'UPDATE '.$this->db->prefix('comments').' SET '.$set_clause; if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' '.$criteria->renderWhere(); } if (!$result = $this->db->query($sql)) { return false; } return true; } */ } ?> |