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-01 14:12:39
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php functions_kb_field.php functions_kb_mx.php kb_article.php kb_cat.php kb_constants.php kb_footer.php kb_header.php kb_moderator.php kb_post.php kb_rate.php kb_stats.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_stats.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_stats.php 29 Mar 2005 21:39:31 -0000 1.3 --- kb_stats.php 1 Apr 2005 14:12:29 -0000 1.4 *************** *** 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_post.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_post.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_post.php 30 Mar 2005 09:28:12 -0000 1.4 --- kb_post.php 1 Apr 2005 14:12:29 -0000 1.5 *************** *** 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/kb_076_mxaddon/root/includes/kb_moderator.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_moderator.php 28 Mar 2005 20:54:53 -0000 1.2 --- kb_moderator.php 1 Apr 2005 14:12:29 -0000 1.3 *************** *** 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; Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_article.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_article.php 29 Mar 2005 21:39:31 -0000 1.4 --- kb_article.php 1 Apr 2005 14:12:28 -0000 1.5 *************** *** 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/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions_kb.php 30 Mar 2005 09:28:12 -0000 1.5 --- functions_kb.php 1 Apr 2005 14:12:28 -0000 1.6 *************** *** 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/kb_076_mxaddon/root/includes/kb_cat.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_cat.php 29 Mar 2005 21:39:31 -0000 1.4 --- kb_cat.php 1 Apr 2005 14:12:28 -0000 1.5 *************** *** 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'] ) ), |
|
From: Jon O. <jon...@us...> - 2005-04-01 14:12:39
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon/root/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/kb_076_mxaddon/root/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_cat_body.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_cat_body.tpl 1 Apr 2005 14:12:30 -0000 1.3 *************** *** 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/kb_076_mxaddon/root/templates/subSilver/kb_stats_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_stats_body.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_stats_body.tpl 1 Apr 2005 14:12:30 -0000 1.3 *************** *** 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/kb_076_mxaddon/root/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_article_body.tpl 29 Mar 2005 20:06:59 -0000 1.3 --- kb_article_body.tpl 1 Apr 2005 14:12:30 -0000 1.4 *************** *** 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/kb_076_mxaddon/root/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_post_body.tpl 28 Mar 2005 20:54:55 -0000 1.1 --- kb_post_body.tpl 1 Apr 2005 14:12:30 -0000 1.2 *************** *** 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:12:39
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12929/modules/kb_076_mxaddon/root/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/kb_076_mxaddon/root/language/lang_english/lang_kb.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_kb.php 29 Mar 2005 20:06:59 -0000 1.3 --- lang_kb.php 1 Apr 2005 14:12:29 -0000 1.4 *************** *** 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-03-30 10:41:00
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20913/modules/kb_076_mxaddon Modified Files: install_kb_tables.php upgrade_kb_tables.php Log Message: db fix Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** install_kb_tables.php 30 Mar 2005 09:53:30 -0000 1.4 --- install_kb_tables.php 30 Mar 2005 10:40:47 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- define('IN_PHPBB', 1); $phpbb_root_path = './'; + define( 'MXBB_MODULE', false ); // Switch for making this run as a phpBB mod or mxBB module include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/upgrade_kb_tables.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** upgrade_kb_tables.php 30 Mar 2005 09:53:30 -0000 1.3 --- upgrade_kb_tables.php 30 Mar 2005 10:40:47 -0000 1.4 *************** *** 21,24 **** --- 21,25 ---- define('IN_PHPBB', 1); + define( 'MXBB_MODULE', false ); // Switch for making this run as a phpBB mod or mxBB module $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); |
|
From: Jon O. <jon...@us...> - 2005-03-30 09:54:03
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25588/modules/mx_kb Modified Files: db_install.php db_upgrade.php Log Message: db fix Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** db_install.php 28 Mar 2005 20:22:45 -0000 1.23 --- db_install.php 30 Mar 2005 09:53:54 -0000 1.24 *************** *** 66,70 **** article_description varchar(255) binary NOT NULL default '', article_date varchar(255) binary NOT NULL default '', ! article_author_id mediumint(8) unsigned NOT NULL default '0', username VARCHAR(255), bbcode_uid varchar(10) binary NOT NULL default '', --- 66,70 ---- article_description varchar(255) binary NOT NULL default '', article_date varchar(255) binary NOT NULL default '', ! article_author_id mediumint(8) NOT NULL, username VARCHAR(255), bbcode_uid varchar(10) binary NOT NULL default '', Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** db_upgrade.php 28 Mar 2005 20:22:45 -0000 1.16 --- db_upgrade.php 30 Mar 2005 09:53:54 -0000 1.17 *************** *** 171,211 **** $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('news_sort_par', 'ASC')"; - /* - // Now add some new parameters - // First get function_id - $sqltmp = "SELECT function_id - FROM " . $mx_table_prefix . "function" . " - WHERE function_file = 'kb.php' - LIMIT 1"; - if ( !( $result = $db->sql_query( $sqltmp ) ) ) - { - message_die( CRITICAL_ERROR, "Could not query portal version", "", __LINE__, __FILE__, $sql ); - } - - $row = $db->sql_fetchrow( $result ) ; - $function_id = $row['function_id']; - // Then get block_id(s) - $sqltmp2 = "SELECT block_id - FROM " . $mx_table_prefix . "block" . " - WHERE function_id = '$function_id' - LIMIT 1"; - if ( !( $result = $db->sql_query( $sqltmp2 ) ) ) - { - message_die( CRITICAL_ERROR, "Could not query portal version", "", __LINE__, __FILE__, $sql ); - } - - $parameter_id = getMaxId( PARAMETER_TABLE, 'parameter_id' ); - $parameter_id1 = $parameter_id + 1; - $sql[] = "REPLACE INTO " . $mx_table_prefix . "parameter VALUES('" . $parameter_id1 . "', '" . $function_id . "', 'kb_type_select', 'Text', 'array(\"init\"=>\"1\")', '')"; - - while ( $row = $db->sql_fetchrow( $result ) ) - { - $block_id = $row['block_id']; - $sql[] = "REPLACE INTO " . $mx_table_prefix . "block_system_parameter VALUES('" . $block_id . "', '" . $parameter_id1 . "', 'array(\"init\"=>\"1\")', NULL)"; - } - // Also, enable function admin file - $sql[] = "UPDATE " . $mx_table_prefix . "function SET function_admin = 'modules/mx_kb/admin/kb_config.php' - WHERE function_id = '" . $function_id . "' OR function_file = 'kb.php'"; - */ } --- 171,174 ---- *************** *** 270,274 **** customdata_custom int(50) NOT NULL default '0', data text NOT NULL ! )"; } else --- 233,239 ---- customdata_custom int(50) NOT NULL default '0', data text NOT NULL ! )"; ! ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_articles MODIFY article_author_id mediumint(8) NOT NULL "; } else |
|
From: Jon O. <jon...@us...> - 2005-03-30 09:53:43
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25435/modules/kb_076_mxaddon Modified Files: install_kb_tables.php upgrade_kb_tables.php Log Message: db fix Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** install_kb_tables.php 29 Mar 2005 21:39:30 -0000 1.3 --- install_kb_tables.php 30 Mar 2005 09:53:30 -0000 1.4 *************** *** 138,142 **** article_description varchar(255) binary NOT NULL default "", article_date varchar(255) binary NOT NULL default "", ! article_author_id mediumint(8) unsigned NOT NULL default "0", username VARCHAR(255), bbcode_uid varchar(10) binary NOT NULL default "", --- 138,142 ---- article_description varchar(255) binary NOT NULL default "", article_date varchar(255) binary NOT NULL default "", ! article_author_id mediumint(8) NOT NULL, username VARCHAR(255), bbcode_uid varchar(10) binary NOT NULL default "", Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/upgrade_kb_tables.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** upgrade_kb_tables.php 28 Mar 2005 20:54:52 -0000 1.2 --- upgrade_kb_tables.php 30 Mar 2005 09:53:30 -0000 1.3 *************** *** 273,280 **** customdata_custom int(50) NOT NULL default "0", data text NOT NULL ! ) TYPE=MyISAM;'; ! ! } break; --- 273,282 ---- customdata_custom int(50) NOT NULL default "0", data text NOT NULL ! ) TYPE=MyISAM;'; + } + + $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' MODIFY article_author_id mediumint(8) NOT NULL ;'; + break; |
|
From: Jon O. <jon...@us...> - 2005-03-30 09:28:50
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11221/modules/mx_kb/includes Modified Files: functions_kb.php kb_post.php Log Message: fixed username for anonymos users Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_post.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_post.php 29 Mar 2005 21:41:03 -0000 1.4 --- kb_post.php 30 Mar 2005 09:28:41 -0000 1.5 *************** *** 108,113 **** $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); ! $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); // Check message if ( !empty( $article_text ) ) --- 108,136 ---- $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); ! ! $username = $HTTP_POST_VARS['username']; ! // Check username ! if (!empty($username)) ! { ! $username = phpbb_clean_username($username); ! ! if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) ! { ! include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); + $result = validate_username($username); + if ($result['error']) + { + $error_msg = (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg']; + + mx_message_die(GENERAL_MESSAGE, $error_msg ); + } + } + else + { + $username = ''; + } + } + // Check message if ( !empty( $article_text ) ) *************** *** 182,187 **** article_title = '$article_title', article_description = '$article_description', ! article_date = '$date', ! article_author_id = '$author_id', article_body = '$article_text', article_type = '$type_id', --- 205,209 ---- article_title = '$article_title', article_description = '$article_description', ! article_date = '$date', article_body = '$article_text', article_type = '$type_id', *************** *** 241,245 **** $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); --- 263,267 ---- $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); *************** *** 285,288 **** --- 307,311 ---- mx_message_die( GENERAL_MESSAGE, $message ); + } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** functions_kb.php 29 Mar 2005 21:41:02 -0000 1.22 --- functions_kb.php 30 Mar 2005 09:28:40 -0000 1.23 *************** *** 1131,1135 **** $smilies_on = 1 ) { ! global $db, $board_config, $user_ip, $kb_config; // initialise some variables $topic_vote = 0; --- 1131,1135 ---- $smilies_on = 1 ) { ! global $db, $board_config, $user_ip, $kb_config, $lang, $userdata; // initialise some variables $topic_vote = 0; *************** *** 1149,1152 **** --- 1149,1153 ---- $message_update_text = prepare_message(trim($message_update_text), $html_on, $bbcode_on, $smilies_on, $bbcode_uid); $subject = addslashes(unprepare_message(trim($subject))); + $username = addslashes(unprepare_message(trim($user_name))); $username = phpbb_clean_username( $username ); *************** *** 1698,1707 **** // 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']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : $username ); $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; --- 1699,1708 ---- // 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']; // Article editor $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']; *************** *** 1732,1736 **** // Compose phpBB post header ! $temp_url = PORTAL_URL . "modules/mx_kb/kb.$phpEx?mode=" . "article&k=" . $kb_comment['article_id']; $message = "[b]" . $lang['Article_title'] . ":[/b] " . preg_replace( $search, $replace, $kb_comment['article_title'] ) . "\n"; --- 1733,1737 ---- // Compose phpBB post header ! $temp_url = PORTAL_URL . this_kb_mxurl("mode=" . "article&k=" . $kb_comment['article_id']); $message = "[b]" . $lang['Article_title'] . ":[/b] " . preg_replace( $search, $replace, $kb_comment['article_title'] ) . "\n"; |
|
From: Jon O. <jon...@us...> - 2005-03-30 09:28:24
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11032/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php functions_kb_mx.php kb_post.php Log Message: fixed username for anonymos users Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_post.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_post.php 29 Mar 2005 21:39:31 -0000 1.3 --- kb_post.php 30 Mar 2005 09:28:12 -0000 1.4 *************** *** 108,113 **** $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); ! $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); // Check message if ( !empty( $article_text ) ) --- 108,136 ---- $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); ! ! $username = $HTTP_POST_VARS['username']; ! // Check username ! if (!empty($username)) ! { ! $username = phpbb_clean_username($username); ! ! if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) ! { ! include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); + $result = validate_username($username); + if ($result['error']) + { + $error_msg = (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg']; + + mx_message_die(GENERAL_MESSAGE, $error_msg ); + } + } + else + { + $username = ''; + } + } + // Check message if ( !empty( $article_text ) ) *************** *** 182,187 **** article_title = '$article_title', article_description = '$article_description', ! article_date = '$date', ! article_author_id = '$author_id', article_body = '$article_text', article_type = '$type_id', --- 205,209 ---- article_title = '$article_title', article_description = '$article_description', ! article_date = '$date', article_body = '$article_text', article_type = '$type_id', *************** *** 241,245 **** $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); --- 263,267 ---- $kb_comment = array(); ! // Populate the kb_comment variable $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); *************** *** 285,288 **** --- 307,311 ---- mx_message_die( GENERAL_MESSAGE, $message ); + } Index: functions_kb_mx.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb_mx.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_kb_mx.php 29 Mar 2005 21:39:31 -0000 1.2 --- functions_kb_mx.php 30 Mar 2005 09:28:12 -0000 1.3 *************** *** 57,61 **** global $starttime; ! message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = ''); } --- 57,61 ---- global $starttime; ! message_die($msg_code, $msg_text, $msg_title, $err_line, $err_file, $sql); } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_kb.php 29 Mar 2005 21:39:30 -0000 1.4 --- functions_kb.php 30 Mar 2005 09:28:12 -0000 1.5 *************** *** 1131,1135 **** $smilies_on = 1 ) { ! global $db, $board_config, $user_ip, $kb_config; // initialise some variables $topic_vote = 0; --- 1131,1135 ---- $smilies_on = 1 ) { ! global $db, $board_config, $user_ip, $kb_config, $lang, $userdata; // initialise some variables $topic_vote = 0; *************** *** 1149,1152 **** --- 1149,1153 ---- $message_update_text = prepare_message(trim($message_update_text), $html_on, $bbcode_on, $smilies_on, $bbcode_uid); $subject = addslashes(unprepare_message(trim($subject))); + $username = addslashes(unprepare_message(trim($user_name))); $username = phpbb_clean_username( $username ); *************** *** 1698,1707 **** // 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']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : $username ); $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; --- 1699,1708 ---- // 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']; // Article editor $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']; *************** *** 1732,1736 **** // Compose phpBB post header ! $temp_url = PORTAL_URL . "modules/mx_kb/kb.$phpEx?mode=" . "article&k=" . $kb_comment['article_id']; $message = "[b]" . $lang['Article_title'] . ":[/b] " . preg_replace( $search, $replace, $kb_comment['article_title'] ) . "\n"; --- 1733,1737 ---- // Compose phpBB post header ! $temp_url = PORTAL_URL . this_kb_mxurl("mode=" . "article&k=" . $kb_comment['article_id']); $message = "[b]" . $lang['Article_title'] . ":[/b] " . preg_replace( $search, $replace, $kb_comment['article_title'] ) . "\n"; |
|
From: Jon O. <jon...@us...> - 2005-03-30 09:28:21
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11032/modules/kb_076_mxaddon Modified Files: install_upgrade_readme.txt Log Message: fixed username for anonymos users Index: install_upgrade_readme.txt =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_upgrade_readme.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install_upgrade_readme.txt 28 Mar 2005 20:54:52 -0000 1.2 --- install_upgrade_readme.txt 30 Mar 2005 09:28:11 -0000 1.3 *************** *** 15,27 **** ## - templates/subSilver/overall_header.tpl, ## ! ## Included Files: (54) ## - kb.php, ## - kb_search.php, ! ## - admin/admin_kb_*.php (6), ## - includes/functions_.php (4), ## - includes/kb_.php, (9) ! ## - language/lang_english/lang_kb.php, ## - templates/subSilver/kb_*.tpl (14), ! ## - templates/subSilver/admin/kb_*.tpl (15), ## - templates/subSilver/images/lang_english/*.gif (1), ## - templates/subSilver/images/*.gif (2) --- 15,27 ---- ## - templates/subSilver/overall_header.tpl, ## ! ## Included Files: (58) ## - kb.php, ## - kb_search.php, ! ## - admin/admin_kb_*.php (7), ## - includes/functions_.php (4), ## - includes/kb_.php, (9) ! ## - language/lang_english/lang_.php (2), ## - templates/subSilver/kb_*.tpl (14), ! ## - templates/subSilver/admin/kb_*.tpl (17), ## - templates/subSilver/images/lang_english/*.gif (1), ## - templates/subSilver/images/*.gif (2) *************** *** 45,54 **** ## ! ## 2005/03/28 - Version KB MOD 2.01 ! ## - Name changed, since much is rewritten ;) ## - Updated with latest phpBB security patches ## - Category (PRIVATE) permissions ## - Subcategories ! ## - Comments phpBB forum set per category ## - Text reformatting options: img, link and linewidth controls ## - Rewritten BBcode/html handling (once more yes) --- 45,56 ---- ## ! ## 2005/03/29 - Version KB MOD 2.0.1 ! ## - Name changed, since much (most) is rewritten ;) ## - Updated with latest phpBB security patches ## - Category (PRIVATE) permissions ## - Subcategories ! ## - "Comments phpBB forum" set per category ! ## - Regenerate search tables adminCP ! ## - Rewritten PM/MAIL handling ## - Text reformatting options: img, link and linewidth controls ## - Rewritten BBcode/html handling (once more yes) |
|
From: Jon O. <jon...@us...> - 2005-03-29 21:41:13
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1986/modules/mx_kb/includes Modified Files: functions_kb.php kb_article.php kb_post.php kb_stats.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** kb_article.php 29 Mar 2005 20:02:00 -0000 1.16 --- kb_article.php 29 Mar 2005 21:41:02 -0000 1.17 *************** *** 38,46 **** $row = $db->sql_fetchrow( $result ); - if ( count($row) > 0 ) { $article_title = $row['article_title'] ; - // // Define censored word matches --- 38,44 ---- *************** *** 90,96 **** $author_id = $row['article_author_id']; ! if ( $author_id == 0 ) { ! $author_kb_art = ( $username != '' ) ? $lang['Guest'] : $row['username']; } else --- 88,94 ---- $author_id = $row['article_author_id']; ! if ( $author_id == -1 ) { ! $author_kb_art = ( $row['username'] == '' ) ? $lang['Guest'] : $row['username']; } else *************** *** 287,305 **** else { ! // If no phpbb topic id is created, create on ;) ! if ( !$topic_id && $approved && $kb_config['use_comments']) ! { ! $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'], $userdata['article_editor'], $userdata['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); --- 285,303 ---- else { ! $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 no phpbb topic id is created, create on ;) + if ( !$topic_id && $approved && $kb_config['use_comments'] && $kb_comment['category_forum_id'] > 0) + { // 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 ); Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_post.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_post.php 29 Mar 2005 20:02:01 -0000 1.3 --- kb_post.php 29 Mar 2005 21:41:03 -0000 1.4 *************** *** 104,113 **** $bbcode_uid = ( !empty( $HTTP_POST_VARS['bbcode_uid'] ) ) ? $HTTP_POST_VARS['bbcode_uid'] : ''; ! $date = time(); ! $author_id = intval ( $userdata['user_id'] ); $type_id = intval ( $HTTP_POST_VARS['type_id'] ); $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); ! // Check message if ( !empty( $article_text ) ) --- 104,113 ---- $bbcode_uid = ( !empty( $HTTP_POST_VARS['bbcode_uid'] ) ) ? $HTTP_POST_VARS['bbcode_uid'] : ''; ! $date = time(); ! $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); ! // Check message if ( !empty( $article_text ) ) *************** *** 342,345 **** --- 342,346 ---- $type_id = ( isset( $HTTP_POST_VARS['type_id'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['type_id'] ) ) ) : $row['article_type']; $bbcode_uid = ( isset( $HTTP_POST_VARS['bbcode_uid'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['bbcode_uid'] ) ) ) : $row['bbcode_uid']; + $username = ( isset( $HTTP_POST_VARS['username'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['username'] ) ) ) : $row['username']; if ( $preview ) *************** *** 487,490 **** --- 488,492 ---- 'ARTICLE_DESC' => $kb_desc, 'ARTICLE_BODY' => $kb_text, + 'USERNAME' => $username, 'L_ADD_ARTICLE' => $lang['Add_article'], Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** functions_kb.php 29 Mar 2005 20:01:59 -0000 1.21 --- functions_kb.php 29 Mar 2005 21:41:02 -0000 1.22 *************** *** 212,217 **** global $kb_news_sort_method_extra, $kb_news_sort_method, $kb_news_sort_par, $kb_config, $kb_is_auth; ! // $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE"; ! $sql = "SELECT t.*, u.username, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile FROM " . KB_ARTICLES_TABLE . " t, " . USERS_TABLE . " u WHERE "; --- 212,216 ---- global $kb_news_sort_method_extra, $kb_news_sort_method, $kb_news_sort_par, $kb_config, $kb_is_auth; ! $sql = "SELECT t.*, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile FROM " . KB_ARTICLES_TABLE . " t, " . USERS_TABLE . " u WHERE "; *************** *** 268,274 **** // author information $author_id = $article['article_author_id']; ! if ( $author_id == 0 ) { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; } else --- 267,273 ---- // author information $author_id = $article['article_author_id']; ! if ( $author_id == -1 ) { ! $author = ( $article['username'] == '' ) ? $lang['Guest'] : $article['username']; } else *************** *** 1582,1595 **** // author information $author_id = $article['article_author_id']; ! if ( $author_id == 0 ) { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; } else { ! $author_name = 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_name . '</a>'; } --- 1581,1594 ---- // 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>'; } *************** *** 1673,1677 **** function kb_get_data($row, $userdata, $kb_post_mode = '') { ! global $db; $kb_author_data = get_kb_author( $row['article_author_id'], true ); --- 1672,1676 ---- function kb_get_data($row, $userdata, $kb_post_mode = '') { ! global $db, $lang, $username; $kb_author_data = get_kb_author( $row['article_author_id'], true ); *************** *** 1699,1708 **** // Article author $kb_comment['article_author_id'] = $row['article_author_id']; ! $kb_comment['article_author'] = $kb_author_data['username']; $kb_comment['article_author_sig'] = $kb_author_data['user_attachsig']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = $userdata['username']; $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; --- 1698,1707 ---- // 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']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : $username ); $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; *************** *** 1710,1717 **** } // Compose phpbb comment header function kb_compose_comment( $kb_comment ) { ! global $lang, $kb_comment, $phpEx, $kb_custom_field; $search = array ( "'&(quot|#34);'i", // Replace HTML entities --- 1709,1721 ---- } + if ( $author_id == -1 ) + { + $author_kb_art = ( $username != '' ) ? $lang['Guest'] : $row['username']; + } + // Compose phpbb comment header function kb_compose_comment( $kb_comment ) { ! global $lang, $phpEx, $kb_custom_field; $search = array ( "'&(quot|#34);'i", // Replace HTML entities |
|
From: Jon O. <jon...@us...> - 2005-03-29 21:39:40
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1125/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php functions_kb_mx.php kb_article.php kb_cat.php kb_post.php kb_stats.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_article.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_article.php 29 Mar 2005 20:06:58 -0000 1.3 --- kb_article.php 29 Mar 2005 21:39:31 -0000 1.4 *************** *** 38,46 **** $row = $db->sql_fetchrow( $result ); - if ( count($row) > 0 ) { $article_title = $row['article_title'] ; - // // Define censored word matches --- 38,44 ---- *************** *** 90,96 **** $author_id = $row['article_author_id']; ! if ( $author_id == 0 ) { ! $author_kb_art = ( $username != '' ) ? $lang['Guest'] : $row['username']; } else --- 88,94 ---- $author_id = $row['article_author_id']; ! if ( $author_id == -1 ) { ! $author_kb_art = ( $row['username'] == '' ) ? $lang['Guest'] : $row['username']; } else *************** *** 287,305 **** else { ! // If no phpbb topic id is created, create on ;) ! if ( !$topic_id && $approved && $kb_config['use_comments']) ! { ! $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'], $userdata['article_editor'], $userdata['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); --- 285,303 ---- else { ! $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 no phpbb topic id is created, create on ;) + if ( !$topic_id && $approved && $kb_config['use_comments'] && $kb_comment['category_forum_id'] > 0) + { // 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 ); Index: functions_kb_mx.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb_mx.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_kb_mx.php 28 Mar 2005 20:54:53 -0000 1.1 --- functions_kb_mx.php 29 Mar 2005 21:39:31 -0000 1.2 *************** *** 20,39 **** */ - if ( !MXBB_MODULE ) - { - $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; - $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); - $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; - $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); - $script_name = ($script_name == '') ? $script_name : '/' . $script_name; - - define( 'PORTAL_URL', $server_protocol . $server_name . $server_port . $script_name . '/' ); - define( 'PHPBB_URL', PORTAL_URL ); - - $reader_mode = false; - $kb_config['news_operate_mode'] = false; - $mx_table_prefix = $table_prefix; - $is_block = false; - if ( !function_exists( mx_smilies_pass ) ) { --- 20,23 ---- *************** *** 72,258 **** global $userdata, $user_ip, $session_length; global $starttime; - - if(defined('HAS_DIED')) - { - die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); - } - - define(HAS_DIED, 1); - - - $sql_store = $sql; ! // ! // Get SQL error if we are debugging. Do this as soon as possible to prevent ! // subsequent queries from overwriting the status of sql_error() ! // ! if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) ! { ! $sql_error = $db->sql_error(); ! ! $debug_text = ''; ! ! if ( $sql_error['message'] != '' ) ! { ! $debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message']; ! } ! ! if ( $sql_store != '' ) ! { ! $debug_text .= "<br /><br />$sql_store"; ! } ! ! if ( $err_line != '' && $err_file != '' ) ! { ! $debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file); ! } ! } ! ! if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) ) ! { ! $userdata = session_pagestart($user_ip, PAGE_INDEX); ! init_userprefs($userdata); ! } ! ! // ! // If the header hasn't been output then do it ! // ! if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) ! { ! if ( empty($lang) ) ! { ! if ( !empty($board_config['default_lang']) ) ! { ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); ! } ! else ! { ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); ! } ! } ! ! if ( empty($template) ) ! { ! $template = new Template($phpbb_root_path . 'templates/' . $board_config['board_template']); ! } ! if ( empty($theme) ) ! { ! $theme = setup_style($board_config['default_style']); ! } ! ! // ! // Load the Page Header ! // ! if ( !defined('IN_ADMIN') ) ! { ! include($phpbb_root_path . 'includes/page_header.'.$phpEx); ! } ! else ! { ! include($phpbb_root_path . 'admin/page_header_admin.'.$phpEx); ! } ! } ! ! switch($msg_code) ! { ! case GENERAL_MESSAGE: ! if ( $msg_title == '' ) ! { ! $msg_title = $lang['Information']; ! } ! break; ! ! case CRITICAL_MESSAGE: ! if ( $msg_title == '' ) ! { ! $msg_title = $lang['Critical_Information']; ! } ! break; ! ! case GENERAL_ERROR: ! if ( $msg_text == '' ) ! { ! $msg_text = $lang['An_error_occured']; ! } ! ! if ( $msg_title == '' ) ! { ! $msg_title = $lang['General_Error']; ! } ! break; ! ! case CRITICAL_ERROR: ! // ! // Critical errors mean we cannot rely on _ANY_ DB information being ! // available so we're going to dump out a simple echo'd statement ! // ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); ! ! if ( $msg_text == '' ) ! { ! $msg_text = $lang['A_critical_error']; ! } ! ! if ( $msg_title == '' ) ! { ! $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; ! } ! break; ! } ! ! // ! // Add on DEBUG info if we've enabled debug mode and this is an error. This ! // prevents debug info being output for general messages should DEBUG be ! // set TRUE by accident (preventing confusion for the end user!) ! // ! if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) ! { ! if ( $debug_text != '' ) ! { ! $msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text; ! } ! } ! ! if ( $msg_code != CRITICAL_ERROR ) ! { ! if ( !empty($lang[$msg_text]) ) ! { ! $msg_text = $lang[$msg_text]; ! } ! ! if ( !defined('IN_ADMIN') ) ! { ! $template->set_filenames(array( ! 'message_body' => 'message_body.tpl') ! ); ! } ! else ! { ! $template->set_filenames(array( ! 'message_body' => 'admin/admin_message_body.tpl') ! ); ! } ! ! $template->assign_vars(array( ! 'MESSAGE_TITLE' => $msg_title, ! 'MESSAGE_TEXT' => $msg_text) ! ); ! $template->pparse('message_body'); ! ! if ( !defined('IN_ADMIN') ) ! { ! include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ! } ! else ! { ! include($phpbb_root_path . 'admin/page_footer_admin.'.$phpEx); ! } ! } ! else ! { ! echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>"; ! } ! ! exit; } --- 56,61 ---- global $userdata, $user_ip, $session_length; global $starttime; ! message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = ''); } *************** *** 612,615 **** } } - } ?> \ No newline at end of file --- 415,417 ---- Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_kb.php 29 Mar 2005 20:06:57 -0000 1.3 --- functions_kb.php 29 Mar 2005 21:39:30 -0000 1.4 *************** *** 212,217 **** global $kb_news_sort_method_extra, $kb_news_sort_method, $kb_news_sort_par, $kb_config, $kb_is_auth; ! // $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE"; ! $sql = "SELECT t.*, u.username, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile FROM " . KB_ARTICLES_TABLE . " t, " . USERS_TABLE . " u WHERE "; --- 212,216 ---- global $kb_news_sort_method_extra, $kb_news_sort_method, $kb_news_sort_par, $kb_config, $kb_is_auth; ! $sql = "SELECT t.*, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile FROM " . KB_ARTICLES_TABLE . " t, " . USERS_TABLE . " u WHERE "; *************** *** 268,274 **** // author information $author_id = $article['article_author_id']; ! if ( $author_id == 0 ) { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; } else --- 267,273 ---- // author information $author_id = $article['article_author_id']; ! if ( $author_id == -1 ) { ! $author = ( $article['username'] == '' ) ? $lang['Guest'] : $article['username']; } else *************** *** 1582,1595 **** // author information $author_id = $article['article_author_id']; ! if ( $author_id == 0 ) { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; } else { ! $author_name = 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_name . '</a>'; } --- 1581,1594 ---- // 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>'; } *************** *** 1673,1677 **** function kb_get_data($row, $userdata, $kb_post_mode = '') { ! global $db; $kb_author_data = get_kb_author( $row['article_author_id'], true ); --- 1672,1676 ---- function kb_get_data($row, $userdata, $kb_post_mode = '') { ! global $db, $lang, $username; $kb_author_data = get_kb_author( $row['article_author_id'], true ); *************** *** 1699,1708 **** // Article author $kb_comment['article_author_id'] = $row['article_author_id']; ! $kb_comment['article_author'] = $kb_author_data['username']; $kb_comment['article_author_sig'] = $kb_author_data['user_attachsig']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = $userdata['username']; $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; --- 1698,1707 ---- // 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']; // Article editor $kb_comment['article_editor_id'] = $userdata['user_id']; ! $kb_comment['article_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : ( ( $username == '' ) ? $lang['Guest'] : $username ); $kb_comment['article_editor_sig'] = $userdata['user_attachsig']; *************** *** 1710,1717 **** } // Compose phpbb comment header function kb_compose_comment( $kb_comment ) { ! global $lang, $kb_comment, $phpEx, $kb_custom_field; $search = array ( "'&(quot|#34);'i", // Replace HTML entities --- 1709,1721 ---- } + if ( $author_id == -1 ) + { + $author_kb_art = ( $username != '' ) ? $lang['Guest'] : $row['username']; + } + // Compose phpbb comment header function kb_compose_comment( $kb_comment ) { ! global $lang, $phpEx, $kb_custom_field; $search = array ( "'&(quot|#34);'i", // Replace HTML entities Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_post.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_post.php 29 Mar 2005 20:06:58 -0000 1.2 --- kb_post.php 29 Mar 2005 21:39:31 -0000 1.3 *************** *** 104,113 **** $bbcode_uid = ( !empty( $HTTP_POST_VARS['bbcode_uid'] ) ) ? $HTTP_POST_VARS['bbcode_uid'] : ''; ! $date = time(); ! $author_id = intval ( $userdata['user_id'] ); $type_id = intval ( $HTTP_POST_VARS['type_id'] ); $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); ! // Check message if ( !empty( $article_text ) ) --- 104,113 ---- $bbcode_uid = ( !empty( $HTTP_POST_VARS['bbcode_uid'] ) ) ? $HTTP_POST_VARS['bbcode_uid'] : ''; ! $date = time(); ! $author_id = $userdata['user_id'] > 0 ? intval ( $userdata['user_id'] ) : '-1'; $type_id = intval ( $HTTP_POST_VARS['type_id'] ); $username = phpbb_clean_username( $HTTP_POST_VARS['username'] ); ! // Check message if ( !empty( $article_text ) ) *************** *** 342,345 **** --- 342,346 ---- $type_id = ( isset( $HTTP_POST_VARS['type_id'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['type_id'] ) ) ) : $row['article_type']; $bbcode_uid = ( isset( $HTTP_POST_VARS['bbcode_uid'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['bbcode_uid'] ) ) ) : $row['bbcode_uid']; + $username = ( isset( $HTTP_POST_VARS['username'] ) ) ? htmlspecialchars( trim( stripslashes( $HTTP_POST_VARS['username'] ) ) ) : $row['username']; if ( $preview ) *************** *** 487,490 **** --- 488,492 ---- 'ARTICLE_DESC' => $kb_desc, 'ARTICLE_BODY' => $kb_text, + 'USERNAME' => $username, 'L_ADD_ARTICLE' => $lang['Add_article'], |
|
From: Jon O. <jon...@us...> - 2005-03-29 21:39:40
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1125/modules/kb_076_mxaddon Modified Files: install_kb_tables.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install_kb_tables.php 28 Mar 2005 20:54:49 -0000 1.2 --- install_kb_tables.php 29 Mar 2005 21:39:30 -0000 1.3 *************** *** 152,156 **** $sql[] = 'INSERT INTO '. KB_ARTICLES_TABLE .' VALUES ( ! 1, 1, "Test Article", "This is a test article for your KB", "1057708235", 2, "", "93074f48a9", "This is a test article for your Knowledge Base programmed by wGEric < er...@eg... > (Eric Faerber) - http://eric.best-1.biz/ and Haplo < jon...@ho... > (Jon Ohlsson) - http://www.mx-system.com/ \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 );'; --- 152,156 ---- $sql[] = 'INSERT INTO '. KB_ARTICLES_TABLE .' VALUES ( ! 1, 1, "Test Article", "This is a test article for your KB", "1057708235", 2, "", "93074f48a9", "This is a test article for your Knowledge Base. This MOD is based on code written by wGEric < er...@eg... > (Eric Faerber) - http://eric.best-1.biz/, now supervised by _Haplo < jon...@ho... > (Jon Ohlsson) - http://www.mx-system.com/ \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, 0, 0,0,0 );'; |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:07:40
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431/modules/kb_076_mxaddon/root/includes Modified Files: functions_kb.php kb_article.php kb_post.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_article.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_article.php 28 Mar 2005 20:54:53 -0000 1.2 --- kb_article.php 29 Mar 2005 20:06:58 -0000 1.3 *************** *** 424,428 **** $i = 0; ! while ( $i < count( $art_pages ) ) { --- 424,428 ---- $i = 0; ! while ( $i < count( $art_pages ) ) { *************** *** 431,435 **** $art_split = explode( '[toc]', $art_pages[$i] ); $article_toc = $art_split[0]; ! // Fix up the toc title --- 431,435 ---- $art_split = explode( '[toc]', $art_pages[$i] ); $article_toc = $art_split[0]; ! // Fix up the toc title *************** *** 441,445 **** // Parse message ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); $article_toc = make_clickable( $article_toc ); --- 441,445 ---- // Parse message ! $article_toc = preg_replace( "'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc ); // Fixed $article_toc = make_clickable( $article_toc ); Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_post.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_post.php 28 Mar 2005 20:54:53 -0000 1.1 --- kb_post.php 29 Mar 2005 20:06:58 -0000 1.2 *************** *** 240,263 **** } ! if ( !$approve || $approve == 0 ) ! { ! email_kb_admin( $kb_config['notify'] ); ! } // Insert phpBB post if using kb commenting if ( $approve == 1 && $kb_config['use_comments'] && $kb_is_auth['auth_comment']) { - $kb_comment = array(); - - // Populate the kb_comment variable - $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); - - // 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 ); --- 240,258 ---- } ! $kb_comment = array(); ! ! // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); + // 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 phpBB post if using kb commenting 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 ); *************** *** 272,275 **** --- 267,274 ---- } + $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 ); Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/functions_kb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_kb.php 28 Mar 2005 20:54:53 -0000 1.2 --- functions_kb.php 29 Mar 2005 20:06:57 -0000 1.3 *************** *** 403,528 **** // email admin ! function email_kb_admin( $action ) { ! global $lang, $emailer, $board_config, $kb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $is_block, $page_id, $images; ! if ( $action == 2 ) { ! $email_body = $lang['Email_body']; ! include( $phpbb_root_path . 'includes/emailer.' . $phpEx ); ! $emailer = new emailer( $board_config['smtp_delivery'] ); ! $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n"; ! $emailer->email_address( $board_config['board_email'] ); ! $emailer->set_subject( $lang['New_article'] ); ! $emailer->extra_headers( $email_headers ); ! $emailer->msg = $email_body; - $emailer->send(); - $emailer->reset(); } ! else if ( $action == 1 ) { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = '1', user_last_privmsg = '9999999999' ! WHERE user_id = " . $kb_config['admin_id']; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql ); ! } ! // added by snake for extended PM ! $approve_pm_view = "<table width=" . "100%" . " border=" . "1" . " cellspacing=" . "0" . " cellpadding=" . "0" . "><tr><td>" . $lang['Category'] . "</td><td>" . $lang['Art_action'] . "</td></tr>"; ! ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE approved = '2' ORDER BY article_id DESC LIMIT 1"; ! if ( !( $article_result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); ! } ! ! while ( $article = $db->sql_fetchrow( $article_result ) ) ! { ! $approved_yesno = $article['approved']; ! $article_description = $article['article_description']; ! $article_cat = $article['article_category_id']; ! $bbcode_uid = $article['bbcode_uid']; // to enadbe bbcode from article html seems to wolr by default even whwn off ! $articlebody = "[quote:$bbcode_uid]" . $article['article_body'] . "<br>[/quote:$bbcode_uid]"; // include the post for approve.. ! // 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 == 0 ) ! { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; ! } ! else ! { ! $author_name = 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_name . '</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_name = $category['category_name']; ! ! $kb_path_tmp = MXBB_MODULE ? PORTAL_URL . $module_root_path : $phpbb_root_path; ! ! if ( $approved_yesno == 2 ) ! { ! // approve ! $temp_url = append_sid( $kb_path_tmp . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); ! $approve = '<a href="' . $temp_url . '"><img src="' . PORTAL_URL . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! } ! else ! { ! // unapprove ! $temp_url = append_sid( $kb_path_tmp . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); ! $unapprove = '<a href="' . $temp_url . '"><img src="' . PORTAL_URL . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; ! } ! $temp_url = append_sid( $kb_path_tmp . "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>'; ! $approve_pm_view .= "<tr><td>$category_name</td><td>$approve ' ' $delete ' ' $unapprove</td></tr>"; // the action table ! } ! ! $approve_pm_view .= "</table>"; // end action table ! ! $user_id = $kb_config['admin_id']; ! $new_article_subject = $lang['New_article']; ! $new_article = $lang['Email_body']; // original code ! $new_article .= $articlebody; // the extended Pm body ! $new_article .= '<p>' . $approve_pm_view; // the extended Pm body ! $new_article .= '<br><a href=' . $kb_path_tmp . 'admin/admin_kb_art.' . $phpEx . '>KB Admin page</a><br>'; // the extended Pm body ! $new_article = addslashes( $new_article ); ! ! $privmsgs_date = date( "U" ); ! // End Snake Extend PM Mod ! $sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('5', '" . $new_article_subject . "', '" . $user_id . "', '" . $user_id . "', '" . $privmsgs_date . "', '0', '1', '1', '0')"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql ); ! } ! $privmsg_sent_id = $db->sql_nextid(); ! $privmsgs_text = $lang['register_pm_subject']; ! ! $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . $new_article . "')"; // need to aply the bbcode_uid for bbcode to work ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql ); ! } } - return; } --- 403,425 ---- // email admin ! 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 { ! $email_subject = $lang['KB_title'] . ' - ' . $lang['KB_notify_subject']; ! $email_body = $lang['KB_notify_body'] . '\n\n\n' . $message; ! kb_mailer( $to_id, $email_body, $email_subject, $from_id ); } ! else if ( $action == 1 ) // PM { ! $email_subject = $lang['KB_title'] . ' - ' . $lang['KB_notify_subject']; ! $email_body = $lang['KB_notify_body'] . '\n\n\n' . $message; ! ! kb_insert_pm( $to_id, $email_body, $email_subject, $from_id ); } } *************** *** 706,709 **** --- 603,688 ---- } // insert_pm() + function kb_mailer( + $to_id, + $message, + $subject, + $from_id, + $html_on = 0, + $bbcode_on = 1, + $smilies_on = 1) + { + global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; + + if ( !$from_id ) + { + $from_id = $userdata['user_id']; + } + + //get varibles ready + $to_id = intval($to_id); + $from_id = intval($from_id); + $msg_time = time(); + $attach_sig = $userdata['user_attachsig']; + + //get to users info + $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active + FROM " . USERS_TABLE . " + WHERE user_id = '$to_id' + AND user_id <> " . ANONYMOUS; + if ( !($result = $db->sql_query($sql)) ) + { + $error = TRUE; + $error_msg = $lang['No_such_user']; + } + + $to_userdata = $db->sql_fetchrow($result); + + $privmsg_subject = trim(strip_tags($subject)); + if ( empty($privmsg_subject) ) + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject']; + } + + if ( !empty($message) ) + { + if ( !$error ) + { + if ( $bbcode_on ) + { + $bbcode_uid = make_bbcode_uid(); + } + + $privmsg_message = prepare_message($message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); + + } + } + else + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_message']; + } + + + $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); + $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx; + $server_name = trim($board_config['server_name']); + $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; + $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; + + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $emailer->from( $board_config['board_email'] ); + $emailer->replyto( $board_config['board_email'] ); + + $emailer->email_address($to_userdata['user_email'] ); + $emailer->set_subject( $subject ); + $emailer->msg = $message; + + $emailer->send(); + $emailer->reset(); + } // get categories for index |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:07:39
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431/modules/kb_076_mxaddon/root/language/lang_english Modified Files: lang_kb.php Added Files: lang_admin_rebuild_search.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: lang_admin_rebuild_search.php --- <?php $lang['Rebuild_search'] = 'Rebuild Search'; $lang['Rebuild_search_desc'] = 'This will index every post in your phpBB, rebuilding the search tables. It may take a long time to process, so please do not move from this page until it is complete.'; $lang['Post_limit'] = 'Post limit'; $lang['Time_limit'] = 'Time limit'; $lang['Refresh_rate'] = 'Refresh rate'; $lang['Next'] = 'Next'; $lang['Finished'] = 'Finished'; ?> Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/language/lang_english/lang_kb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_kb.php 28 Mar 2005 20:54:54 -0000 1.2 --- lang_kb.php 29 Mar 2005 20:06:59 -0000 1.3 *************** *** 148,153 **** $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; ! $lang['New_article'] = 'New Article in your Knowledge Base!'; ! $lang['Email_body'] = 'An article has been submitted to your Knowledge Base.<br />\nRead the article and then approve or delete the article.<br />\nArticle is included below:<br />\n'; $lang['Category_Permissions'] = 'Category Permissions'; --- 148,153 ---- $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; ! $lang['KB_notify_subject'] = 'New (or edited) Article!'; ! $lang['KB_notify_body'] = 'A new article has been submitted or edited.'; $lang['Category_Permissions'] = 'Category Permissions'; |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:07:39
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431/modules/kb_076_mxaddon/root/templates/subSilver Modified Files: kb_article_body.tpl Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_article_body.tpl 28 Mar 2005 20:54:55 -0000 1.2 --- kb_article_body.tpl 29 Mar 2005 20:06:59 -0000 1.3 *************** *** 22,26 **** <span class="gensmall">{VIEWS}<br /></span> <span class="gensmall"><b>{L_ARTICLE_DESCRIPTION}</b></span> <span class="gen">{ARTICLE_DESCRIPTION}<br /></span> - <span class="gensmall"><b>{L_ARTICLE_KEYWORDS}</b></span> <span class="gen">{ARTICLE_KEYWORDS}</span> <span class="gensmall"><b>{L_ARTICLE_CATEGORY}</b></span> <span class="gen">{ARTICLE_CATEGORY}</span> <span class="gensmall"><b>{L_ARTICLE_TYPE}</b></span> <span class="gen">{ARTICLE_TYPE}</span> --- 22,25 ---- |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:07:15
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431/modules/kb_076_mxaddon/root/admin Added Files: admin_kb_rebuild_search.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: admin_kb_rebuild_search.php --- <?php /*************************************************************************** * admin_rebuild_search.php * ------------------- * begin : Thursday, Jul 12, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: admin_kb_rebuild_search.php,v 1.1 2005/03/29 20:07:01 jonohlsson Exp $ * * ***************************************************************************/ $start_time = time (); $time_limit = $HTTP_GET_VARS['time_limit']; if ( file_exists( './../viewtopic.php' ) ) { define( 'IN_PHPBB', 1 ); define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['KB_title']['Optimize tables'] = $file; return; } $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); include( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_auth.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_field.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_mx.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } else { define( 'IN_PORTAL', 1 ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['KB_title']['Optimize tables'] = 'modules/mx_kb/admin/' . $file; return; } $mx_root_path = '../../../'; $module_root_path = "../"; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); include( $module_root_path . 'includes/functions_kb.' . $phpEx ); include( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); include( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx ) ) { include ($module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx); } else { include ($module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx); } $page_title = $lang['Page_title']; if (isset ($HTTP_GET_VARS['start'])) { function onTime () { global $start_time, $time_limit; static $max_execution_time; $current_time = time (); if (empty ($max_execution_time)) { if (ini_get ('safe_mode') == false) { set_time_limit (0); $max_execution_time = $time_limit; } else { $max_execution_time = ini_get ('max_execution_time'); } } return (($current_time - $start_time) < $max_execution_time) ? true : false; } $start = $HTTP_GET_VARS['start']; if ($start == 0) { $sql = "DELETE FROM ". KB_SEARCH_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". KB_WORD_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". KB_MATCH_TABLE; $result = $db->sql_query ($sql); $sql = "SELECT article_id FROM ". KB_ARTICLES_TABLE; $result = $db->sql_query ($sql); $total_num_rows = $db->sql_numrows ($result); } $total_num_rows = (isset ($HTTP_GET_VARS['total_num_rows'])) ? $HTTP_GET_VARS['total_num_rows'] : $total_num_rows; $sql = "SELECT article_id, article_title, article_body FROM ". KB_ARTICLES_TABLE ." LIMIT $start, ". $HTTP_GET_VARS['post_limit']; $result = $db->sql_query ($sql); $num_rows = 0; while (($row = $db->sql_fetchrow ($result)) ) { mx_add_search_words('single', $row['article_id'], stripslashes($row['article_body']), stripslashes($row['article_title']), 'kb'); $num_rows++; } $template->set_filenames(array( "body" => "admin/admin_message_body.tpl") ); if (($start + $num_rows) != $total_num_rows) { $form_action = append_sid ("admin_kb_rebuild_search.$phpEx?start=". ($start + $num_rows) ."&total_num_rows=$total_num_rows&post_limit=". $HTTP_GET_VARS['post_limit'] ."&time_limit=$time_limit&refresh_rate=". $HTTP_GET_VARS['refresh_rate']); $next = $lang['Next']; $template->assign_vars(array( "META" => '<meta http-equiv="refresh" content="'. $HTTP_GET_VARS['refresh_rate'] .';url='. $form_action .'">') ); } else { $next = $lang['Finished']; $form_action = append_sid ("admin_kb_rebuild_search.$phpEx"); } // include ('./page_header_admin.'.$phpEx); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'PERCENT' => round ((($start + $num_rows) / $total_num_rows) * 100), 'L_NEXT' => $next, 'START' => $start + $num_rows, 'TOTAL_NUM_ROWS' => $total_num_rows, 'S_REBUILD_SEARCH_ACTION' => $form_action) ); $template->set_filenames (array ( "body" => "admin/kb_rebuild_search_progress.tpl") ); } else { // include('./page_header_admin.'.$phpEx); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'L_REBUILD_SEARCH' => $lang['Rebuild_search'], 'L_REBUILD_SEARCH_DESC' => $lang['Rebuild_search_desc'], 'L_POST_LIMIT' => $lang['Post_limit'], 'L_TIME_LIMIT' => $lang['Time_limit'], 'L_REFRESH_RATE' => $lang['Refresh_rate'], 'SESSION_ID' => $userdata['session_id'], 'S_REBUILD_SEARCH_ACTION' => append_sid ("admin_kb_rebuild_search.$phpEx")) ); $template->set_filenames (array ( "body" => "admin/kb_rebuild_search.tpl") ); } $template->pparse ('body'); // // Page Footer // // include('./page_footer_admin.'.$phpEx); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:07:14
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8431/modules/kb_076_mxaddon/root/templates/subSilver/admin Added Files: kb_rebuild_search.tpl kb_rebuild_search_progress.tpl Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: kb_rebuild_search_progress.tpl --- <h1 style="text-align: center;">{PERCENT} %</h1> <form method="post" action="{S_REBUILD_SEARCH_ACTION}"> <input type="hidden" name="start" value="{START}"> <input type="hidden" name="total_num_rows" value="{TOTAL_NUM_ROWS}"> <div style="text-align: center;"><input class="mainoption" type="submit" name="submit" value="{L_NEXT}" /></div> </form> --- NEW FILE: kb_rebuild_search.tpl --- <h1>{L_REBUILD_SEARCH}</h1> <p>{L_REBUILD_SEARCH_DESC}</p> <form method="get" action="{S_REBUILD_SEARCH_ACTION}"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> <tr> <th colspan="2" class="thHead">{L_REBUILD_SEARCH}</th> </tr> <tr> <td class="row1">{L_POST_LIMIT}</td> <td class="row1"><input class="post" type="text" name="post_limit" value="1000" /></td> </tr> <tr> <td class="row2">{L_TIME_LIMIT}</td> <td class="row2"><input class="post" type="text" name="time_limit" value="120" /></td> </tr> <tr> <td class="row1">{L_REFRESH_RATE}</td> <td class="row1"><input class="post" type="text" name="refresh_rate" value="3" /></td> </tr> <tr> <td class="catBottom" colspan="2" align="center"><input type="hidden" name="sid" value="{SESSION_ID}" /><input type="hidden" name="start" value="0" /><input class="mainoption" type="submit" name="submit" value="{L_REBUILD_SEARCH}" /></td> </tr> </table> </form> |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:02:52
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627/modules/mx_kb/templates/subSilver Modified Files: kb_article_body.tpl Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** kb_article_body.tpl 28 Mar 2005 20:22:48 -0000 1.11 --- kb_article_body.tpl 29 Mar 2005 20:02:10 -0000 1.12 *************** *** 22,26 **** <span class="gensmall">{VIEWS}<br /></span> <span class="gensmall"><b>{L_ARTICLE_DESCRIPTION}</b></span> <span class="gen">{ARTICLE_DESCRIPTION}<br /></span> - <span class="gensmall"><b>{L_ARTICLE_KEYWORDS}</b></span> <span class="gen">{ARTICLE_KEYWORDS}</span> <span class="gensmall"><b>{L_ARTICLE_CATEGORY}</b></span> <span class="gen">{ARTICLE_CATEGORY}</span> <span class="gensmall"><b>{L_ARTICLE_TYPE}</b></span> <span class="gen">{ARTICLE_TYPE}</span> --- 22,25 ---- |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:02:50
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627/modules/mx_kb/language/lang_english Modified Files: lang_kb.php Added Files: lang_admin_rebuild_search.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: lang_admin_rebuild_search.php --- <?php $lang['Rebuild_search'] = 'Rebuild Search'; $lang['Rebuild_search_desc'] = 'This will index every post in your phpBB, rebuilding the search tables. It may take a long time to process, so please do not move from this page until it is complete.'; $lang['Post_limit'] = 'Post limit'; $lang['Time_limit'] = 'Time limit'; $lang['Refresh_rate'] = 'Refresh rate'; $lang['Next'] = 'Next'; $lang['Finished'] = 'Finished'; ?> Index: lang_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_kb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** lang_kb.php 28 Mar 2005 20:22:48 -0000 1.15 --- lang_kb.php 29 Mar 2005 20:02:10 -0000 1.16 *************** *** 148,153 **** $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; ! $lang['New_article'] = 'New Article in your Knowledge Base!'; ! $lang['Email_body'] = 'An article has been submitted to your Knowledge Base.<br />\nRead the article and then approve or delete the article.<br />\nArticle is included below:<br />\n'; $lang['Category_Permissions'] = 'Category Permissions'; --- 148,153 ---- $lang['KB_config_updated'] = 'Knowledge Base Configuration Updated Successfully.'; ! $lang['KB_notify_subject'] = 'New (or edited) Article!'; ! $lang['KB_notify_body'] = 'A new article has been submitted or edited.'; $lang['Category_Permissions'] = 'Category Permissions'; |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:02:48
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627/modules/mx_kb/includes Modified Files: functions_kb.php kb_article.php kb_post.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kb_article.php 28 Mar 2005 20:22:47 -0000 1.15 --- kb_article.php 29 Mar 2005 20:02:00 -0000 1.16 *************** *** 424,428 **** $i = 0; ! while ( $i < count( $art_pages ) ) { --- 424,428 ---- $i = 0; ! while ( $i < count( $art_pages ) ) { *************** *** 431,435 **** $art_split = explode( '[toc]', $art_pages[$i] ); $article_toc = $art_split[0]; ! // Fix up the toc title --- 431,435 ---- $art_split = explode( '[toc]', $art_pages[$i] ); $article_toc = $art_split[0]; ! // Fix up the toc title *************** *** 441,445 **** // Parse message ! $article_toc = preg_replace( "/\[(\S+)\]/e", "", $article_toc ); $article_toc = make_clickable( $article_toc ); --- 441,445 ---- // Parse message ! $article_toc = preg_replace( "'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc ); // Fixed $article_toc = make_clickable( $article_toc ); Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_post.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_post.php 28 Mar 2005 20:22:47 -0000 1.2 --- kb_post.php 29 Mar 2005 20:02:01 -0000 1.3 *************** *** 240,263 **** } ! if ( !$approve || $approve == 0 ) ! { ! email_kb_admin( $kb_config['notify'] ); ! } // Insert phpBB post if using kb commenting if ( $approve == 1 && $kb_config['use_comments'] && $kb_is_auth['auth_comment']) { - $kb_comment = array(); - - // Populate the kb_comment variable - $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); - - // 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 ); --- 240,258 ---- } ! $kb_comment = array(); ! ! // Populate the kb_comment variable ! $kb_comment = kb_get_data($row, $userdata, $kb_post_mode); + // 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 phpBB post if using kb commenting 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 ); *************** *** 272,275 **** --- 267,274 ---- } + $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 ); Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** functions_kb.php 28 Mar 2005 20:22:46 -0000 1.20 --- functions_kb.php 29 Mar 2005 20:01:59 -0000 1.21 *************** *** 403,528 **** // email admin ! function email_kb_admin( $action ) { ! global $lang, $emailer, $board_config, $kb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $is_block, $page_id, $images; ! if ( $action == 2 ) { ! $email_body = $lang['Email_body']; ! include( $phpbb_root_path . 'includes/emailer.' . $phpEx ); ! $emailer = new emailer( $board_config['smtp_delivery'] ); ! $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n"; ! $emailer->email_address( $board_config['board_email'] ); ! $emailer->set_subject( $lang['New_article'] ); ! $emailer->extra_headers( $email_headers ); ! $emailer->msg = $email_body; - $emailer->send(); - $emailer->reset(); } ! else if ( $action == 1 ) { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = '1', user_last_privmsg = '9999999999' ! WHERE user_id = " . $kb_config['admin_id']; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql ); ! } ! // added by snake for extended PM ! $approve_pm_view = "<table width=" . "100%" . " border=" . "1" . " cellspacing=" . "0" . " cellpadding=" . "0" . "><tr><td>" . $lang['Category'] . "</td><td>" . $lang['Art_action'] . "</td></tr>"; ! ! $sql = "SELECT * FROM " . KB_ARTICLES_TABLE . " WHERE approved = '2' ORDER BY article_id DESC LIMIT 1"; ! if ( !( $article_result = $db->sql_query( $sql ) ) ) ! { ! message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); ! } ! ! while ( $article = $db->sql_fetchrow( $article_result ) ) ! { ! $approved_yesno = $article['approved']; ! $article_description = $article['article_description']; ! $article_cat = $article['article_category_id']; ! $bbcode_uid = $article['bbcode_uid']; // to enadbe bbcode from article html seems to wolr by default even whwn off ! $articlebody = "[quote:$bbcode_uid]" . $article['article_body'] . "<br>[/quote:$bbcode_uid]"; // include the post for approve.. ! // 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 == 0 ) ! { ! $author = ( $username != '' ) ? $lang['Guest'] : $article['username']; ! } ! else ! { ! $author_name = 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_name . '</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_name = $category['category_name']; ! ! $kb_path_tmp = MXBB_MODULE ? PORTAL_URL . $module_root_path : $phpbb_root_path; ! ! if ( $approved_yesno == 2 ) ! { ! // approve ! $temp_url = append_sid( $kb_path_tmp . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); ! $approve = '<a href="' . $temp_url . '"><img src="' . PORTAL_URL . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; ! } ! else ! { ! // unapprove ! $temp_url = append_sid( $kb_path_tmp . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); ! $unapprove = '<a href="' . $temp_url . '"><img src="' . PORTAL_URL . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; ! } ! $temp_url = append_sid( $kb_path_tmp . "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>'; ! $approve_pm_view .= "<tr><td>$category_name</td><td>$approve ' ' $delete ' ' $unapprove</td></tr>"; // the action table ! } ! ! $approve_pm_view .= "</table>"; // end action table ! ! $user_id = $kb_config['admin_id']; ! $new_article_subject = $lang['New_article']; ! $new_article = $lang['Email_body']; // original code ! $new_article .= $articlebody; // the extended Pm body ! $new_article .= '<p>' . $approve_pm_view; // the extended Pm body ! $new_article .= '<br><a href=' . $kb_path_tmp . 'admin/admin_kb_art.' . $phpEx . '>KB Admin page</a><br>'; // the extended Pm body ! $new_article = addslashes( $new_article ); ! ! $privmsgs_date = date( "U" ); ! // End Snake Extend PM Mod ! $sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('5', '" . $new_article_subject . "', '" . $user_id . "', '" . $user_id . "', '" . $privmsgs_date . "', '0', '1', '1', '0')"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql ); ! } ! $privmsg_sent_id = $db->sql_nextid(); ! $privmsgs_text = $lang['register_pm_subject']; ! ! $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . $new_article . "')"; // need to aply the bbcode_uid for bbcode to work ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql ); ! } } - return; } --- 403,425 ---- // email admin ! 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 { ! $email_subject = $lang['KB_title'] . ' - ' . $lang['KB_notify_subject']; ! $email_body = $lang['KB_notify_body'] . '\n\n\n' . $message; ! kb_mailer( $to_id, $email_body, $email_subject, $from_id ); } ! else if ( $action == 1 ) // PM { ! $email_subject = $lang['KB_title'] . ' - ' . $lang['KB_notify_subject']; ! $email_body = $lang['KB_notify_body'] . '\n\n\n' . $message; ! ! kb_insert_pm( $to_id, $email_body, $email_subject, $from_id ); } } *************** *** 706,709 **** --- 603,688 ---- } // insert_pm() + function kb_mailer( + $to_id, + $message, + $subject, + $from_id, + $html_on = 0, + $bbcode_on = 1, + $smilies_on = 1) + { + global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; + + if ( !$from_id ) + { + $from_id = $userdata['user_id']; + } + + //get varibles ready + $to_id = intval($to_id); + $from_id = intval($from_id); + $msg_time = time(); + $attach_sig = $userdata['user_attachsig']; + + //get to users info + $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active + FROM " . USERS_TABLE . " + WHERE user_id = '$to_id' + AND user_id <> " . ANONYMOUS; + if ( !($result = $db->sql_query($sql)) ) + { + $error = TRUE; + $error_msg = $lang['No_such_user']; + } + + $to_userdata = $db->sql_fetchrow($result); + + $privmsg_subject = trim(strip_tags($subject)); + if ( empty($privmsg_subject) ) + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_subject']; + } + + if ( !empty($message) ) + { + if ( !$error ) + { + if ( $bbcode_on ) + { + $bbcode_uid = make_bbcode_uid(); + } + + $privmsg_message = prepare_message($message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid); + $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); + + } + } + else + { + $error = TRUE; + $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['Empty_message']; + } + + + $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); + $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx; + $server_name = trim($board_config['server_name']); + $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; + $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; + + include($phpbb_root_path . 'includes/emailer.'.$phpEx); + $emailer = new emailer($board_config['smtp_delivery']); + + $emailer->from( $board_config['board_email'] ); + $emailer->replyto( $board_config['board_email'] ); + + $emailer->email_address($to_userdata['user_email'] ); + $emailer->set_subject( $subject ); + $emailer->msg = $message; + + $emailer->send(); + $emailer->reset(); + } // get categories for index |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:02:37
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627/modules/mx_kb/templates/subSilver/admin Added Files: kb_rebuild_search.tpl kb_rebuild_search_progress.tpl Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: kb_rebuild_search_progress.tpl --- <h1 style="text-align: center;">{PERCENT} %</h1> <form method="post" action="{S_REBUILD_SEARCH_ACTION}"> <input type="hidden" name="start" value="{START}"> <input type="hidden" name="total_num_rows" value="{TOTAL_NUM_ROWS}"> <div style="text-align: center;"><input class="mainoption" type="submit" name="submit" value="{L_NEXT}" /></div> </form> --- NEW FILE: kb_rebuild_search.tpl --- <h1>{L_REBUILD_SEARCH}</h1> <p>{L_REBUILD_SEARCH_DESC}</p> <form method="get" action="{S_REBUILD_SEARCH_ACTION}"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> <tr> <th colspan="2" class="thHead">{L_REBUILD_SEARCH}</th> </tr> <tr> <td class="row1">{L_POST_LIMIT}</td> <td class="row1"><input class="post" type="text" name="post_limit" value="1000" /></td> </tr> <tr> <td class="row2">{L_TIME_LIMIT}</td> <td class="row2"><input class="post" type="text" name="time_limit" value="120" /></td> </tr> <tr> <td class="row1">{L_REFRESH_RATE}</td> <td class="row1"><input class="post" type="text" name="refresh_rate" value="3" /></td> </tr> <tr> <td class="catBottom" colspan="2" align="center"><input type="hidden" name="sid" value="{SESSION_ID}" /><input type="hidden" name="start" value="0" /><input class="mainoption" type="submit" name="submit" value="{L_REBUILD_SEARCH}" /></td> </tr> </table> </form> |
|
From: Jon O. <jon...@us...> - 2005-03-29 20:02:21
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627/modules/mx_kb/admin Added Files: admin_kb_rebuild_search.php Log Message: small bugs, reported in phpbb dev thread - added regenerate search tables --- NEW FILE: admin_kb_rebuild_search.php --- <?php /*************************************************************************** * admin_rebuild_search.php * ------------------- * begin : Thursday, Jul 12, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: admin_kb_rebuild_search.php,v 1.1 2005/03/29 20:02:12 jonohlsson Exp $ * * ***************************************************************************/ $start_time = time (); $time_limit = $HTTP_GET_VARS['time_limit']; if ( file_exists( './../viewtopic.php' ) ) { define( 'IN_PHPBB', 1 ); define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', false ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['KB_title']['Optimize tables'] = $file; return; } $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; require( $phpbb_root_path . 'extension.inc' ); require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); include( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_auth.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_field.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_kb_mx.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } else { define( 'IN_PORTAL', 1 ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['KB_title']['Optimize tables'] = 'modules/mx_kb/admin/' . $file; return; } $mx_root_path = '../../../'; $module_root_path = "../"; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include( $module_root_path . 'includes/kb_constants.' . $phpEx ); include( $module_root_path . 'includes/functions_kb.' . $phpEx ); include( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); include( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx ) ) { include ($module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx); } else { include ($module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx); } $page_title = $lang['Page_title']; if (isset ($HTTP_GET_VARS['start'])) { function onTime () { global $start_time, $time_limit; static $max_execution_time; $current_time = time (); if (empty ($max_execution_time)) { if (ini_get ('safe_mode') == false) { set_time_limit (0); $max_execution_time = $time_limit; } else { $max_execution_time = ini_get ('max_execution_time'); } } return (($current_time - $start_time) < $max_execution_time) ? true : false; } $start = $HTTP_GET_VARS['start']; if ($start == 0) { $sql = "DELETE FROM ". KB_SEARCH_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". KB_WORD_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". KB_MATCH_TABLE; $result = $db->sql_query ($sql); $sql = "SELECT article_id FROM ". KB_ARTICLES_TABLE; $result = $db->sql_query ($sql); $total_num_rows = $db->sql_numrows ($result); } $total_num_rows = (isset ($HTTP_GET_VARS['total_num_rows'])) ? $HTTP_GET_VARS['total_num_rows'] : $total_num_rows; $sql = "SELECT article_id, article_title, article_body FROM ". KB_ARTICLES_TABLE ." LIMIT $start, ". $HTTP_GET_VARS['post_limit']; $result = $db->sql_query ($sql); $num_rows = 0; while (($row = $db->sql_fetchrow ($result)) ) { mx_add_search_words('single', $row['article_id'], stripslashes($row['article_body']), stripslashes($row['article_title']), 'kb'); $num_rows++; } $template->set_filenames(array( "body" => "admin/admin_message_body.tpl") ); if (($start + $num_rows) != $total_num_rows) { $form_action = append_sid ("admin_kb_rebuild_search.$phpEx?start=". ($start + $num_rows) ."&total_num_rows=$total_num_rows&post_limit=". $HTTP_GET_VARS['post_limit'] ."&time_limit=$time_limit&refresh_rate=". $HTTP_GET_VARS['refresh_rate']); $next = $lang['Next']; $template->assign_vars(array( "META" => '<meta http-equiv="refresh" content="'. $HTTP_GET_VARS['refresh_rate'] .';url='. $form_action .'">') ); } else { $next = $lang['Finished']; $form_action = append_sid ("admin_kb_rebuild_search.$phpEx"); } // include ('./page_header_admin.'.$phpEx); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'PERCENT' => round ((($start + $num_rows) / $total_num_rows) * 100), 'L_NEXT' => $next, 'START' => $start + $num_rows, 'TOTAL_NUM_ROWS' => $total_num_rows, 'S_REBUILD_SEARCH_ACTION' => $form_action) ); $template->set_filenames (array ( "body" => "admin/kb_rebuild_search_progress.tpl") ); } else { // include('./page_header_admin.'.$phpEx); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'L_REBUILD_SEARCH' => $lang['Rebuild_search'], 'L_REBUILD_SEARCH_DESC' => $lang['Rebuild_search_desc'], 'L_POST_LIMIT' => $lang['Post_limit'], 'L_TIME_LIMIT' => $lang['Time_limit'], 'L_REFRESH_RATE' => $lang['Refresh_rate'], 'SESSION_ID' => $userdata['session_id'], 'S_REBUILD_SEARCH_ACTION' => append_sid ("admin_kb_rebuild_search.$phpEx")) ); $template->set_filenames (array ( "body" => "admin/kb_rebuild_search.tpl") ); } $template->pparse ('body'); // // Page Footer // // include('./page_footer_admin.'.$phpEx); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |
|
From: Jon O. <jon...@us...> - 2005-03-28 21:35:07
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv998/modules/mx_kb/includes Modified Files: kb_cat.php kb_rate.php Log Message: small bugs, reported in phpbb dev thread Index: kb_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_rate.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_rate.php 17 Mar 2005 12:37:24 -0000 1.8 --- kb_rate.php 28 Mar 2005 21:34:55 -0000 1.9 *************** *** 136,140 **** if ( $rate == 'dorate' ) { ! $conf = str_replace( "{filename}", $article['article_name'], $lang['Rconf'] ); $conf = str_replace( "{rate}", $rating, $conf ); --- 136,140 ---- if ( $rate == 'dorate' ) { ! $conf = str_replace( "{filename}", $article['article_title'], $lang['Rconf'] ); $conf = str_replace( "{rate}", $rating, $conf ); *************** *** 199,203 **** else { ! $rateinfo = str_replace( "{filename}", $article['article_name'], $lang['Rateinfo'] ); $template->assign_block_vars( "rate", array() ); --- 199,203 ---- else { ! $rateinfo = str_replace( "{filename}", $article['article_title'], $lang['Rateinfo'] ); $template->assign_block_vars( "rate", array() ); Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_cat.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** kb_cat.php 17 Mar 2005 12:37:24 -0000 1.10 --- kb_cat.php 28 Mar 2005 21:34:55 -0000 1.11 *************** *** 88,92 **** break; case 'Latest': ! $kb_news_sort_method = 'tt.topic_last_post_id'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; --- 88,92 ---- break; case 'Latest': ! $kb_news_sort_method = 't.topic_last_post_id'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; |
|
From: Jon O. <jon...@us...> - 2005-03-28 21:34:42
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv900/modules/kb_076_mxaddon/root/includes Modified Files: kb_cat.php kb_rate.php Log Message: small bugs, reported in phpbb dev thread Index: kb_rate.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_rate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_rate.php 28 Mar 2005 20:54:53 -0000 1.2 --- kb_rate.php 28 Mar 2005 21:34:33 -0000 1.3 *************** *** 136,140 **** if ( $rate == 'dorate' ) { ! $conf = str_replace( "{filename}", $article['article_name'], $lang['Rconf'] ); $conf = str_replace( "{rate}", $rating, $conf ); --- 136,140 ---- if ( $rate == 'dorate' ) { ! $conf = str_replace( "{filename}", $article['article_title'], $lang['Rconf'] ); $conf = str_replace( "{rate}", $rating, $conf ); *************** *** 199,203 **** else { ! $rateinfo = str_replace( "{filename}", $article['article_name'], $lang['Rateinfo'] ); $template->assign_block_vars( "rate", array() ); --- 199,203 ---- else { ! $rateinfo = str_replace( "{filename}", $article['article_title'], $lang['Rateinfo'] ); $template->assign_block_vars( "rate", array() ); Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/includes/kb_cat.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kb_cat.php 28 Mar 2005 20:54:53 -0000 1.2 --- kb_cat.php 28 Mar 2005 21:34:33 -0000 1.3 *************** *** 88,92 **** break; case 'Latest': ! $kb_news_sort_method = 'tt.topic_last_post_id'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; --- 88,92 ---- break; case 'Latest': ! $kb_news_sort_method = 't.topic_last_post_id'; $kb_news_sort_method_extra = 't.article_type' . " DESC, " ; break; |
|
From: Jon O. <jon...@us...> - 2005-03-28 20:55:46
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9026/modules/kb_076_mxaddon Modified Files: install_kb_tables.php install_upgrade_readme.txt upgrade_kb_tables.php Log Message: ## 2005/03/28 - Version KB MOD 2.01 ## - Name changed, since much is rewritten ;) ## - Updated with latest phpBB security patches ## - Category (PRIVATE) permissions ## - Subcategories ## - Comments phpBB forum set per category ## - Text reformatting options: img, link and linewidth controls ## - Rewritten BBcode/html handling (once more yes) ## - Custom fields added ## - wysiwyg feature (tinymce) ## - All reported bugs in dev thread fixed Index: install_upgrade_readme.txt =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_upgrade_readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** install_upgrade_readme.txt 9 Jan 2005 22:16:30 -0000 1.1 --- install_upgrade_readme.txt 28 Mar 2005 20:54:52 -0000 1.2 *************** *** 3,8 **** ## MOD Original Author: wGEric < er...@ww... > (Eric Faerber) http://eric.best-1.biz ## MOD Addon Author: Haplo < jon...@ho... > (Jon Ohlsson) http://www.mx-system.com ! ## MOD Description: This mod is based on the Knowledge Base at phpBB with addon features from www.mx-system.com ! ## MOD Version: Beta 0.7.6 + Mx Addon 1.02 ## ## Installation Level: easy --- 3,8 ---- ## MOD Original Author: wGEric < er...@ww... > (Eric Faerber) http://eric.best-1.biz ## MOD Addon Author: Haplo < jon...@ho... > (Jon Ohlsson) http://www.mx-system.com ! ## MOD Description: This mod adds a Knowledge Base manager to your board ! ## MOD Version: KB MOD 2.0.1 ## ## Installation Level: easy *************** *** 15,27 **** ## - templates/subSilver/overall_header.tpl, ## ! ## Included Files: (41) ## - kb.php, ## - kb_search.php, ! ## - admin/admin_kb_*.php (4), ! ## - includes/functions_kb.php, ! ## - includes/kb_.php, (10) ## - language/lang_english/lang_kb.php, ! ## - templates/subSilver/kb_*.tpl (13), ! ## - templates/subSilver/admin/kb_*.tpl (7), ## - templates/subSilver/images/lang_english/*.gif (1), ## - templates/subSilver/images/*.gif (2) --- 15,27 ---- ## - templates/subSilver/overall_header.tpl, ## ! ## Included Files: (54) ## - kb.php, ## - kb_search.php, ! ## - admin/admin_kb_*.php (6), ! ## - includes/functions_.php (4), ! ## - includes/kb_.php, (9) ## - language/lang_english/lang_kb.php, ! ## - templates/subSilver/kb_*.tpl (14), ! ## - templates/subSilver/admin/kb_*.tpl (15), ## - templates/subSilver/images/lang_english/*.gif (1), ## - templates/subSilver/images/*.gif (2) *************** *** 44,47 **** --- 44,60 ---- ## MOD History: ## + + ## 2005/03/28 - Version KB MOD 2.01 + ## - Name changed, since much is rewritten ;) + ## - Updated with latest phpBB security patches + ## - Category (PRIVATE) permissions + ## - Subcategories + ## - Comments phpBB forum set per category + ## - Text reformatting options: img, link and linewidth controls + ## - Rewritten BBcode/html handling (once more yes) + ## - Custom fields added + ## - wysiwyg feature (tinymce) + ## - All reported bugs in dev thread fixed + ## 2004/09/14 - Version 0.7.6 + MX Addon 1.03 ## - Comments pagination added (new db entry) *************** *** 171,211 **** # copy install_kb_tables.php to install_kb_tables.php copy root/kb.php to kb.php copy root/kb_search.php to kb_search.php ! copy root/admin/admin_kb_art.php to admin/admin_kb_art.php ! copy root/admin/admin_kb_cat.php to admin/admin_kb_cat.php ! copy root/admin/admin_kb_config.php to admin/admin_kb_config.php ! copy root/admin/admin_kb_types.php to admin/admin_kb_types.php ! copy root/includes/functions_kb.php to includes/functions_kb.php ! copy root/includes/kb_add.php to includes/kb_add.php ! copy root/includes/kb_article.php to includes/kb_article.php ! copy root/includes/kb_cat.php to includes/kb_cat.php ! copy root/includes/kb_constants.php to includes/kb_constants.php ! copy root/includes/kb_edit.php to includes/kb_edit.php ! copy root/includes/kb_footer.php to includes/kb_footer.php ! copy root/includes/kb_header.php to includes/kb_header.php ! copy root/includes/kb_rate.php to includes/kb_rate.php ! copy root/includes/kb_stats.php to includes/kb_stats.php copy root/language/lang_english/lang_kb.php to language/lang_english/lang_kb.php copy root/templates/print_version.css to templates/print_version.css ! copy root/templates/subSilver/kb_add_body.tpl to templates/subSilver/kb_add_body.tpl ! copy root/templates/subSilver/kb_add_pretext.tpl to templates/subSilver/kb_add_pretext.tpl ! copy root/templates/subSilver/kb_add_preview.tpl to templates/subSilver/kb_add_preview.tpl ! copy root/templates/subSilver/kb_cat_body.tpl to templates/subSilver/kb_cat_body.tpl ! copy root/templates/subSilver/kb_header.tpl to templates/subSilver/kb_header.tpl ! copy root/templates/subSilver/kb_footer.tpl to templates/subSilver/kb_footer.tpl ! copy root/templates/subSilver/kb_index_body.tpl to templates/subSilver/kb_index_body.tpl ! copy root/templates/subSilver/kb_search_body.tpl to templates/subSilver/kb_search_body.tpl ! copy root/templates/subSilver/kb_search_results.tpl to templates/subSilver/kb_search_results.tpl ! copy root/templates/subSilver/kb_stats_body.tpl to templates/subSilver/kb_stats_body.tpl ! copy root/templates/subSilver/kb_rate_body.tpl to templates/subSilver/kb_rate_body.tpl ! copy root/templates/subSilver/admin/kb_art_body.tpl to templates/subSilver/admin/kb_art_body.tpl ! copy root/templates/subSilver/admin/kb_cat_admin_body.tpl to templates/subSilver/admin/kb_cat_admin_body.tpl ! copy root/templates/subSilver/admin/kb_cat_del_body.tpl to templates/subSilver/admin/kb_cat_del_body.tpl ! copy root/templates/subSilver/admin/kb_cat_edit_body.tpl to templates/subSilver/admin/kb_cat_edit_body.tpl ! copy root/templates/subSilver/admin/kb_config_body.tpl to templates/subSilver/admin/kb_config_body.tpl ! copy root/templates/subSilver/admin/kb_type_body.tpl to templates/subSilver/admin/kb_type_body.tpl ! copy root/templates/subSilver/images/icon_approve.gif to templates/subSilver/images/icon_approve.gif ! copy root/templates/subSilver/images/icon_unapprove.gif to templates/subSilver/images/icon_unapprove.gif copy root/templates/subSilver/images/lang_english/kb.gif to templates/subSilver/images/lang_english/kb.gif # --- 184,209 ---- # copy install_kb_tables.php to install_kb_tables.php + or + copy upgrade_kb_tables.php to upgrade_kb_tables.php + copy root/kb.php to kb.php copy root/kb_search.php to kb_search.php ! ! copy root/admin/admin__.php to admin/admin__.php ! ! copy root/includes/functions_.php to includes/functions_.php ! ! copy root/includes/kb_.php to includes/kb_.php ! copy root/language/lang_english/lang_kb.php to language/lang_english/lang_kb.php + copy root/templates/print_version.css to templates/print_version.css ! ! copy root/templates/subSilver/kb_.tpl to templates/subSilver/kb_.tpl ! ! copy root/templates/subSilver/admin/kb_.tpl to templates/subSilver/admin/kb_.tpl ! ! copy root/templates/subSilver/images/icon_.gif to templates/subSilver/images/icon_.gif ! copy root/templates/subSilver/images/lang_english/kb.gif to templates/subSilver/images/lang_english/kb.gif # Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** install_kb_tables.php 9 Jan 2005 22:16:30 -0000 1.1 --- install_kb_tables.php 28 Mar 2005 20:54:49 -0000 1.2 *************** *** 37,41 **** }*/ ! define('KB_VERSION','Beta 0.7.6 + Mx Addon'); ?> --- 37,41 ---- }*/ ! define('KB_VERSION','KB MOD 2.0.1'); ?> *************** *** 155,169 **** );'; ! $sql[] = 'CREATE TABLE '.KB_CATEGORIES_TABLE.' ( ! category_id mediumint(8) unsigned NOT NULL auto_increment, ! category_name VARCHAR(255) binary NOT NULL, ! category_details VARCHAR(255) binary NOT NULL, ! number_articles mediumint(8) unsigned NOT NULL, ! parent mediumint(8) unsigned, ! cat_order mediumint(8) unsigned NOT NULL, ! KEY category_id (category_id) ! ) TYPE=MyISAM'; ! ! $sql[] = 'INSERT INTO '.KB_CATEGORIES_TABLE.' VALUES (1, "Test Category 1", "This is a test category", 1, "0", "10" );'; $sql[] = 'CREATE TABLE '.KB_CONFIG_TABLE.' ( --- 155,188 ---- );'; ! $sql[] = 'CREATE TABLE '.KB_CATEGORIES_TABLE.' ( ! category_id mediumint(8) unsigned NOT NULL auto_increment, ! category_name VARCHAR(255) binary NOT NULL, ! category_details VARCHAR(255) binary NOT NULL, ! number_articles mediumint(8) unsigned NOT NULL, ! parent mediumint(8) unsigned, ! cat_order mediumint(8) unsigned NOT NULL, ! auth_view tinyint(3) NOT NULL DEFAULT "0", ! auth_post tinyint(3) NOT NULL DEFAULT "0", ! auth_rate tinyint(3) NOT NULL DEFAULT "0", ! auth_comment tinyint(3) NOT NULL DEFAULT "0", ! auth_edit tinyint(3) NOT NULL DEFAULT "0", ! auth_delete tinyint(3) NOT NULL DEFAULT "2", ! auth_approval tinyint(3) NOT NULL DEFAULT "0", ! auth_approval_edit tinyint(3) NOT NULL DEFAULT "0", ! auth_view_groups varchar(255), ! auth_post_groups varchar(255), ! auth_rate_groups varchar(255), ! auth_comment_groups varchar(255), ! auth_edit_groups varchar(255), ! auth_delete_groups varchar(255), ! auth_approval_groups varchar(255), ! auth_approval_edit_groups varchar(255), ! auth_moderator_groups varchar(255), ! comments_forum_id tinyint(3) NOT NULL DEFAULT "-1", ! KEY category_id (category_id) ! ) TYPE=MyISAM'; ! ! ! $sql[] = 'INSERT INTO '.KB_CATEGORIES_TABLE.' VALUES (1, "Test Category 1", "This is a test category", "0", "0", "10", "0", "0", "0", "0", "0", "2", "0", "0", "", "", "", "", "", "", "", "", "", "0" );'; $sql[] = 'CREATE TABLE '.KB_CONFIG_TABLE.' ( *************** *** 173,180 **** ) TYPE=MyISAM'; ! $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")'; --- 192,199 ---- ) TYPE=MyISAM'; ! // $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")'; *************** *** 182,194 **** $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");'; --- 201,212 ---- $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 ("use_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 ("use_ratings", "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");'; *************** *** 203,206 **** --- 221,230 ---- $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort_par", "ASC");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg", "0");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_html", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_bbcode", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_smilies", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allowed_html_tags", "b,i,u,a");'; + $sql[] = 'CREATE TABLE '.KB_TYPES_TABLE.' ( id mediumint(8) unsigned NOT NULL auto_increment, *************** *** 240,243 **** --- 264,285 ---- KEY word_id (word_id) ) TYPE=MyISAM;'; + + $sql[] = 'CREATE TABLE ' . KB_CUSTOM_TABLE . ' ( + custom_id int(50) NOT NULL auto_increment, + custom_name text NOT NULL, + custom_description text NOT NULL, + data text NOT NULL, + field_order int(20) NOT NULL default "0", + field_type tinyint(2) NOT NULL default "0", + regex varchar(255) NOT NULL default "", + PRIMARY KEY (custom_id) + ) TYPE=MyISAM;'; + + $sql[] = 'CREATE TABLE ' . KB_CUSTOM_DATA_TABLE . ' ( + customdata_file int(50) NOT NULL default "0", + customdata_custom int(50) NOT NULL default "0", + data text NOT NULL + ) TYPE=MyISAM;'; + break; Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/upgrade_kb_tables.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** upgrade_kb_tables.php 9 Jan 2005 22:16:30 -0000 1.1 --- upgrade_kb_tables.php 28 Mar 2005 20:54:52 -0000 1.2 *************** *** 37,41 **** } ! define('KB_VERSION','Beta 0.7.6 + Mx Addon'); ?> --- 37,41 ---- } ! define('KB_VERSION','KB MOD 2.0.1'); ?> *************** *** 104,108 **** echo 'phpBB version :: <b>2' . $phpBB_version . '</b><br />'; ! echo 'Upgrading Knowledge Base to :: <b>' . KB_VERSION . '</b></p> From Beta 0.7.6' ."\n"; ?> --- 104,108 ---- echo 'phpBB version :: <b>2' . $phpBB_version . '</b><br />'; ! echo 'Upgrading Knowledge Base to :: <b>' . KB_VERSION . '</b></p> From KB Beta 0.7.6 + mxaddon 1.x' ."\n"; ?> *************** *** 131,134 **** --- 131,135 ---- $upgrade_102 = 0; $upgrade_103 = 0; + $upgrade_200 = 0; // validate before 1.01 if( !$result = $db->sql_query("SELECT article_rating from ".KB_ARTICLES_TABLE)) *************** *** 154,158 **** // validate before 1.03 ! if( !$result = $db->sql_query("SELECT comments_pagination from ".KB_CONFIG)) { $upgrade_103 = 1; --- 155,160 ---- // validate before 1.03 ! $result = $db->sql_query( "SELECT config_value from " . KB_CONFIG_TABLE . " WHERE config_name = 'comments_pagination'" ); ! if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_103 = 1; *************** *** 164,167 **** --- 166,181 ---- } + // validate before 2.00 + $result = $db->sql_query( "SELECT config_value from " . KB_CONFIG_TABLE . " WHERE config_name = 'wysiwyg'" ); + if( $db->sql_numrows( $result ) == 0 ) + { + $upgrade_200 = 1; + $res_message .= "Upgrading to v. 2.00...<br />"; + } + else + { + $res_message .= "v. 2.00 : installed <br />"; + } + if ( $submit ) { *************** *** 183,186 **** --- 197,201 ---- $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", *************** *** 205,208 **** --- 220,280 ---- $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("news_sort_par", "ASC");'; } + + if ( $upgrade_200 == 1 ) + { + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_view tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_post tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_rate tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_comment tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_edit tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_delete tinyint(3) NOT NULL DEFAULT "2" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_approval tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_approval_edit tinyint(3) NOT NULL DEFAULT "0" ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_view_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_post_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_rate_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_comment_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_edit_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_delete_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_approval_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_approval_edit_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD auth_moderator_groups varchar(255) ;'; + $sql[] = 'ALTER TABLE ' . KB_CATEGORIES_TABLE . ' ADD comments_forum_id tinyint(3) NOT NULL DEFAULT "-1" ;'; + + $sql[] = 'UPDATE ' . KB_CONFIG_TABLE . ' + SET config_name = "use_comments", + config_value = "1" + WHERE config_name = "comments" ;'; + + $sql[] = 'UPDATE ' . KB_CONFIG_TABLE . ' + SET config_name = "use_ratings", + config_value = "1" + WHERE config_name = "allow_rating" ;'; + + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg", "0");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_html", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_bbcode", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_smilies", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allowed_html_tags", "b,i,u,a");'; + + $sql[] = 'CREATE TABLE ' . KB_CUSTOM_TABLE . ' ( + custom_id int(50) NOT NULL auto_increment, + custom_name text NOT NULL, + custom_description text NOT NULL, + data text NOT NULL, + field_order int(20) NOT NULL default "0", + field_type tinyint(2) NOT NULL default "0", + regex varchar(255) NOT NULL default "", + PRIMARY KEY (custom_id) + ) TYPE=MyISAM;'; + + $sql[] = 'CREATE TABLE ' . KB_CUSTOM_DATA_TABLE . ' ( + customdata_file int(50) NOT NULL default "0", + customdata_custom int(50) NOT NULL default "0", + data text NOT NULL + ) TYPE=MyISAM;'; + + } + break; |