You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2005-04-02 20:37:11
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30024/modules/mx_kb/language/lang_english Modified Files: lang_kb.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_kb.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** lang_kb.php 1 Apr 2005 14:14:49 -0000 1.17 --- lang_kb.php 2 Apr 2005 20:37:03 -0000 1.18 *************** *** 389,391 **** --- 389,395 ---- $lang['No_cat_comments_forum_id'] = 'Comments are enabled but you have not specified the target phpBB forum category in the KB adminCP - Cateogries'; + // Quick Nav + $lang['Quick_nav'] = 'Quick KB Navigation'; + $lang['Quick_jump'] = 'Go'; + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-02 20:36:20
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/admin Modified Files: admin_kb_art.php admin_kb_cat.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_cat.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_kb_cat.php 1 Apr 2005 14:12:28 -0000 1.3 --- admin_kb_cat.php 2 Apr 2005 20:35:40 -0000 1.4 *************** *** 188,191 **** --- 188,197 ---- 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', + + 'S_GUEST' => AUTH_ALL, + 'S_USER' => AUTH_REG, + 'S_PRIVATE' => AUTH_ACL, + 'S_MOD' => AUTH_MOD, + 'S_ADMIN' => AUTH_ADMIN ) ); } *************** *** 229,233 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$view_post', '$view_rate', '$comment_level', '$comment_edit', '$comment_delete', '$approval', '$approval_edit', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 235,240 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 620,623 **** --- 627,631 ---- } + $ss = 0; while ( $category = $db->sql_fetchrow( $cat_result ) ) { *************** *** 642,647 **** $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $i % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category_link, --- 650,655 ---- $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category_link, *************** *** 659,663 **** $i++; ! get_kb_cat_subs_admin( $category_id, '1', '-> ' ); } break; --- 667,672 ---- $i++; ! $ss++; ! $ss = get_kb_cat_subs_admin( $category_id, '1', ' ', $ss ); } break; Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_art.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_kb_art.php 1 Apr 2005 20:38:43 -0000 1.4 --- admin_kb_art.php 2 Apr 2005 20:35:40 -0000 1.5 *************** *** 127,130 **** --- 127,142 ---- $topic_sql = ''; + $kb_comment = array(); + + // Populate the kb_comment variable + $kb_comment = kb_get_data($row, $userdata ); + + // Compose post header + $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; + $message_temp = kb_compose_comment( $kb_comment ); + + $kb_message = $message_temp['message']; + $kb_update_message = $message_temp['update_message']; + // Insert comment, if not already present if ( $kb_config['use_comments'] ) *************** *** 132,147 **** if ( !$row['topic_id'] ) { - $kb_comment = array(); - - // Populate the kb_comment variable - $kb_comment = kb_get_data($row, $userdata); - - // Compose post header - $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; - $message_temp = kb_compose_comment( $kb_comment ); - - $kb_message = $message_temp['message']; - $kb_update_message = $message_temp['update_message']; - // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); --- 144,147 ---- *************** *** 162,165 **** --- 162,166 ---- update_kb_number( $article_category_id, '+ 1' ); + kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'] ); mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); |
|
From: Jon O. <jon...@us...> - 2005-04-02 20:36:20
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/templates/subSilver Modified Files: kb_article_body.tpl kb_article_body_print.tpl kb_cat_body.tpl kb_footer.tpl Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_cat_body.tpl 1 Apr 2005 20:38:44 -0000 1.4 --- kb_cat_body.tpl 2 Apr 2005 20:35:41 -0000 1.5 *************** *** 60,64 **** <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span><br /><br /><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> --- 60,64 ---- <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span></td> </tr> </table> Index: kb_article_body_print.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_article_body_print.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_article_body_print.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_article_body_print.tpl 2 Apr 2005 20:35:41 -0000 1.3 *************** *** 73,77 **** <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> ! <td width="100%"><span class="genmed"><b>{postrow.POSTER_NAME}</b></span><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT} {postrow.POST_SUBJECT}</span></td> </tr> <tr> --- 73,77 ---- <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> ! <td width="100%"><span class="genmed"><b>{postrow.POSTER_NAME}</b></span><span class="postdetails"> {L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT} {postrow.POST_SUBJECT}</span></td> </tr> <tr> Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_article_body.tpl 1 Apr 2005 14:12:30 -0000 1.4 --- kb_article_body.tpl 2 Apr 2005 20:35:41 -0000 1.5 *************** *** 84,88 **** <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> ! <td width="100%"><span class="genmed"><b>{postrow.POSTER_NAME}</b></span><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT} {postrow.POST_SUBJECT}</span></td> </tr> <tr> --- 84,88 ---- <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> ! <td width="100%"><span class="genmed"><b>{postrow.POSTER_NAME}</b></span><span class="postdetails"> {L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT} {postrow.POST_SUBJECT}</span></td> </tr> <tr> *************** *** 105,109 **** <tr> <td><span class="nav">{PAGE_NUMBER}</span></td> ! <td align="right"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> </tr> </table> --- 105,109 ---- <tr> <td><span class="nav">{PAGE_NUMBER}</span></td> ! <td align="right"><span class="nav">{PAGINATION}</span></td> </tr> </table> *************** *** 121,125 **** <!-- END switch_ratings --> </td> - <td valign="top" align="right"><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> --- 121,124 ---- Index: kb_footer.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_footer.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_footer.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_footer.tpl 2 Apr 2005 20:35:41 -0000 1.3 *************** *** 1,7 **** ! <!-- <div align="center"><span class="copyright"><br /> ! Powered by Knowledge Base, {L_MODULE_ORIG_AUTHOR} ©2002 <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" class="copyright">PHPBB.com MOD</a><br /> ! This script ({L_MODULE_VERSION}) is modified by <a href="http://www.mx-system.com/" target="_phpbb" class="copyright">{L_MODULE_AUTHOR}</a><br /> </span></div> ! --> ! </table> \ No newline at end of file --- 1,43 ---- ! ! <tr> ! <td> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> ! <tr> ! <td align="left" valign="top"> ! <!-- BEGIN quick_nav --> ! <form method="get" name="jumpbox" action="{QUICK_JUMP_ACTION}" onSubmit="if(document.jumpbox.cat.value == -1){return false;}"> ! <table cellspacing="0" cellpadding="0" border="0"> ! <tr> ! <td nowrap="nowrap"><span class="gensmall">{L_QUICK_NAV} ! <select name="cat" onchange="if(this.options[this.selectedIndex].value != 0){ forms['jumpbox'].submit() }"> ! <option value="0">{L_QUICK_JUMP}</otpion> ! {QUICK_NAV} ! </select> ! <!-- <input type="hidden" name="sid" value="{SID}" /> --> ! <input type="hidden" name="mode" value="cat" /> ! <input type="submit" value="{L_QUICK_JUMP}" class="liteoption" /></span> ! </td> ! </tr> ! </table> ! </form> ! <!-- END quick_nav --> ! </td> ! <td align="right"> ! <!-- BEGIN auth_can --> ! <span class="gensmall">{S_AUTH_LIST}</span> ! <!-- END auth_can --> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! ! ! ! </table> ! ! <!-- BEGIN copy_footer --> <div align="center"><span class="copyright"><br /> ! Powered by Knowledge Base MOD, {L_MODULE_ORIG_AUTHOR} & <a href="http://www.mx-system.com/" target="_phpbb" class="copyright">{L_MODULE_AUTHOR}</a> © 2002-2005 <br /><a href="http://www.phpbb.com/phpBB/viewtopic.php?t=200195" target="_phpbb" class="copyright">PHPBB.com MOD</a> </span></div> ! <!-- END copy_footer --> |
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php kb_article.php kb_cat.php kb_footer.php kb_header.php kb_moderator.php kb_post.php kb_stats.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_stats.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_stats.php 1 Apr 2005 14:12:29 -0000 1.4 --- kb_stats.php 2 Apr 2005 20:35:40 -0000 1.5 *************** *** 35,38 **** --- 35,40 ---- // + $kb_quick_nav = get_kb_cat_list( '', 1, true, true ); + if ( !$is_block ) { Index: kb_header.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_header.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_header.php 1 Apr 2005 14:12:29 -0000 1.3 --- kb_header.php 2 Apr 2005 20:35:40 -0000 1.4 *************** *** 25,41 **** } - define( 'ALLOW_NEW', 1 ); - define( 'ALLOW_ANON', 1 ); - // Parse and show the overall header. $template->set_filenames( array( 'kb_header' => 'kb_header.tpl' ) ); - if ( isset ( $HTTP_GET_VARS['cat'] ) ) { if ( $kb_config['allow_new'] == 1 && ( $kb_is_auth['auth_post'] || $kb_is_auth['auth_mod'] ) ) { ! $temp_url = append_sid( this_kb_mxurl( "mode=add&cat=" . intval ($HTTP_GET_VARS['cat'] ) ) ); $add_article = '<a href="' . $temp_url . '">' . $lang['Add_article'] . '</a>'; } --- 25,44 ---- } // Parse and show the overall header. $template->set_filenames( array( 'kb_header' => 'kb_header.tpl' ) ); if ( isset ( $HTTP_GET_VARS['cat'] ) ) { + $category_id = intval ($HTTP_GET_VARS['cat'] ); + // Start auth check + // + $kb_is_auth = array(); + $kb_is_auth = kb_auth(AUTH_ALL, $category_id, $userdata); + // End of auth check + if ( $kb_config['allow_new'] == 1 && ( $kb_is_auth['auth_post'] || $kb_is_auth['auth_mod'] ) ) { ! $temp_url = append_sid( this_kb_mxurl( "mode=add&cat=" . $category_id ) ); $add_article = '<a href="' . $temp_url . '">' . $lang['Add_article'] . '</a>'; } *************** *** 79,83 **** if ( $kb_config['stats_list'] == 1 ) { ! get_quick_stats( intval( $HTTP_GET_VARS['cat'] ) ); } --- 82,86 ---- if ( $kb_config['stats_list'] == 1 ) { ! get_quick_stats( $category_id ); } Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_article.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_article.php 1 Apr 2005 20:38:43 -0000 1.6 --- kb_article.php 2 Apr 2005 20:35:40 -0000 1.7 *************** *** 60,67 **** // // User authorisation levels output // ! ! $kb_auth_can = ( ( $kb_is_auth['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; --- 60,67 ---- // + // // User authorisation levels output // ! $kb_auth_can = '<br />' . ( ( $kb_is_auth['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; *************** *** 73,79 **** if ( $kb_is_auth['auth_mod'] ) { ! $kb_auth_can .= $lang['KB_Rules_moderate_can'] . '<br />'; } $category = get_kb_cat( $article_category_id ); $article_category_name = $category['category_name']; --- 73,81 ---- if ( $kb_is_auth['auth_mod'] ) { ! $kb_auth_can .= $lang['KB_Rules_moderate_can']; } + $kb_quick_nav = get_kb_cat_list( $article_category_id, 1, true, true ); + $category = get_kb_cat( $article_category_id ); $article_category_name = $category['category_name']; *************** *** 292,296 **** { $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); ! message_die( GENERAL_MESSAGE, $message ); } else --- 294,298 ---- { $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } else *************** *** 299,303 **** // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata); // Compose post header --- 301,305 ---- // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata ); // Compose post header *************** *** 307,310 **** --- 309,335 ---- $kb_message = $message_temp['message']; $kb_update_message = $message_temp['update_message']; + + $topic_id_tmp = $row['topic_id']; + // + // Check if this topic exists. It could have been deleted by accident ;) If so recreate it! + // + if ( !empty($topic_id_tmp) ) + { + $sql = "SELECT * + FROM " . TOPICS_TABLE . " + WHERE topic_id = $topic_id_tmp"; + if ( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); + } + } + + // + // If the query doesn't return any rows this isn't a valid topic. Set to null. + // + if ( !($topic_row = $db->sql_fetchrow($result)) ) + { + $topic_id = 0; + } // If no phpbb topic id is created, create on ;) *************** *** 312,317 **** { // Post ! $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $userdata['article_editor'], $userdata['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET topic_id = " . $topic_data['topic_id'] . " WHERE article_id = " . $kb_comment['article_id']; --- 337,342 ---- { // Post ! $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET topic_id = " . $topic_data['topic_id'] . " WHERE article_id = " . $kb_comment['article_id']; *************** *** 422,428 **** 'COMMENTS_IMG' => $comments_img, ! 'PATH' => $path_kb, ! 'S_AUTH_LIST' => $kb_auth_can ! ) ); --- 447,451 ---- 'COMMENTS_IMG' => $comments_img, ! 'PATH' => $path_kb ) ); Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_kb.php 1 Apr 2005 20:38:43 -0000 1.7 --- functions_kb.php 2 Apr 2005 20:35:40 -0000 1.8 *************** *** 300,304 **** $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! }elseif ( $article_approved == 1 ) { // unapprove --- 300,305 ---- $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! } ! elseif ( $article_approved == 1 ) { // unapprove *************** *** 310,332 **** $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } ! else if ( $kb_is_auth['auth_mod'] ) { $category = get_kb_cat( $article_cat ); $category_name = $category['category_name']; ! if ( $article_approved == 2 || $article_approved == 0 ) ! { ! // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! }elseif ( $article_approved == 1 ) ! { ! // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; ! } ! // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 311,340 ---- $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } ! else { $category = get_kb_cat( $article_cat ); $category_name = $category['category_name']; ! if ( $kb_is_auth['auth_mod'] ) ! { ! if ( $article_approved == 2 || $article_approved == 0 ) ! { ! // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! } ! elseif ( $article_approved == 1 ) ! { ! // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; ! } ! } ! if ( $kb_is_auth['auth_delete'] || $kb_is_auth['auth_mod']) ! { ! // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); ! $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; ! } } *************** *** 546,550 **** function kb_notify( $action, $message, $to_id, $from_id ) { ! global $lang, $board_config, $kb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx; if ( $action == 2 ) // Mail --- 554,558 ---- function kb_notify( $action, $message, $to_id, $from_id ) { ! global $lang, $board_config, $kb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $userdata; if ( $action == 2 ) // Mail *************** *** 577,581 **** global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; ! if ( !$from_id ) { $from_id = $userdata['user_id']; --- 585,589 ---- global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; ! if ( empty( $from_id ) ) { $from_id = $userdata['user_id']; *************** *** 830,834 **** function get_kb_cat_index( $parent = 0 ) { ! global $db, $template, $phpbb_root_path, $mx_root_path, $module_root_path, $phpEx, $is_block, $page_id, $kb_config, $userdata; $sql = "SELECT * --- 838,842 ---- function get_kb_cat_index( $parent = 0 ) { ! global $db, $template, $phpbb_root_path, $mx_root_path, $module_root_path, $phpEx, $is_block, $page_id, $kb_config, $userdata, $kb_quick_nav; $sql = "SELECT * *************** *** 847,857 **** // Start auth check // ! $kb_is_auth = array(); ! $kb_is_auth = kb_auth(AUTH_ALL, $category['category_id'], $userdata); // End of auth check // - // Get number of articles in cat - newssuite addon $sql_num = "SELECT count(article_id) AS total --- 855,864 ---- // Start auth check // ! $kb_is_cat_auth = array(); ! $kb_is_cat_auth = kb_auth(AUTH_ALL, $category['category_id'], $userdata); // End of auth check // // Get number of articles in cat - newssuite addon $sql_num = "SELECT count(article_id) AS total *************** *** 886,890 **** $category = '<a href="' . $temp_url . '" class="forumlink">' . $category_name . '</a>'; // Newssuite operating mode ! if ( ns_auth_cat( $category_id ) && $kb_is_auth['auth_view']) { $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category, --- 893,897 ---- $category = '<a href="' . $temp_url . '" class="forumlink">' . $category_name . '</a>'; // Newssuite operating mode ! if ( ns_auth_cat( $category_id ) && $kb_is_cat_auth['auth_view']) { $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category, *************** *** 895,898 **** --- 902,907 ---- } + $kb_quick_nav = get_kb_cat_list( '', 1, true, true ); + return $template; } *************** *** 977,981 **** // gets sub categories for a category ! function get_kb_cat_subs_admin( $parent, $select = 1, $indent ) { global $db, $template, $phpbb_root_path, $module_root_path, $phpEx, $images, $row_color, $row_class, $theme, $i, $lang; --- 986,990 ---- // gets sub categories for a category ! function get_kb_cat_subs_admin( $parent, $select = 1, $indent, $ss ) { global $db, $template, $phpbb_root_path, $module_root_path, $phpEx, $images, $row_color, $row_class, $theme, $i, $lang; *************** *** 1022,1027 **** $down2 = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $i % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow.subrow', array( 'CATEGORY' => $category2, --- 1031,1036 ---- $down2 = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow.subrow', array( 'CATEGORY' => $category2, *************** *** 1029,1033 **** 'CAT_ARTICLES' => $category_articles2, ! 'INDENT' => $indent, 'U_EDIT' => $edit2, --- 1038,1042 ---- 'CAT_ARTICLES' => $category_articles2, ! 'INDENT' => $indent . '--» ', 'U_EDIT' => $edit2, *************** *** 1040,1048 **** ); ! $temp = $indent . '-> '; ! get_kb_cat_subs_admin( $category_id2, $select, $temp ); } ! return $template; } --- 1049,1058 ---- ); ! $temp = $indent . ' '; ! $ss++; ! $ss = get_kb_cat_subs_admin( $category_id2, $select, $temp, $ss ); } ! return $ss; } *************** *** 1082,1087 **** $status = ''; } ! $catlist .= "<option value=\"$category2[$idfield]\" $status>" . $indent . $category2[$namefield] . "</option>\n"; ! $temp = $indent . '-> '; $catlist .= get_kb_cat_subs_list( $category2[$idfield], $select, $selected, $temp ); } --- 1092,1097 ---- $status = ''; } ! $catlist .= "<option value=\"$category2[$idfield]\" $status>" . $indent . '--»'. $category2[$namefield] . "</option>\n"; ! $temp = $indent . ' '; $catlist .= get_kb_cat_subs_list( $category2[$idfield], $select, $selected, $temp ); } *************** *** 1140,1144 **** $catlist .= "<option value=\"$category[$idfield]\" $status>" . $category[$namefield] . "</option>\n"; ! $catlist .= get_kb_cat_subs_list( $category[$idfield], $select, $selected, ' -> ' ); } } --- 1150,1154 ---- $catlist .= "<option value=\"$category[$idfield]\" $status>" . $category[$namefield] . "</option>\n"; ! $catlist .= get_kb_cat_subs_list( $category[$idfield], $select, $selected, ' ' ); } } *************** *** 1374,1382 **** // Start KB addon - update original post -------------------------------------------------- - $sql = "SELECT topic_first_post_id FROM " . TOPICS_TABLE . " WHERE topic_id = '$topic_id'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { --- 1384,1391 ---- // Start KB addon - update original post -------------------------------------------------- $sql = "SELECT topic_first_post_id FROM " . TOPICS_TABLE . " WHERE topic_id = '$topic_id'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { *************** *** 1384,1401 **** } $row = $db->sql_fetchrow( $result ); ! $orig_post_id = $row[0]; ! $sql = "UPDATE " . TOPICS_TABLE . " SET topic_title = '$subject' WHERE topic_id = '$topic_id'"; ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { message_die( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } - $message_tmp = $message . '\n\n' . $message_update_text; - $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_subject = '$subject', --- 1393,1410 ---- } $row = $db->sql_fetchrow( $result ); ! $orig_post_id = $row[0]; ! $sql = "UPDATE " . TOPICS_TABLE . " SET topic_title = '$subject' WHERE topic_id = '$topic_id'"; ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { message_die( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } + + $message_tmp = $mode == 'newtopic' ? $message : $message . '\n\n' . $message_update_text; $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_subject = '$subject', *************** *** 1403,1416 **** post_text = '$message_tmp' WHERE post_id = '$orig_post_id'"; ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { message_die( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } - // End kb addon coe ---------------------------------------------------------- // if all is well then return the id of our new post ! return array( 'post_id' => $post_id, 'topic_id' => $topic_id ); } --- 1412,1424 ---- post_text = '$message_tmp' WHERE post_id = '$orig_post_id'"; ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { message_die( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } // End kb addon coe ---------------------------------------------------------- // if all is well then return the id of our new post ! return array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'notify' => $message_tmp ); } *************** *** 1424,1428 **** if ( !MXBB_MODULE ) { ! $mxurl = $phpbb_root_path . 'kb.' . $phpEx . ( $args == '' ? '' : '?' . $args ); return $mxurl; } --- 1432,1436 ---- if ( !MXBB_MODULE ) { ! $mxurl = $module_root_path . 'kb.' . $phpEx . ( $args == '' ? '' : '?' . $args ); return $mxurl; } *************** *** 1456,1460 **** if ( !MXBB_MODULE ) { ! $mxurl = $phpbb_root_path . 'kb_search.' . $phpEx . ( $args == '' ? '' : '?' . $args ); return $mxurl; } --- 1464,1468 ---- if ( !MXBB_MODULE ) { ! $mxurl = $module_root_path . 'kb_search.' . $phpEx . ( $args == '' ? '' : '?' . $args ); return $mxurl; } *************** *** 1674,1681 **** } ! function kb_get_data($row, $userdata, $kb_post_mode = '') { ! global $db, $lang, $username; $kb_author_data = get_kb_author( $row['article_author_id'], true ); --- 1682,1695 ---- } ! function kb_get_data($row = '', $userdata = '', $kb_post_mode = 'add') { ! global $db, $lang, $username, $kb_config; + // Debug checks + if ( empty( $row ) || empty( $userdata ) ) + { + die('kb_get_data - empty pars'); + } + $kb_author_data = get_kb_author( $row['article_author_id'], true ); *************** *** 1686,1690 **** } $cat_row = $db->sql_fetchrow( $results ); ! // Article data $kb_comment['article_id'] = $row['article_id']; --- 1700,1704 ---- } $cat_row = $db->sql_fetchrow( $results ); ! // Article data $kb_comment['article_id'] = $row['article_id']; *************** *** 1702,1706 **** // Article author $kb_comment['article_author_id'] = $row['article_author_id']; ! $kb_comment['article_author'] = $kb_post_mode == 'add' ? ( $row['article_author_id'] != -1 ? $kb_author_data['username'] : ( ( $row['username'] == '' ) ? $lang['Guest'] : $row['username'] ) ) : $row['username']; $kb_comment['article_author_sig'] = $kb_author_data['user_attachsig']; --- 1716,1720 ---- // Article author $kb_comment['article_author_id'] = $row['article_author_id']; ! $kb_comment['article_author'] = $row['article_author_id'] != -1 ? $kb_author_data['username'] : ( ( $row['username'] == '' ) ? $lang['Guest'] : $row['username'] ) ; $kb_comment['article_author_sig'] = $kb_author_data['user_attachsig']; *************** *** 1708,1721 **** $kb_comment['article_editor_id'] = $userdata['user_id']; $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : stripslashes($username) ); ! $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; return $kb_comment; } - if ( $author_id == -1 ) - { - $author_kb_art = ( $username != '' ) ? $lang['Guest'] : $row['username']; - } - // Compose phpbb comment header function kb_compose_comment( $kb_comment ) --- 1722,1736 ---- $kb_comment['article_editor_id'] = $userdata['user_id']; $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : stripslashes($username) ); ! $kb_comment['article_editor_sig'] = ( $userdata['user_id'] != '-1' ) ? $userdata['user_attachsig'] : '0'; ! ! // Debug checks ! if ( $kb_post_mode == 'edit' && $kb_config['use_comments'] && empty($kb_comment['topic_id'])) ! { ! die('kb_get_data - no forum topic id for comment'); ! } return $kb_comment; } // Compose phpbb comment header function kb_compose_comment( $kb_comment ) Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_cat.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_cat.php 1 Apr 2005 20:38:43 -0000 1.6 --- kb_cat.php 2 Apr 2005 20:35:40 -0000 1.7 *************** *** 42,50 **** // End of auth check // // // User authorisation levels output // ! $kb_auth_can = ( ( $kb_is_auth['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; --- 42,51 ---- // End of auth check + // // // User authorisation levels output // ! $kb_auth_can = '<br />' . ( ( $kb_is_auth['auth_post'] ) ? $lang['KB_Rules_post_can'] : $lang['KB_Rules_post_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_edit'] ) ? $lang['KB_Rules_edit_can'] : $lang['KB_Rules_edit_cannot'] ) . '<br />'; $kb_auth_can .= ( ( $kb_is_auth['auth_delete'] ) ? $lang['KB_Rules_delete_can'] : $lang['KB_Rules_delete_cannot'] ) . '<br />'; *************** *** 56,63 **** if ( $kb_is_auth['auth_mod'] ) { ! //$kb_auth_can .= sprintf($lang['KB_Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>'); ! $kb_auth_can .= $lang['KB_Rules_moderate_can'] . '<br />'; } if ( !$kb_is_auth['auth_view'] ) { --- 57,65 ---- if ( $kb_is_auth['auth_mod'] ) { ! $kb_auth_can .= $lang['KB_Rules_moderate_can']; } + $kb_quick_nav = get_kb_cat_list( $category_id, 1, true, true ); + if ( !$kb_is_auth['auth_view'] ) { *************** *** 160,164 **** } ! $template->assign_vars( array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), 'L_GOTO_PAGE' => $lang['Goto_page'], --- 162,167 ---- } ! $template->assign_vars( array( ! 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), 'L_GOTO_PAGE' => $lang['Goto_page'], *************** *** 177,182 **** 'PATH' => $path_kb, - 'S_AUTH_LIST' => $kb_auth_can, - 'U_CAT' => append_sid( this_kb_mxurl( 'mode=cat&cat=' . $category_id ) ) ) ); --- 180,183 ---- Index: kb_footer.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_footer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_footer.php 1 Apr 2005 14:12:28 -0000 1.3 --- kb_footer.php 2 Apr 2005 20:35:40 -0000 1.4 *************** *** 27,34 **** // Parse and show the overall footer. ! $template->set_filenames( array( 'kb_footer' => 'kb_footer.tpl' ) ! ); ! $template->assign_vars( array( 'L_MODULE_VERSION' => $kb_module_version, 'L_MODULE_ORIG_AUTHOR' => $kb_module_orig_author, 'L_MODULE_AUTHOR' => $kb_module_author ) --- 27,60 ---- // Parse and show the overall footer. ! $template->set_filenames( array( 'kb_footer' => 'kb_footer.tpl' ) ); ! if ( !empty($kb_auth_can) ) ! { ! $template->assign_block_vars( 'auth_can', array() ); ! } ! ! if ( !empty($kb_quick_nav) ) ! { ! $template->assign_block_vars( 'quick_nav', array() ); ! } ! ! if ( !MXBB_MODULE ) ! { ! $template->assign_block_vars( 'copy_footer', array() ); ! } ! ! $quick_nav_action = this_kb_mxurl(); ! ! $template->assign_vars( array( ! 'QUICK_JUMP_ACTION' => $quick_nav_action, ! //'SID' => $userdata['session_id'], ! ! 'L_QUICK_NAV' => $lang['Quick_nav'], ! 'L_QUICK_JUMP' => $lang['Quick_jump'], ! 'QUICK_NAV' => $kb_quick_nav, ! ! 'S_AUTH_LIST' => $kb_auth_can, ! ! 'L_MODULE_VERSION' => $kb_module_version, 'L_MODULE_ORIG_AUTHOR' => $kb_module_orig_author, 'L_MODULE_AUTHOR' => $kb_module_author ) Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_post.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_post.php 1 Apr 2005 14:12:29 -0000 1.5 --- kb_post.php 2 Apr 2005 20:35:40 -0000 1.6 *************** *** 169,204 **** $error_msg = ''; ! ! // If changed category ! if ( $old_category_id != $category_id ) { ! update_kb_number( $old_category_id, '- 1' ); ! if ( $kb_is_auth['auth_mod'] || ( $kb_is_auth['auth_approval_edit'] && $userdata['user_id'] == $author_id ) ) { update_kb_number( $category_id, '+ 1' ); } ! } ! ! // If unapproved ! if ( $kb_is_auth['auth_mod'] || ( $kb_is_auth['auth_approval_edit'] && $userdata['user_id'] == $author_id ) ) ! { ! $approve = 1; ! ! if ( $old_approve != 1 ) { update_kb_number( $category_id, '+ 1' ); } } ! else { $approve = 2; ! ! if ( $old_approve == 1 && $old_category_id == $category_id ) { ! update_kb_number( $category_id, '- 1' ); } ! } ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET article_category_id = '$category_id', --- 169,199 ---- $error_msg = ''; ! ! $cat_switch = $old_category_id != $category_id; // Has switched category ! ! if ( $kb_is_auth['auth_mod'] || $kb_is_auth['auth_approval_edit'] ) // approval auth { ! $approve = 1; ! if ( $cat_switch ) { + update_kb_number( $old_category_id, ( $old_approve == 1 ? '- 1' : '0' ) ); update_kb_number( $category_id, '+ 1' ); } ! else { update_kb_number( $category_id, '+ 1' ); } } ! else { $approve = 2; ! ! if ( $cat_switch ) { ! update_kb_number( $old_category_id, ( $old_approve == 1 ? '- 1' : '0' ) ); } ! } ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET article_category_id = '$category_id', *************** *** 277,283 **** if ( $approve == 1 && $kb_config['use_comments'] && $kb_is_auth['auth_comment']) { - // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET topic_id = " . $topic_data['topic_id'] . " WHERE article_id = " . $kb_comment['article_id']; --- 272,277 ---- if ( $approve == 1 && $kb_config['use_comments'] && $kb_is_auth['auth_comment']) { $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET topic_id = " . $topic_data['topic_id'] . " WHERE article_id = " . $kb_comment['article_id']; *************** *** 289,300 **** } - $kb_message_tmp = $kb_message . '\n\n' . $kb_update_message; - - kb_notify( $kb_config['notify'], $kb_message_tmp, $kb_config['admin_id'], $kb_comment['article_author_id'] ); - $kb_custom_field->file_update_data( $article_id ); if ( $approve == 1 ) { mx_add_search_words( 'single', $article_id, stripslashes( $article_text ), stripslashes( $article_title ), 'kb' ); --- 283,291 ---- } $kb_custom_field->file_update_data( $article_id ); if ( $approve == 1 ) { + kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'] ); mx_add_search_words( 'single', $article_id, stripslashes( $article_text ), stripslashes( $article_title ), 'kb' ); Index: kb_moderator.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_moderator.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_moderator.php 1 Apr 2005 20:38:43 -0000 1.4 --- kb_moderator.php 2 Apr 2005 20:35:40 -0000 1.5 *************** *** 41,45 **** // ! if ( !($kb_is_auth['auth_mod'] && $userdata['session_logged_in']) ) { $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); --- 41,45 ---- // ! if ( !( ($kb_is_auth['auth_delete'] || $kb_is_auth['auth_mod']) && $userdata['session_logged_in'] ) ) { $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); *************** *** 53,65 **** else { ! if ( $approve ) { $action = 'approve'; } ! else if ( $unapprove ) { $action = 'unapprove'; } ! else if ( $delete ) { $action = 'delete'; --- 53,65 ---- else { ! if ( $approve && $kb_is_auth['auth_mod']) { $action = 'approve'; } ! else if ( $unapprove && $kb_is_auth['auth_mod']) { $action = 'unapprove'; } ! else if ( $delete && ( $kb_is_auth['auth_mod'] || $kb_is_auth['auth_delete']) ) { $action = 'delete'; *************** *** 84,103 **** $topic_sql = ''; ! if ( $kb_is_auth['auth_comment'] && $kb_config['use_comments'] ) ! { ! if ( !$row['topic_id'] ) ! { ! $kb_comment = array(); ! // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata); ! // Compose post header ! $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = kb_compose_comment( $kb_comment ); ! ! $kb_message = $message_temp['message']; ! $kb_update_message = $message_temp['update_message']; // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); --- 84,104 ---- $topic_sql = ''; ! ! $kb_comment = array(); ! // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata ); ! // Compose post header ! $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = kb_compose_comment( $kb_comment ); + $kb_message = $message_temp['message']; + $kb_update_message = $message_temp['update_message']; + + if ( $kb_config['use_comments'] ) + { + if ( !$row['topic_id'] ) + { // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); *************** *** 118,121 **** --- 119,123 ---- update_kb_number( $article_category_id, '+ 1' ); + kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'] ); mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); *************** *** 180,184 **** } ! if ( $kb_config['del_topic'] && $kb_is_auth['auth_delete'] && $article['topic_id'] ) { $topic = $article['topic_id']; --- 182,186 ---- } ! if ( $kb_config['del_topic'] && $article['topic_id'] ) { $topic = $article['topic_id']; *************** *** 324,327 **** --- 326,331 ---- } break; + + } |
|
From: Jon O. <jon...@us...> - 2005-04-02 20:35:49
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root Modified Files: kb.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/kb.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb.php 1 Apr 2005 14:12:29 -0000 1.3 --- kb.php 2 Apr 2005 20:35:40 -0000 1.4 *************** *** 149,153 **** { $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = htmlspecialchars( $mode ); } --- 149,153 ---- { $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! $mode = ( htmlspecialchars( $mode ) != 'cat' || intval ($HTTP_GET_VARS['cat'] ) != 0 ) ? htmlspecialchars( $mode ) : ''; } |
|
From: Jon O. <jon...@us...> - 2005-04-02 20:35:49
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/templates/subSilver/admin Modified Files: kb_cat_admin_body.tpl kb_cat_edit_body.tpl Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: kb_cat_edit_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin/kb_cat_edit_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_cat_edit_body.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_cat_edit_body.tpl 2 Apr 2005 20:35:41 -0000 1.3 *************** *** 59,63 **** <tr> <td class="row1"><span class="gen">{L_EDIT_LEVEL}:</span></td> ! <td class="row2"><select name="auth_edit"><option {EDIT_REG} value="{S_USER}">{L_REG}</option><option {EDIT_PRIVATE} value="{S_PRIVATE}">{L_PRIVATE}</option><option {EDIT_MOD} value="{S_MOD}">{L_MOD}</option><option {EDIT_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> --- 59,63 ---- <tr> <td class="row1"><span class="gen">{L_EDIT_LEVEL}:</span></td> ! <td class="row2"><select name="auth_edit"><option {EDIT_GUEST} value="{S_GUEST}">{L_GUEST}</option><option {EDIT_REG} value="{S_USER}">{L_REG}</option><option {EDIT_PRIVATE} value="{S_PRIVATE}">{L_PRIVATE}</option><option {EDIT_MOD} value="{S_MOD}">{L_MOD}</option><option {EDIT_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> *************** *** 67,75 **** <tr> <td class="row1"><span class="gen">{L_APPROVAL_LEVEL}:</span></td> ! <td class="row2"><select name="auth_approval"><option {APPROVAL_DISABLED} value="{S_USER}">{L_DISABLED}</option><option {APPROVAL_MOD} value="{S_MOD}">{L_MOD}</option><option {APPROVAL_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> <td class="row1"><span class="gen">{L_APPROVAL_EDIT_LEVEL}:</span></td> ! <td class="row2"><select name="auth_approval_edit"><option {APPROVAL_DISABLED} value="{S_USER}">{L_DISABLED}</option><option {APPROVAL_MOD} value="{S_MOD}">{L_MOD}</option><option {APPROVAL_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> --- 67,75 ---- <tr> <td class="row1"><span class="gen">{L_APPROVAL_LEVEL}:</span></td> ! <td class="row2"><select name="auth_approval"><option {APPROVAL_DISABLED} value="{S_GUEST}">{L_DISABLED}</option><option {APPROVAL_MOD} value="{S_MOD}">{L_MOD}</option><option {APPROVAL_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> <td class="row1"><span class="gen">{L_APPROVAL_EDIT_LEVEL}:</span></td> ! <td class="row2"><select name="auth_approval_edit"><option {APPROVAL_DISABLED} value="{S_GUEST}">{L_DISABLED}</option><option {APPROVAL_MOD} value="{S_MOD}">{L_MOD}</option><option {APPROVAL_ADMIN} value="{S_ADMIN}">{L_ADMIN}</option></select></td> </tr> <tr> Index: kb_cat_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin/kb_cat_admin_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_cat_admin_body.tpl 9 Jan 2005 22:16:31 -0000 1.1 --- kb_cat_admin_body.tpl 2 Apr 2005 20:35:41 -0000 1.2 *************** *** 28,32 **** <!-- BEGIN subrow --> <tr> ! <td class="{catrow.subrow.ROW_CLASS}"><span class="gen">{catrow.subrow.INDENT}{catrow.subrow.CATEGORY}<br />{catrow.subrow.INDENT}{catrow.subrow.CAT_DESCRIPTION}</span></td> <td class="{catrow.subrow.ROW_CLASS}" align="center"><span class="gen">{catrow.subrow.CAT_ARTICLES}</span></td> <td class="{catrow.subrow.ROW_CLASS}" align="center"><span class="gen">{catrow.subrow.U_UP}<br />{catrow.subrow.U_DOWN}</span></td> --- 28,32 ---- <!-- BEGIN subrow --> <tr> ! <td class="{catrow.subrow.ROW_CLASS}"><span class="gen">{catrow.subrow.INDENT}{catrow.subrow.CATEGORY}<br /> {catrow.subrow.CAT_DESCRIPTION}</span></td> <td class="{catrow.subrow.ROW_CLASS}" align="center"><span class="gen">{catrow.subrow.CAT_ARTICLES}</span></td> <td class="{catrow.subrow.ROW_CLASS}" align="center"><span class="gen">{catrow.subrow.U_UP}<br />{catrow.subrow.U_DOWN}</span></td> |
|
From: Jon O. <jon...@us...> - 2005-04-02 20:35:49
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/language/lang_english Modified Files: lang_kb.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/language/lang_english/lang_kb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang_kb.php 1 Apr 2005 14:12:29 -0000 1.4 --- lang_kb.php 2 Apr 2005 20:35:40 -0000 1.5 *************** *** 389,391 **** --- 389,395 ---- $lang['No_cat_comments_forum_id'] = 'Comments are enabled but you have not specified the target phpBB forum category in the KB adminCP - Cateogries'; + // Quick Nav + $lang['Quick_nav'] = 'Quick KB Navigation'; + $lang['Quick_jump'] = 'Go'; + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-01 23:34:22
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8515/modules/mx_kb/includes Modified Files: functions_kb.php kb_article.php kb_post.php Added Files: functions_kb_mx.php Log Message: for compatibility with 2.7.5 Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** kb_article.php 1 Apr 2005 20:39:47 -0000 1.19 --- kb_article.php 1 Apr 2005 23:33:52 -0000 1.20 *************** *** 24,28 **** die( "Hacking attempt" ); } - $article_id = !isset( $article_id ) ? intval( $HTTP_GET_VARS['k'] ) : $article_id; $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; --- 24,27 ---- *************** *** 34,41 **** if ( !( $result = $db->sql_query( $sql ) ) ) { ! message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } $row = $db->sql_fetchrow( $result ); if ( count($row) > 0 ) { --- 33,41 ---- if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } $row = $db->sql_fetchrow( $result ); + if ( count($row) > 0 ) { *************** *** 238,242 **** $gen_simple_header = TRUE; } ! if ( !$is_block) { include( $mx_root_path . 'includes/page_header.' . $phpEx ); --- 238,243 ---- $gen_simple_header = TRUE; } ! ! if ( !$is_block && !$print_version) { include( $mx_root_path . 'includes/page_header.' . $phpEx ); *************** *** 297,301 **** { $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata); --- 298,302 ---- { $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata); Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_post.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_post.php 1 Apr 2005 14:14:48 -0000 1.6 --- kb_post.php 1 Apr 2005 23:33:52 -0000 1.7 *************** *** 515,518 **** --- 515,519 ---- 'L_ADD_ARTICLE' => $lang['Add_article'], + 'L_MESSAGE_TITLE' => $lang['Message'], 'L_ARTICLE_TITLE' => $lang['Article_title'], --- NEW FILE: functions_kb_mx.php --- <?php /** ------------------------------------------------------------------------ * subject : mx-portal, CMS & portal * begin : june, 2002 * copyright : (C) 2002-2005 MX-System * email : jon...@ho... * project site : www.mx-system.com * * description : * ------------------------------------------------------------------------- * * $Id: functions_kb_mx.php,v 1.1 2005/04/01 23:33:52 jonohlsson Exp $ */ /** * 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. */ if ( !function_exists( mx_smilies_pass ) ) { function mx_smilies_pass($message) { global $board_config; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; $message = smilies_pass($message); $board_config['smilies_path'] = $smilies_path; return $message; } } if ( !function_exists( mx_generate_smilies ) ) { function mx_generate_smilies($mode, $page_id) { global $board_config, $template, $phpEx; $smilies_path = $board_config['smilies_path']; $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; generate_smilies($mode, $page_id); $board_config['smilies_path'] = $smilies_path; $template->assign_vars(array( 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ); } } if ( !function_exists( mx_message_die ) ) { function mx_message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length; global $starttime; message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); } } if ( !function_exists( mx_auth_group_cache ) ) { // Validates if user belongs to group included in group_ids list // Also, adds all usergroups to userdata array function mx_auth_group_cache( $group_ids = '', $group_mod_mode = false ) { global $userdata, $db; if ( $group_ids == '' ) { return false; } $group_ids_array = explode(",", $group_ids); // Try to reuse usergroups result. if ( $group_mod_mode ) { $userdata_key = 'mx_usergroups_mod' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is group moderator.. $sql = "SELECT gr.group_id FROM " . GROUPS_TABLE . " gr, " . USER_GROUP_TABLE . " ugr WHERE gr.group_id = ugr.group_id AND gr.group_moderator = '" . $userdata['user_id'] . "' AND ugr.user_pending = '0' "; if ( !( $result = $db->sql_query( $sql ) ) ) { message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key_mod] = $group_row; } } else { $userdata_key = 'mx_usergroups' . $userdata['user_id']; if ( empty( $userdata[$userdata_key] ) ) { // Check if user is member of the proper group.. $sql = "SELECT group_id FROM " . USER_GROUP_TABLE . " WHERE user_id='" . $userdata['user_id'] . "' AND user_pending = 0"; if ( !( $result = $db->sql_query( $sql ) ) ) { message_die( GENERAL_ERROR, "Could not query group rights information", '', '', '', '' ); } $group_row = $db->sql_fetchrowset( $result ); $userdata[$userdata_key] = $group_row; } } for ( $i = 0; $i < count( $userdata[$userdata_key] ); $i++ ) { if ( in_array( $userdata[$userdata_key][$i]['group_id'], $group_ids_array ) ) { $is_member = true; return $is_member; } } return false; } } if ( !function_exists( mx_add_search_words ) ) { // Add search words for blocks function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx') { global $db, $phpbb_root_path, $board_config, $lang; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); @set_time_limit(0); $word = array(); $word_insert_sql = array(); while ( list($word_in, $search_matches) = @each($search_raw_words) ) { $word_insert_sql[$word_in] = ''; if ( !empty($search_matches) ) { for ($i = 0; $i < count($search_matches); $i++) { $search_matches[$i] = trim($search_matches[$i]); if( $search_matches[$i] != '' ) { $word[] = $search_matches[$i]; if ( !strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'") ) { $word_insert_sql[$word_in] .= ( $word_insert_sql[$word_in] != "" ) ? ", '" . $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; } } } } } if ( count($word) ) { sort($word); $prev_word = ''; $word_text_sql = ''; $temp_word = array(); for($i = 0; $i < count($word); $i++) { if ( $word[$i] != $prev_word ) { $temp_word[] = $word[$i]; $word_text_sql .= ( ( $word_text_sql != '' ) ? ', ' : '' ) . "'" . $word[$i] . "'"; } $prev_word = $word[$i]; } $word = $temp_word; $check_words = array(); switch( SQL_LAYER ) { case 'postgresql': case 'msaccess': case 'mssql-odbc': case 'oracle': case 'db2': $sql = "SELECT word_id, word_text FROM " . $search_word_table . " WHERE word_text IN ($word_text_sql)"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $check_words[$row['word_text']] = $row['word_id']; } break; } $value_sql = ''; $match_word = array(); for ($i = 0; $i < count($word); $i++) { $new_match = true; if ( isset($check_words[$word[$i]]) ) { $new_match = false; } if ( $new_match ) { switch( SQL_LAYER ) { case 'mysql': case 'mysql4': $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)'; break; case 'mssql': case 'mssql-odbc': $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0"; break; default: $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) VALUES ('" . $word[$i] . "', 0)"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } break; } } } if ( $value_sql != '' ) { switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "INSERT IGNORE INTO " . $search_word_table . " (word_text, word_common) VALUES $value_sql"; break; case 'mssql': case 'mssql-odbc': $sql = "INSERT INTO " . $search_word_table . " (word_text, word_common) $value_sql"; break; } if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } } } while( list($word_in, $match_sql) = @each($word_insert_sql) ) { $title_match = ( $word_in == 'title' ) ? 1 : 0; if ( $match_sql != '' ) { $sql = "INSERT INTO " . $search_match_table . " ($db_key, word_id, title_match) SELECT $post_id, word_id, $title_match FROM " . $search_word_table . " WHERE word_text IN ($match_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); } } } if ($mode == 'single') { // remove_common('single', 4/10, $word); } return; } function mx_remove_search_post($post_id_sql, $mx_mode = 'mx') { global $db; // $search_match_table = SEARCH_MATCH_TABLE; // $search_word_table = SEARCH_WORD_TABLE; switch ( $mx_mode ) { case 'mx': $search_match_table = MX_MATCH_TABLE; $search_word_table = MX_WORD_TABLE; $db_key = 'block_id'; break; case 'kb': $search_match_table = KB_MATCH_TABLE; $search_word_table = KB_WORD_TABLE; $db_key = 'article_id'; break; } $words_removed = false; switch ( SQL_LAYER ) { case 'mysql': case 'mysql4': $sql = "SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } $sql = "SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ($word_id_sql) GROUP BY word_id HAVING COUNT(word_id) = 1"; if ( $result = $db->sql_query($sql) ) { $word_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { $word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id']; } if ( $word_id_sql != '' ) { $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ($word_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); } } } break; default: $sql = "DELETE FROM " . $search_word_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE word_id IN ( SELECT word_id FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql) GROUP BY word_id ) GROUP BY word_id HAVING COUNT(word_id) = 1 )"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); } $words_removed = $db->sql_affectedrows(); break; } $sql = "DELETE FROM " . $search_match_table . " WHERE $db_key IN ($post_id_sql)"; if ( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } return $words_removed; } } ?> Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** functions_kb.php 1 Apr 2005 20:39:46 -0000 1.25 --- functions_kb.php 1 Apr 2005 23:33:52 -0000 1.26 *************** *** 842,846 **** } - while ( $category = $db->sql_fetchrow( $result ) ) { --- 842,845 ---- *************** *** 853,857 **** // - // Get number of articles in cat - newssuite addon $sql_num = "SELECT count(article_id) AS total --- 852,855 ---- *************** *** 1822,1826 **** global $news_type_select_data, $kb_type_select_data, $kb_config; ! if ( !MXBB_MODULE ) { return true; --- 1820,1824 ---- global $news_type_select_data, $kb_type_select_data, $kb_config; ! if ( !MXBB_MODULE || MXBB_27x ) { return true; |
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8515/modules/mx_kb Modified Files: db_install.php db_uninstall.php db_upgrade.php kb.php Added Files: KnowledgeBase (core 27x).pak Kopia av KnowledgeBase (core 28).pak Removed Files: KnowledgeBase.pak Log Message: for compatibility with 2.7.5 Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kb.php 28 Mar 2005 20:22:45 -0000 1.15 --- kb.php 1 Apr 2005 23:33:52 -0000 1.16 *************** *** 120,123 **** --- 120,125 ---- } + define('MXBB_27x', true); + // Extract 'what posts to view info', the cool Array ;) $kb_type_select_data = array(); *************** *** 131,134 **** --- 133,137 ---- include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); + include_once( $module_root_path . 'includes/functions_kb_mx.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); --- NEW FILE: KnowledgeBase (core 27x).pak --- module=+:41=+:Knowledge Base=+:modules/mx_kb/=+:Knowledge Base module=+:1 function=+:41=+:42=+:KB=+:Knowledge Base Module=+:kb.php=+:modules/mx_kb/admin/kb_config.php parameter=+:42=+:79=+:kb_type_select=+:Text=+:array('init'=>'1')=+: block=+:=+:Demo - KB=+:Demo block=+:42=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:41=+:96=+:Article_reader=+:Block to display articles only. No category navigation. To be used with newssuite.=+:kb_article_reader.php=+:modules/mx_kb/admin/kb_config.php parameter=+:96=+:302=+:default_article_id=+:Text=+:1=+: parameter=+:96=+:301=+:kb_type_select=+:Text=+:array('init'=>'1')=+: block=+:=+:Demo - Article_reader=+:Demo block=+:96=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** db_install.php 30 Mar 2005 09:53:54 -0000 1.24 --- db_install.php 1 Apr 2005 23:33:52 -0000 1.25 *************** *** 21,24 **** --- 21,79 ---- */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', true); + + } + define( 'IN_PORTAL', true ); *************** *** 46,49 **** --- 101,105 ---- // End session management } + // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "kb_config" ) ) *************** *** 211,218 **** ); ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); --- 267,277 ---- ); ! if ( !MXBB_27x ) ! { ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; + } $message .= mx_do_install_upgrade( $sql ); Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_uninstall.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_uninstall.php 16 Jan 2005 01:02:41 -0000 1.7 --- db_uninstall.php 1 Apr 2005 23:33:52 -0000 1.8 *************** *** 21,25 **** --- 21,81 ---- */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', true); + + } + define( 'IN_PORTAL', true ); + if ( !defined( 'IN_ADMIN' ) ) { *************** *** 42,45 **** --- 98,102 ---- // End session management } + $sql = array( "DROP TABLE " . $mx_table_prefix . "kb_articles ", --- KnowledgeBase.pak DELETED --- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** db_upgrade.php 30 Mar 2005 09:53:54 -0000 1.17 --- db_upgrade.php 1 Apr 2005 23:33:52 -0000 1.18 *************** *** 20,23 **** --- 20,77 ---- * (at your option) any later version. */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', 1); + + } define( 'IN_PORTAL', true ); *************** *** 241,250 **** $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } ! ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; ! $message .= mx_do_install_upgrade( $sql ); } --- 295,307 ---- $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } ! ! if ( !MXBB_27x ) ! { ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; ! } ! $message .= mx_do_install_upgrade( $sql ); } --- NEW FILE: Kopia av KnowledgeBase (core 28).pak --- module=+:41=+:Knowledge Base=+:modules/mx_kb/=+:Knowledge Base module=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:41=+:42=+:KB=+:Knowledge Base Module=+:kb.php=+:modules/mx_kb/admin/kb_config.php parameter=+:42=+:79=+:kb_type_select=+:Text=+:array('init'=>'1')=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - KB=+:Demo block=+:42=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:41=+:96=+:Article_reader=+:Block to display articles only. No category navigation. To be used with newssuite.=+:kb_article_reader.php=+:modules/mx_kb/admin/kb_config.php parameter=+:96=+:302=+:default_article_id=+:Text=+:1=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:96=+:301=+:kb_type_select=+:Text=+:array('init'=>'1')=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - Article_reader=+:Demo block=+:96=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |
|
From: Jon O. <jon...@us...> - 2005-04-01 23:34:20
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8515/modules/mx_kb/templates/subSilver Modified Files: kb_post_body.tpl Log Message: for compatibility with 2.7.5 Index: kb_post_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_post_body.tpl 1 Apr 2005 14:14:49 -0000 1.3 --- kb_post_body.tpl 1 Apr 2005 23:33:53 -0000 1.4 *************** *** 292,296 **** <!-- BEGIN input --> <tr> ! <td class="row1"><span class="genmed">{input.FIELD_NAME}</span><br><span class="gensmall">{input.FIELD_DESCRIPTION}</span></td> <td class="row2"> <input type="text" class="post" size="50" name="field[{input.FIELD_ID}]" value="{input.FIELD_VALUE}" /> --- 292,296 ---- <!-- BEGIN input --> <tr> ! <td class="row1"><span class="gen"><b>{input.FIELD_NAME}</b></span><br><span class="gensmall">{input.FIELD_DESCRIPTION}</span></td> <td class="row2"> <input type="text" class="post" size="50" name="field[{input.FIELD_ID}]" value="{input.FIELD_VALUE}" /> *************** *** 301,305 **** <!-- BEGIN textarea --> <tr> ! <td class="row1"><span class="genmed">{textarea.FIELD_NAME}</span><br><span class="gensmall">{textarea.FIELD_DESCRIPTION}</span></td> <td class="row2"> <textarea rows="6" class="post" name="field[{textarea.FIELD_ID}]" cols="32">{textarea.FIELD_VALUE}</textarea> --- 301,305 ---- <!-- BEGIN textarea --> <tr> ! <td class="row1"><span class="gen"><b>{textarea.FIELD_NAME}</b></span><br><span class="gensmall">{textarea.FIELD_DESCRIPTION}</span></td> <td class="row2"> <textarea rows="6" class="post" name="field[{textarea.FIELD_ID}]" cols="32">{textarea.FIELD_VALUE}</textarea> *************** *** 310,314 **** <!-- BEGIN radio --> <tr> ! <td class="row1"><span class="genmed">{radio.FIELD_NAME}</span><br><span class="gensmall">{radio.FIELD_DESCRIPTION}</span></td> <td class="row2"> <!-- BEGIN row --> --- 310,314 ---- <!-- BEGIN radio --> <tr> ! <td class="row1"><span class="gen"><b>{radio.FIELD_NAME}</b></span><br><span class="gensmall">{radio.FIELD_DESCRIPTION}</span></td> <td class="row2"> <!-- BEGIN row --> *************** *** 321,325 **** <!-- BEGIN select --> <tr> ! <td class="row1"><span class="genmed">{select.FIELD_NAME}</span><br><span class="gensmall">{select.FIELD_DESCRIPTION}</span></td> <td class="row2"> <select name="field[{select.FIELD_ID}]" class="post"> --- 321,325 ---- <!-- BEGIN select --> <tr> ! <td class="row1"><span class="gen"><b>{select.FIELD_NAME}</b></span><br><span class="gensmall">{select.FIELD_DESCRIPTION}</span></td> <td class="row2"> <select name="field[{select.FIELD_ID}]" class="post"> *************** *** 334,338 **** <!-- BEGIN select_multiple --> <tr> ! <td class="row1"><span class="genmed">{select_multiple.FIELD_NAME}</span><br><span class="gensmall">{select_multiple.FIELD_DESCRIPTION}</span></td> <td class="row2"> <select name="field[{select_multiple.FIELD_ID}][]" multiple="multiple" size="4" class="post"> --- 334,338 ---- <!-- BEGIN select_multiple --> <tr> ! <td class="row1"><span class="gen"><b>{select_multiple.FIELD_NAME}</b></span><br><span class="gensmall">{select_multiple.FIELD_DESCRIPTION}</span></td> <td class="row2"> <select name="field[{select_multiple.FIELD_ID}][]" multiple="multiple" size="4" class="post"> *************** *** 347,351 **** <!-- BEGIN checkbox --> <tr> ! <td class="row1"><span class="genmed">{checkbox.FIELD_NAME}</span><br><span class="gensmall">{checkbox.FIELD_DESCRIPTION}</span></td> <td class="row2"> <!-- BEGIN row --> --- 347,351 ---- <!-- BEGIN checkbox --> <tr> ! <td class="row1"><span class="gen"><b>{checkbox.FIELD_NAME}</b></span><br><span class="gensmall">{checkbox.FIELD_DESCRIPTION}</span></td> <td class="row2"> <!-- BEGIN row --> *************** *** 355,358 **** --- 355,361 ---- </tr> <!-- END checkbox --> + <tr> + <td class="cat" colspan="2" align="center"><span class="cattitle">{L_MESSAGE_TITLE}</span></td> + </tr> <tr> <td class="row1" valign="top"><span class="gen"><b><nobr>{L_ARTICLE_TEXT}</nobr></b><br /><br /> |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:40:13
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096/modules/mx_kb/templates/subSilver/admin Modified Files: kb_art_body.tpl Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_art_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_art_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_art_body.tpl 15 Nov 2003 23:44:00 -0000 1.2 --- kb_art_body.tpl 1 Apr 2005 20:39:47 -0000 1.3 *************** *** 71,73 **** --- 71,82 ---- <!-- END approverow --> </table> + + <!-- BEGIN pagination --> + <table width="100%" cellspacing="2" cellpadding="0" border="0"> + <tr> + <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> + <td valign="top" align="right" ><span class="nav">{PAGINATION}</span></td> + </tr> + </table> + <!-- END pagination --> <br clear="all" /> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:39:56
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096/modules/mx_kb/includes Modified Files: functions_kb.php kb_article.php kb_cat.php kb_moderator.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_cat.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** kb_cat.php 1 Apr 2005 14:14:48 -0000 1.12 --- kb_cat.php 1 Apr 2005 20:39:47 -0000 1.13 *************** *** 131,134 **** --- 131,135 ---- $path_kb_array = array(); get_kb_nav( $category_id ); + // Pagination $sql_pag = "SELECT count(article_id) AS total Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** kb_article.php 1 Apr 2005 14:14:48 -0000 1.18 --- kb_article.php 1 Apr 2005 20:39:47 -0000 1.19 *************** *** 362,366 **** $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $kb_config['comments_pagination'], $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } --- 362,366 ---- $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $show_num_comments, $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } Index: kb_moderator.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_moderator.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_moderator.php 1 Apr 2005 14:14:48 -0000 1.7 --- kb_moderator.php 1 Apr 2005 20:39:47 -0000 1.8 *************** *** 31,34 **** --- 31,35 ---- $page_id = ( isset( $HTTP_GET_VARS['page'] ) ) ? intval ( $HTTP_GET_VARS['page']) : intval ( $HTTP_POST_VARS['page'] ); $ref_stats = ( isset( $HTTP_GET_VARS['ref'] ) ) ? true : 0; + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; // Start auth check *************** *** 119,123 **** mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 120,124 ---- mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 151,155 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 152,156 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 311,315 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 312,316 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 319,323 **** $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=" . $article_id ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 320,324 ---- $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=$article_id&start=$start" ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id&start=$start" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** functions_kb.php 1 Apr 2005 14:14:48 -0000 1.24 --- functions_kb.php 1 Apr 2005 20:39:46 -0000 1.25 *************** *** 298,311 **** { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 298,311 ---- { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" . "&start=" . $start); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 318,331 **** { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id") ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" ) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id") ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 318,331 ---- { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 361,371 **** if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ! ); } ! ! ! return $template; } --- 361,368 ---- if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ); } ! return $i; } |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:39:56
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096/modules/mx_kb/templates/subSilver Modified Files: kb_cat_body.tpl Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** kb_cat_body.tpl 1 Apr 2005 14:14:49 -0000 1.9 --- kb_cat_body.tpl 1 Apr 2005 20:39:48 -0000 1.10 *************** *** 60,65 **** <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="left" ><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> ! <td valign="top" align="right" ><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> --- 60,64 ---- <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span><br /><br /><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:39:55
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096/modules/mx_kb/admin Modified Files: admin_kb_art.php Log Message: minor fixes...sprung from the phpbb dev thread Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_kb_art.php 1 Apr 2005 14:14:47 -0000 1.15 --- admin_kb_art.php 1 Apr 2005 20:39:30 -0000 1.16 *************** *** 110,113 **** --- 110,115 ---- } + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; + $article_id = intval( $HTTP_GET_VARS['a'] ); *************** *** 162,166 **** mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); --- 164,168 ---- mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); *************** *** 194,198 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); break; --- 196,200 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); break; *************** *** 353,362 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } else { ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( "admin_kb_art.$phpEx?mode=delete&c=yes&a=" . $article_id ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } --- 355,364 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } else { ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&mode=delete&c=yes&a=" . $article_id . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } *************** *** 367,374 **** // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_art_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_ARTICLE' => $lang['Article'], 'L_ARTICLE_CAT' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], --- 369,409 ---- // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_art_body.tpl' ) ); ! ! // edited articles ! get_kb_articles( '', 2, 'editrow', $start ); ! // need to be approved ! get_kb_articles( '', 0, 'notrow', $start ); ! // Articles that are approved ! $total_articles = get_kb_articles( '', 1, 'approverow', $start, $kb_config['art_pagination'] ); ! // Pagination ! $sql_pag = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! ! $sql_pag .= " approved = '1'"; ! ! if ( !( $result = $db->sql_query( $sql_pag ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $total = $db->sql_fetchrow( $result ) ) ! { ! $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['art_pagination'], $start ) . ' '; ! } ! ! if ( $total_articles > 0 ) ! { ! $template->assign_block_vars( 'pagination', array() ); ! } ! ! $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! 'L_ARTICLE' => $lang['Article'], 'L_ARTICLE_CAT' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], *************** *** 383,393 **** 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ); - // edited articles - get_kb_articles( '', 2, 'editrow' ); - // need to be approved - get_kb_articles( '', 0, 'notrow' ); - // Articles that are approved - get_kb_articles( '', 1, 'approverow' ); break; } --- 418,425 ---- 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ); + + + break; } |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:39:09
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5625/modules/kb_076_mxaddon/root/admin Modified Files: admin_kb_art.php Log Message: minor fixes...sprung from the phpbb dev thread Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_art.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_kb_art.php 1 Apr 2005 14:12:28 -0000 1.3 --- admin_kb_art.php 1 Apr 2005 20:38:43 -0000 1.4 *************** *** 110,113 **** --- 110,115 ---- } + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; + $article_id = intval( $HTTP_GET_VARS['a'] ); *************** *** 162,166 **** mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); --- 164,168 ---- mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); *************** *** 194,198 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); break; --- 196,200 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); break; *************** *** 353,362 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } else { ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( "admin_kb_art.$phpEx?mode=delete&c=yes&a=" . $article_id ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } --- 355,364 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } else { ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&mode=delete&c=yes&a=" . $article_id . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ); message_die( GENERAL_MESSAGE, $message ); } *************** *** 367,374 **** // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_art_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_ARTICLE' => $lang['Article'], 'L_ARTICLE_CAT' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], --- 369,409 ---- // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_art_body.tpl' ) ); ! ! // edited articles ! get_kb_articles( '', 2, 'editrow', $start ); ! // need to be approved ! get_kb_articles( '', 0, 'notrow', $start ); ! // Articles that are approved ! $total_articles = get_kb_articles( '', 1, 'approverow', $start, $kb_config['art_pagination'] ); ! // Pagination ! $sql_pag = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! ! $sql_pag .= " approved = '1'"; ! ! if ( !( $result = $db->sql_query( $sql_pag ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $total = $db->sql_fetchrow( $result ) ) ! { ! $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['art_pagination'], $start ) . ' '; ! } ! ! if ( $total_articles > 0 ) ! { ! $template->assign_block_vars( 'pagination', array() ); ! } ! ! $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! 'L_ARTICLE' => $lang['Article'], 'L_ARTICLE_CAT' => $lang['Category'], 'L_ARTICLE_TYPE' => $lang['Article_type'], *************** *** 383,393 **** 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ); - // edited articles - get_kb_articles( '', 2, 'editrow' ); - // need to be approved - get_kb_articles( '', 0, 'notrow' ); - // Articles that are approved - get_kb_articles( '', 1, 'approverow' ); break; } --- 418,425 ---- 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ); + + + break; } |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:38:53
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5625/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php kb_article.php kb_cat.php kb_moderator.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_cat.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_cat.php 1 Apr 2005 14:12:28 -0000 1.5 --- kb_cat.php 1 Apr 2005 20:38:43 -0000 1.6 *************** *** 131,134 **** --- 131,135 ---- $path_kb_array = array(); get_kb_nav( $category_id ); + // Pagination $sql_pag = "SELECT count(article_id) AS total Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_article.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_article.php 1 Apr 2005 14:12:28 -0000 1.5 --- kb_article.php 1 Apr 2005 20:38:43 -0000 1.6 *************** *** 362,366 **** $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $kb_config['comments_pagination'], $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } --- 362,366 ---- $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $show_num_comments, $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } Index: kb_moderator.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_moderator.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_moderator.php 1 Apr 2005 14:12:29 -0000 1.3 --- kb_moderator.php 1 Apr 2005 20:38:43 -0000 1.4 *************** *** 31,34 **** --- 31,35 ---- $page_id = ( isset( $HTTP_GET_VARS['page'] ) ) ? intval ( $HTTP_GET_VARS['page']) : intval ( $HTTP_POST_VARS['page'] ); $ref_stats = ( isset( $HTTP_GET_VARS['ref'] ) ) ? true : 0; + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; // Start auth check *************** *** 119,123 **** mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 120,124 ---- mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 151,155 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 152,156 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 311,315 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 312,316 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 319,323 **** $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=" . $article_id ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 320,324 ---- $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=$article_id&start=$start" ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id&start=$start" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_kb.php 1 Apr 2005 14:12:28 -0000 1.6 --- functions_kb.php 1 Apr 2005 20:38:43 -0000 1.7 *************** *** 298,311 **** { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 298,311 ---- { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" . "&start=" . $start); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 318,331 **** { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id") ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" ) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id") ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 318,331 ---- { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 361,371 **** if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ! ); } ! ! ! return $template; } --- 361,368 ---- if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ); } ! return $i; } |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:38:53
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5625/modules/kb_076_mxaddon/root/templates/subSilver/admin Modified Files: kb_art_body.tpl Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_art_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin/kb_art_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_art_body.tpl 9 Jan 2005 22:16:31 -0000 1.1 --- kb_art_body.tpl 1 Apr 2005 20:38:44 -0000 1.2 *************** *** 71,73 **** --- 71,82 ---- <!-- END approverow --> </table> + + <!-- BEGIN pagination --> + <table width="100%" cellspacing="2" cellpadding="0" border="0"> + <tr> + <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> + <td valign="top" align="right" ><span class="nav">{PAGINATION}</span></td> + </tr> + </table> + <!-- END pagination --> <br clear="all" /> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-01 20:38:53
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5625/modules/kb_076_mxaddon/root/templates/subSilver Modified Files: kb_cat_body.tpl Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_cat_body.tpl 1 Apr 2005 14:12:30 -0000 1.3 --- kb_cat_body.tpl 1 Apr 2005 20:38:44 -0000 1.4 *************** *** 60,65 **** <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="left" ><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> ! <td valign="top" align="right" ><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> --- 60,64 ---- <tr> <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span><br /><br /><span class="gensmall">{S_AUTH_LIST}</span></td> </tr> </table> |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:15:15
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14203/modules/mx_kb/language/lang_english Modified Files: lang_kb.php Log Message: minor fixes...sprung from the phpbb dev thread Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_kb.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** lang_kb.php 29 Mar 2005 20:02:10 -0000 1.16 --- lang_kb.php 1 Apr 2005 14:14:49 -0000 1.17 *************** *** 44,47 **** --- 44,48 ---- $lang['Article_submitted'] = 'Article Submitted Successfully.'; $lang['Click_return_kb'] = 'Click %sHere%s to return to the ' . $lang['KB_title']; + $lang['Click_return_article'] = 'Click %sHere%s to return to the ' . $lang['Article']; $lang['Article_Edited_Approve'] = 'Article Edited Successfully.<br />It need to be approved again before user\'s can view it.'; *************** *** 386,388 **** --- 387,391 ---- $lang['Addtional_field'] = 'More information (optional)'; + $lang['No_cat_comments_forum_id'] = 'Comments are enabled but you have not specified the target phpBB forum category in the KB adminCP - Cateogries'; + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:14:59
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14203/modules/mx_kb/templates/subSilver Modified Files: kb_article_body.tpl kb_cat_body.tpl kb_post_body.tpl kb_stats_body.tpl Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_cat_body.tpl 28 Mar 2005 20:22:49 -0000 1.8 --- kb_cat_body.tpl 1 Apr 2005 14:14:49 -0000 1.9 *************** *** 30,34 **** <th class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> <th class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th class="thTop nowrap="nowrap"> {L_ARTICLE_DATE} </th> <th class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> </tr> --- 30,34 ---- <th class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> <th class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th class="thTop" nowrap="nowrap"> {L_ARTICLE_DATE} </th> <th class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> </tr> *************** *** 56,59 **** --- 56,60 ---- </table> + <!-- BEGIN pagination --> <table width="100%" cellspacing="2" cellpadding="0" border="0"> <tr> *************** *** 63,65 **** </tr> </table> ! --- 64,66 ---- </tr> </table> ! <!-- END pagination --> Index: kb_stats_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_stats_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_stats_body.tpl 28 Mar 2005 20:22:49 -0000 1.4 --- kb_stats_body.tpl 1 Apr 2005 14:14:49 -0000 1.5 *************** *** 31,35 **** <th class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> <th class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th class="thTop nowrap="nowrap"> {L_ARTICLE_DATE} </th> <th class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> </tr> --- 31,35 ---- <th class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> <th class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th class="thTop" nowrap="nowrap"> {L_ARTICLE_DATE} </th> <th class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> </tr> *************** *** 58,59 **** --- 58,67 ---- </table> + <!-- BEGIN pagination --> + <table width="100%" cellspacing="2" cellpadding="0" border="0"> + <tr> + <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> + <td valign="top" align="left" ><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> + </tr> + </table> + <!-- END pagination --> Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** kb_article_body.tpl 29 Mar 2005 20:02:10 -0000 1.12 --- kb_article_body.tpl 1 Apr 2005 14:14:49 -0000 1.13 *************** *** 101,104 **** --- 101,105 ---- </table> + <!-- BEGIN comments_pag --> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> *************** *** 107,110 **** --- 108,112 ---- </tr> </table> + <!-- END comments_pag --> <!-- END switch_comments_show --> Index: kb_post_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_post_body.tpl 28 Mar 2005 20:22:49 -0000 1.2 --- kb_post_body.tpl 1 Apr 2005 14:14:49 -0000 1.3 *************** *** 480,484 **** <td class="row1"><span class="gen"><b>{L_ARTICLE_CATEGORY}</b></span></td> <td class="row2"> ! <select name="category_id"> {switch_edit.CAT_LIST} </select> --- 480,484 ---- <td class="row1"><span class="gen"><b>{L_ARTICLE_CATEGORY}</b></span></td> <td class="row2"> ! <select name="cat"> {switch_edit.CAT_LIST} </select> |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:14:58
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14203/modules/mx_kb/includes Modified Files: functions_kb.php functions_kb_field.php kb_article.php kb_cat.php kb_moderator.php kb_post.php kb_stats.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_stats.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_stats.php 29 Mar 2005 21:41:03 -0000 1.5 --- kb_stats.php 1 Apr 2005 14:14:48 -0000 1.6 *************** *** 25,28 **** --- 25,30 ---- } + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; + // Start auth check // *************** *** 71,75 **** ) ); ! get_kb_stats( $stats, '1', 'articlerow', $kb_is_auth ); ?> \ No newline at end of file --- 73,87 ---- ) ); ! $total_articles = get_kb_stats( $stats, '1', 'articlerow', $start, $kb_config['art_pagination'], $kb_is_auth ); ! ! // Stats pagination is inactivated for now ;) ! if ( $total_articles > 0 ) ! { ! // $pagination = generate_pagination( this_kb_mxurl( "mode=cat&cat=$category_id" ), $total_articles, $kb_config['art_pagination'], $start ) . ' '; ! } + if ( $total_articles > 0 ) + { + // $template->assign_block_vars( 'pagination', array() ); + } ?> \ No newline at end of file Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** kb_article.php 29 Mar 2005 21:41:02 -0000 1.17 --- kb_article.php 1 Apr 2005 14:14:48 -0000 1.18 *************** *** 227,234 **** --- 227,245 ---- $page_title = $article_title; + /* if ( !$is_block && !$print_version ) { include( $mx_root_path . 'includes/page_header.' . $phpEx ); } + */ + + if ( $print_version ) + { + $gen_simple_header = TRUE; + } + if ( !$is_block) + { + include( $mx_root_path . 'includes/page_header.' . $phpEx ); + } // fixup (truncates) urls, images and words for a narrow column layout *************** *** 323,330 **** } $topic = $db->sql_fetchrow( $result4 ); $temp_url = append_sid( $phpbb_root_path . "viewtopic.php?t=" . $topic['topic_id'] ); $comments = '<b>' . $lang['Comments'] . '</b>'; ! $comments_img = '<a href="' . $temp_url . '" class="gensmall"> [' . $topic['topic_replies'] . ' - ' . $lang['Post_comments'] . ']</a>'; $template->assign_block_vars( 'switch_comments', array() ); --- 334,342 ---- } $topic = $db->sql_fetchrow( $result4 ); + $num_of_replies = intval( $topic['topic_replies'] ); $temp_url = append_sid( $phpbb_root_path . "viewtopic.php?t=" . $topic['topic_id'] ); $comments = '<b>' . $lang['Comments'] . '</b>'; ! $comments_img = '<a href="' . $temp_url . '" class="gensmall"> [' . $num_of_replies . ' - ' . $lang['Post_comments'] . ']</a>'; $template->assign_block_vars( 'switch_comments', array() ); *************** *** 335,339 **** } ! if ( $kb_config['use_comments'] && $topic_id ) { --- 347,351 ---- } ! if ( $kb_config['comments_show'] && $topic_id ) { *************** *** 350,354 **** $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $topic['topic_replies'], $kb_config['comments_pagination'], $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } --- 362,366 ---- $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $kb_config['comments_pagination'], $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } *************** *** 374,381 **** get_kb_nav( $article_category_id ); ! $print_url = append_sid( this_kb_mxurl( "mode=article&k=" . $article_id . "&print=true", true ) ); $template->assign_vars( array( 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['comments_pagination'] ) + 1 ), ceil( $topic['topic_replies'] / $kb_config['comments_pagination'] ) ), 'L_GOTO_PAGE' => $lang['Goto_page'], --- 386,394 ---- get_kb_nav( $article_category_id ); ! // $print_url = append_sid( this_kb_mxurl( "mode=article&k=" . $article_id . "&print=true", true ) ); ! $print_url = append_sid( this_kb_mxurl( "mode=article&k=" . $article_id ."&page_num=".($page_num+1)."&start=".$start ."&print=true", true ) ); $template->assign_vars( array( 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['comments_pagination'] ) + 1 ), ceil( $num_of_replies / $kb_config['comments_pagination'] ) ), 'L_GOTO_PAGE' => $lang['Goto_page'], Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** functions_kb.php 30 Mar 2005 09:28:40 -0000 1.23 --- functions_kb.php 1 Apr 2005 14:14:48 -0000 1.24 *************** *** 370,373 **** --- 370,518 ---- } + // get articles for the category + + function get_kb_stats( $type = false, $approve, $block_name, $start = -1, $articles_in_cat = 0, $kb_is_auth ) + { + global $db, $template, $images, $phpEx, $module_root_path, $phpbb_root_path, $mx_root_path, $board_config, $lang, $is_block, $page_id, $is_admin, $userdata; + + $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE"; + + $sql .= " approved = " . $approve; + + if ( $type ) + { + if ( $type == 'toprated' ) + { + $sql .= " AND article_totalvotes > 0"; + $sql .= " ORDER BY article_rating/article_totalvotes DESC"; + }elseif ( $type == 'latest' ) + { + $sql .= " ORDER BY article_date DESC"; + }elseif ( $type == 'mostpopular' ) + { + $sql .= " AND views > 0"; + $sql .= " ORDER BY views DESC"; + } + } + + if ( $start > -1 && $articles_in_cat > 0 ) + { + $sql .= " LIMIT $start, $articles_in_cat"; + } + + if ( !( $article_result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); + } + + $i = 0; + + while ( $article = $db->sql_fetchrow( $article_result ) ) + { + if ( $i == $articles_in_cat ) + { + break; + } + + $article_description = $article['article_description']; + $article_cat = $article['article_category_id']; + $article_approved = $article['approved']; + // type + $type_id = $article['article_type']; + $article_type = get_kb_type( $type_id ); + + $article_date = create_date( $board_config['default_dateformat'], $article['article_date'], $board_config['board_timezone'] ); + // author information + $author_id = $article['article_author_id']; + if ( $author_id == -1 ) + { + $author = ( $article['username'] == '' ) ? $lang['Guest'] : $article['username']; + } + else + { + $author = get_kb_author( $author_id ); + + $temp_url = append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$author_id" ); + $author = '<a href="' . $temp_url . '" class="gen">' . $author . '</a>'; + } + + $article_id = $article['article_id']; + $views = $article['views']; + + $article_title = $article['article_title']; + $temp_url = append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ); + $article = '<a href="' . $temp_url . '" class="gen">' . $article_title . '</a>'; + + $approve = ''; + $delete = ''; + $category_name = ''; + + $category = get_kb_cat( $article_cat ); + $category_id = $category['category_id']; + $category_name = $category['category_name']; + $category_temp = append_sid( this_kb_mxurl( "mode=cat&cat=$category_id" ) ); + $category_url = '<a href="' . $category_temp . '" class="genmed">' . $category_name . '</a>'; + + if ( defined( 'IN_ADMIN' ) || $userdata['user_level'] == ADMIN ) + { + $category = get_kb_cat( $article_cat ); + $category_name = $category['category_name']; + + if ( $article_approved == 2 || $article_approved == 0 ) + { + // approve + $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); + $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; + } + elseif ( $article_approved == 1 ) + { + // unapprove + $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); + $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; + } + // delete + $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); + $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; + } + + if ( $article['article_rating'] == 0 || $article['article_totalvotes'] == 0 ) + { + $rating = 0; + $rating_votes = 0; + $rating_message = ''; + } + else + { + $rating = round( $postrow[$i]['link_rating'] / $postrow[$i]['link_totalvotes'], 2 ); + $rating_votes = $postrow[$i]['link_totalvotes']; + $rating_message = '(' . $rating . '/10, </span><span class="gensmall">' . $rating_votes . ' votes)'; + } + + if ( ns_auth_item( $article_cat, $type_id ) && ns_auth_cat( $article_cat ) && $kb_is_auth[$article_cat]['auth_view']) + { + $i++; + $template->assign_block_vars( $block_name, array( 'ARTICLE' => $article , + 'ARTICLE_DESCRIPTION' => $article_description, + 'ARTICLE_TYPE' => $article_type, + 'ARTICLE_DATE' => $article_date, + 'ARTICLE_AUTHOR' => $author, + 'CATEGORY' => $category_url, + 'ART_VIEWS' => $views, + 'ART_VOTES' => $rating_message, + + 'U_APPROVE' => $approve, + 'U_DELETE' => $delete ) + ); + } + } + if ( $i == 0 ) + { + $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) + ); + } + + return $template; + } + // update number of articles in a category *************** *** 1525,1529 **** } ! if ( $total_posts != 0 ) { $template->assign_block_vars( 'switch_comments_show', array() ); --- 1670,1674 ---- } ! if ( ($start == 0 && $total_posts > 1) || ($start != 0 && $total_posts > 0) ) { $template->assign_block_vars( 'switch_comments_show', array() ); *************** *** 1532,1674 **** } - // get articles for the category - - function get_kb_stats( $type = false, $approve, $block_name, $kb_is_auth ) - { - global $db, $template, $images, $phpEx, $module_root_path, $phpbb_root_path, $mx_root_path, $board_config, $lang, $is_block, $page_id, $is_admin, $userdata; - - $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE"; - - $sql .= " approved = " . $approve; - - if ( $type ) - { - if ( $type == 'toprated' ) - { - $sql .= " AND article_totalvotes > 0"; - $sql .= " ORDER BY article_rating/article_totalvotes DESC"; - }elseif ( $type == 'latest' ) - { - $sql .= " ORDER BY article_date DESC"; - }elseif ( $type == 'mostpopular' ) - { - $sql .= " AND views > 0"; - $sql .= " ORDER BY views DESC"; - } - } - - if ( !( $article_result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); - } - - $i = 0; - - while ( $article = $db->sql_fetchrow( $article_result ) ) - { - if ( $i > 10 ) - { - break; - } - - $article_description = $article['article_description']; - $article_cat = $article['article_category_id']; - $article_approved = $article['approved']; - // type - $type_id = $article['article_type']; - $article_type = get_kb_type( $type_id ); - - $article_date = create_date( $board_config['default_dateformat'], $article['article_date'], $board_config['board_timezone'] ); - // author information - $author_id = $article['article_author_id']; - if ( $author_id == -1 ) - { - $author = ( $article['username'] == '' ) ? $lang['Guest'] : $article['username']; - } - else - { - $author = get_kb_author( $author_id ); - - $temp_url = append_sid( $phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$author_id" ); - $author = '<a href="' . $temp_url . '" class="gen">' . $author . '</a>'; - } - - $article_id = $article['article_id']; - $views = $article['views']; - - $article_title = $article['article_title']; - $temp_url = append_sid( this_kb_mxurl( "mode=article&k=$article_id" ) ); - $article = '<a href="' . $temp_url . '" class="gen">' . $article_title . '</a>'; - - $approve = ''; - $delete = ''; - $category_name = ''; - - $category = get_kb_cat( $article_cat ); - $category_id = $category['category_id']; - $category_name = $category['category_name']; - $category_temp = append_sid( this_kb_mxurl( "mode=cat&cat=$category_id" ) ); - $category_url = '<a href="' . $category_temp . '" class="genmed">' . $category_name . '</a>'; - - if ( defined( 'IN_ADMIN' ) || $userdata['user_level'] == ADMIN ) - { - $category = get_kb_cat( $article_cat ); - $category_name = $category['category_name']; - - if ( $article_approved == 2 || $article_approved == 0 ) - { - // approve - $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); - $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; - }elseif ( $article_approved == 1 ) - { - // unapprove - $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); - $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; - } - // delete - $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); - $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; - } - - if ( $article['article_rating'] == 0 || $article['article_totalvotes'] == 0 ) - { - $rating = 0; - $rating_votes = 0; - $rating_message = ''; - } - else - { - $rating = round( $postrow[$i]['link_rating'] / $postrow[$i]['link_totalvotes'], 2 ); - $rating_votes = $postrow[$i]['link_totalvotes']; - $rating_message = '(' . $rating . '/10, </span><span class="gensmall">' . $rating_votes . ' votes)'; - } - - if ( ns_auth_item( $article_cat, $type_id ) && ns_auth_cat( $article_cat ) && $kb_is_auth[$article_cat]['auth_view']) - { - $i++; - $template->assign_block_vars( $block_name, array( 'ARTICLE' => $article , - 'ARTICLE_DESCRIPTION' => $article_description, - 'ARTICLE_TYPE' => $article_type, - 'ARTICLE_DATE' => $article_date, - 'ARTICLE_AUTHOR' => $author, - 'CATEGORY' => $category_url, - 'ART_VIEWS' => $views, - 'ART_VOTES' => $rating_message, - - 'U_APPROVE' => $approve, - 'U_DELETE' => $delete ) - ); - } - } - if ( $i == 0 ) - { - $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) - ); - } - - return $template; - } - function kb_get_data($row, $userdata, $kb_post_mode = '') { --- 1677,1680 ---- Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_cat.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** kb_cat.php 28 Mar 2005 21:34:55 -0000 1.11 --- kb_cat.php 1 Apr 2005 14:14:48 -0000 1.12 *************** *** 70,73 **** --- 70,83 ---- } + if ( $kb_config['use_comments'] && $category['comments_forum_id'] < 1 ) + { + // + // Commenting is enabled but no category forum id specified + // + $message = $lang['No_cat_comments_forum_id']; + + mx_message_die(GENERAL_MESSAGE, $message); + } + if ( !$is_block ) { *************** *** 88,92 **** break; case 'Latest': ! $kb_news_sort_method = 't.topic_last_post_id'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; --- 98,103 ---- break; case 'Latest': ! //$kb_news_sort_method = 't.topic_last_post_id'; // This option is used if you want articles sorted for latest comments ! $kb_news_sort_method = 't.article_date'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; *************** *** 143,146 **** --- 154,162 ---- } + if ( $total_articles > 0 ) + { + $template->assign_block_vars( 'pagination', array() ); + } + $template->assign_vars( array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_post.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_post.php 30 Mar 2005 09:28:41 -0000 1.5 --- kb_post.php 1 Apr 2005 14:14:48 -0000 1.6 *************** *** 177,181 **** if ( $kb_is_auth['auth_mod'] || ( $kb_is_auth['auth_approval_edit'] && $userdata['user_id'] == $author_id ) ) { ! update_kb_number( $category, '+ 1' ); } } --- 177,181 ---- if ( $kb_is_auth['auth_mod'] || ( $kb_is_auth['auth_approval_edit'] && $userdata['user_id'] == $author_id ) ) { ! update_kb_number( $category_id, '+ 1' ); } } *************** *** 299,303 **** mx_add_search_words( 'single', $article_id, stripslashes( $article_text ), stripslashes( $article_title ), 'kb' ); ! $message = $lang['Article_submitted'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } else --- 299,304 ---- mx_add_search_words( 'single', $article_id, stripslashes( $article_text ), stripslashes( $article_title ), 'kb' ); ! // $message = $lang['Article_submitted'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); ! $message = $lang['Article_submitted'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( this_kb_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf($lang['Click_return_article'], '<a href="' . append_sid(this_kb_mxurl("mode=article&k=" . $article_id)). '">', '</a>') . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } else *************** *** 500,504 **** { $template->assign_block_vars( 'custom_data_fields', array( ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'] ) ); } --- 501,505 ---- { $template->assign_block_vars( 'custom_data_fields', array( ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'] ) ); } Index: kb_moderator.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_moderator.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_moderator.php 28 Mar 2005 20:22:47 -0000 1.6 --- kb_moderator.php 1 Apr 2005 14:14:48 -0000 1.7 *************** *** 28,31 **** --- 28,32 ---- $category_id = ( isset( $HTTP_GET_VARS['cat'] ) ) ? intval ( $HTTP_GET_VARS['cat']) : intval ( $HTTP_POST_VARS['cat'] ); + $article_id = ( isset( $HTTP_GET_VARS['a'] ) ) ? intval ( $HTTP_GET_VARS['a']) : intval ( $HTTP_POST_VARS['a'] ); $page_id = ( isset( $HTTP_GET_VARS['page'] ) ) ? intval ( $HTTP_GET_VARS['page']) : intval ( $HTTP_POST_VARS['page'] ); $ref_stats = ( isset( $HTTP_GET_VARS['ref'] ) ) ? true : 0; *************** *** 69,89 **** } - $article_id = intval ( $HTTP_GET_VARS['a'] ); - switch ( $action ) { case 'approve': $topic_sql = ''; if ( $kb_is_auth['auth_comment'] && $kb_config['use_comments'] ) { - $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; - if ( !( $results = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); - } - - $row = $db->sql_fetchrow( $results ); - if ( !$row['topic_id'] ) { --- 70,88 ---- } switch ( $action ) { case 'approve': + $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; + if ( !( $results = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); + } + + $row = $db->sql_fetchrow( $results ); + $topic_sql = ''; if ( $kb_is_auth['auth_comment'] && $kb_config['use_comments'] ) { if ( !$row['topic_id'] ) { *************** *** 135,141 **** } ! $sql = "SELECT article_category_id ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) --- 134,140 ---- } ! $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 144,150 **** } ! if ( $article = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $article['article_category_id']; } --- 143,149 ---- } ! if ( $row = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $row['article_category_id']; } *************** *** 161,165 **** if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT article_category_id, approved, topic_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 160,164 ---- if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; |
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14203/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_config.php admin_kb_custom.php admin_kb_rebuild_search.php admin_kb_types.php Log Message: minor fixes...sprung from the phpbb dev thread Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_kb_art.php 28 Mar 2005 20:22:43 -0000 1.14 --- admin_kb_art.php 1 Apr 2005 14:14:47 -0000 1.15 *************** *** 177,181 **** } ! $sql = "SELECT article_category_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 177,181 ---- } ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; *************** *** 186,192 **** } ! if ( $article = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $article['article_category_id']; } --- 186,192 ---- } ! if ( $row = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $row['article_category_id']; } *************** *** 202,206 **** if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT article_category_id, approved, topic_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 202,206 ---- if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:13:33
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon Modified Files: install_kb_tables.php upgrade_kb_tables.php Log Message: minor fixes...sprung from the phpbb dev thread Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** install_kb_tables.php 30 Mar 2005 10:40:47 -0000 1.5 --- install_kb_tables.php 1 Apr 2005 14:12:24 -0000 1.6 *************** *** 287,392 **** case 'mssql': case 'mssql-odbc': ! $sql[] = "CREATE TABLE " . KB_ARTICLES_TABLE . " ( ! article_id int IDENTITY (1, 1) NOT NULL, ! article_category_id int default 0, ! article_title char(255) default 0, ! article_description char(255) , ! article_date char(255) , ! article_author_id int default 2, ! username char(255), ! bbcode_uid char(10), ! article_body text, ! article_type int default 0, ! article_keywords char(255), ! approved tinyint default 0, ! topic_id bigint default 0, ! views BIGINT DEFAULT 0, ! article_rating double(6,4) NOT NULL default 0.0000, ! article_totalvotes int(255) NOT NULL default 0, ! );"; ! ! $sql[] = "INSERT INTO " . KB_ARTICLES_TABLE . " (article_category_id, article_title, article_description, article_date, article_author_id, bbcode_uid, article_body, article_type, approved, topic_id, views) VALUES (1, 'Test Article', 'This is a test article for your KB', '1057791220', 2, '93074f48a9', 'This is a test article for your Knowledge Base programmed by [b:93074f48a9]wGEric < er...@eg... > (Eric Faerber) - http://eric.best-1.biz/[/b:93074f48a9]\r\n\r\nBe sure you add categories and article types in the ACP and also change the Configuration to your liking.\r\n\r\nHave fun and enjoy your new Knowledge Base! :D', 1, 1, 1, 0,0,0);"; ! ! $sql[] = "CREATE TABLE " . KB_CATEGORIES_TABLE . " ( ! category_id int IDENTITY NOT NULL, ! category_name char(255) NOT NULL, ! category_details char(255) NOT NULL, ! number_articles int NOT NULL, ! parent int, ! cat_order int NOT NULL ! );"; ! ! $sql[] = "INSERT INTO " . KB_CATEGORIES_TABLE . " (category_name, category_details, number_articles, parent, cat_order) VALUES ('Test Category 1', 'This is a test category', '1', '0', '10')"; ! ! $sql[] = "CREATE TABLE ".KB_CONFIG_TABLE." ( ! config_name varchar(255), ! config_value varchar(255) ! );"; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("approve_new", "1")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("approve_edit", "1")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_new", "1")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_edit", "1")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("notify", "1")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("admin_id", "2")'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("show_pretext",0);'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("pt_header","Article Submission Instructions");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) values("pt_body","Please check your references and include as much information as you can.");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("forum_id", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_anon", "0");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("del_topic", "1");'; ! ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_rating", "0");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_anonymos_rating", "0");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments_show", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("mod_group", "0");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("bump_post", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("stats_list", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("header_banner", "1");'; ! ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_userid", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_ip", "1");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("art_pagination", "5");'; ! ! $sql[] ="INSERT INTO ".$mx_table_prefix."kb_config VALUES ('comments_pagination', '5')"; ! $sql[] ="INSERT INTO ".$mx_table_prefix."kb_config VALUES ('news_sort', 'Alphabetic')"; ! $sql[] ="INSERT INTO ".$mx_table_prefix."kb_config VALUES ('news_sort_par', 'ASC')"; ! ! $sql[] = "CREATE TABLE ".KB_TYPES_TABLE." ( ! id int IDENTITY NOT NULL, ! type char(255), ! );"; ! ! $sql[] = "INSERT INTO ".KB_TYPES_TABLE." (type) VALUES ('Test Type 1');"; ! ! $sql[] = "CREATE TABLE " . KB_VOTES_TABLE . " ( ! votes_ip varchar(50) NOT NULL default 0, ! votes_userid int(50) NOT NULL default 0, ! votes_file int(50) NOT NULL default 0, ! );"; ! ! $sql[] = "CREATE TABLE " . KB_SEARCH_TABLE . " ( ! search_id int NOT NULL, ! session_id char(32) NOT NULL , ! search_array text NOT NULL, ! );"; ! $sql[] = "create index session_id ON " . KB_SEARCH_TABLE . " (session_id);"; ! ! $sql[] = "CREATE TABLE ".KB_WORD_TABLE." ( ! word_text char(50) NOT NULL PRIMARY KEY, ! word_id int IDENTITY (1, 1) NOT NULL, ! word_common tinyint NOT NULL, ! );"; ! $sql[] = "CREATE INDEX word_id ON ".KB_WORD_TABLE." (word_id);"; ! ! $sql[] = "CREATE TABLE ".KB_MATCH_TABLE." ( ! article_id int NOT NULL, ! word_id int NOT NULL, ! title_match tinyint NOT NULL ! );"; ! $sql[] = "CREATE INDEX post_id_index ON ".KB_MATCH_TABLE." (article_id);"; ! $sql[] = "CREATE INDEX word_id_index ON ".KB_MATCH_TABLE." (word_id);"; ! break; ! default: die("/!\ No Database Abstraction Layer (DBAL) found /!\\"); --- 287,291 ---- case 'mssql': case 'mssql-odbc': ! default: die("/!\ No Database Abstraction Layer (DBAL) found /!\\"); Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/upgrade_kb_tables.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** upgrade_kb_tables.php 30 Mar 2005 10:40:47 -0000 1.4 --- upgrade_kb_tables.php 1 Apr 2005 14:12:27 -0000 1.5 *************** *** 190,194 **** --- 190,199 ---- $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' ADD article_rating double(6,4) NOT NULL default "0.0000" ;'; $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' ADD article_totalvotes int(255) NOT NULL default "0" ;'; + + // Upgrade the config table to avoid duplicate entries + $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_name VARCHAR(255) NOT NULL default "" ;'; + $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_value VARCHAR(255) NOT NULL default "" ;'; $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) ;'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_rating", "0") ;'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_anonymos_rating", "0") ;'; *************** *** 211,215 **** $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_ip", "1");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("art_pagination", "5");'; ! $sql[] = 'ALTER TABLE ' . KB_VOTES_TABLE . ' ADD votes_userid int(50) NOT NULL default "0" AFTER votes_ip'; } --- 216,220 ---- $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_ip", "1");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("art_pagination", "5");'; ! // $sql[] = 'ALTER TABLE ' . KB_VOTES_TABLE . ' ADD votes_userid int(50) NOT NULL default "0" AFTER votes_ip'; } *************** *** 284,323 **** case 'mssql': case 'mssql-odbc': - if ( $upgrade_101 == 1 ) - { - $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' ADD article_rating double(6,4) NOT NULL default "0.0000" ;'; - $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' ADD article_totalvotes int(255) NOT NULL default "0" ;'; - $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_rating", "0") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_anonymos_rating", "0") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments_show", "1") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("mod_group", "0") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("bump_post", "1") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("stats_list", "1") ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("header_banner", "1") ;'; - $sql[] = 'CREATE TABLE '.KB_VOTES_TABLE.' ( - votes_ip varchar(50) NOT NULL default "0", - votes_file int(50) NOT NULL default "0" - ) TYPE=MyISAM'; - } - - if ( $upgrade_102 == 1 ) - { - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_userid", "1");'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("votes_check_ip", "1");'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("art_pagination", "5");'; - $sql[] = 'ALTER TABLE ' . KB_VOTES_TABLE . ' ADD votes_userid int(50) NOT NULL default "0" AFTER votes_ip'; - } - - - if ( $upgrade_103 == 1 ) - { - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("comments_pagination", "5");'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort", "Alphabetic");'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort_par", "ASC");'; - } - break; - - break; default: --- 289,292 ---- |
Update of /cvsroot/mxbb/kb_076_mxaddon/root/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon/root/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_config.php admin_kb_custom.php admin_kb_rebuild_search.php admin_kb_types.php Log Message: minor fixes...sprung from the phpbb dev thread Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_art.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_kb_art.php 28 Mar 2005 20:54:53 -0000 1.2 --- admin_kb_art.php 1 Apr 2005 14:12:28 -0000 1.3 *************** *** 177,181 **** } ! $sql = "SELECT article_category_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 177,181 ---- } ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; *************** *** 186,192 **** } ! if ( $article = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $article['article_category_id']; } --- 186,192 ---- } ! if ( $row = $db->sql_fetchrow( $result ) ) { ! $article_category_id = $row['article_category_id']; } *************** *** 202,206 **** if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT article_category_id, approved, topic_id FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 202,206 ---- if ( $HTTP_GET_VARS['c'] == "yes" ) { ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:12:59
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon/root Modified Files: kb.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/kb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb.php 28 Mar 2005 20:54:54 -0000 1.2 --- kb.php 1 Apr 2005 14:12:29 -0000 1.3 *************** *** 19,29 **** * (at your option) any later version. */ define( 'MXBB_MODULE', false ); // Switch for making this run as a phpBB mod or mxBB module - - define( 'IN_PHPBB', true ); define( 'IN_PORTAL', true ); ! // when run as a phpBB mod these paths are identical $phpbb_root_path = $module_root_path = $mx_root_path = './'; --- 19,29 ---- * (at your option) any later version. */ + + // Main defs define( 'MXBB_MODULE', false ); // Switch for making this run as a phpBB mod or mxBB module define( 'IN_PHPBB', true ); define( 'IN_PORTAL', true ); ! // When run as a phpBB mod these paths are identical ;) $phpbb_root_path = $module_root_path = $mx_root_path = './'; *************** *** 31,35 **** include( $phpbb_root_path . 'common.' . $phpEx ); ! define( 'PAGE_KB', -500 ); // Start session management --- 31,35 ---- include( $phpbb_root_path . 'common.' . $phpEx ); ! define( 'PAGE_KB', -500 ); // If this id generates a conflict with other mods, change it ;) // Start session management |