Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3524/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_custom.php admin_kb_settings.php Removed Files: admin_kb_rebuild_search.php Log Message: in progress commit for mx_kb --- admin_kb_rebuild_search.php DELETED --- Index: admin_kb_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_settings.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_kb_settings.php 3 Nov 2005 12:18:59 -0000 1.1 --- admin_kb_settings.php 8 Dec 2005 15:04:25 -0000 1.2 *************** *** 18,23 **** --- 18,27 ---- * (at your option) any later version. */ + if ( file_exists( './../viewtopic.php' ) ) { + // + // phpBB MOD mode + // define( 'IN_PHPBB', 1 ); define( 'IN_PORTAL', 1 ); *************** *** 34,38 **** return; } ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); --- 38,44 ---- return; } ! ! // Load default header ! require( './pagestart.' . $phpEx ); include( $phpbb_root_path . 'config.'.$phpEx ); *************** *** 71,74 **** --- 77,92 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + // // Pull all config data *************** *** 87,104 **** $config_name = $row['config_name']; $config_value = $row['config_value']; ! $default_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $HTTP_POST_VARS[$config_name] ) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $sql = "UPDATE " . KB_CONFIG_TABLE . " SET ! config_value = '" . str_replace( "\'", "''", $new[$config_name] ) . "' ! WHERE config_name = '$config_name'"; ! ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql ); ! } } } --- 105,115 ---- $config_name = $row['config_name']; $config_value = $row['config_value']; ! $kb_config[$config_name] = $config_value; ! $new[$config_name] = ( isset( $HTTP_POST_VARS[$config_name] ) ) ? $HTTP_POST_VARS[$config_name] : $kb_config[$config_name]; if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $mx_kb_functions->set_config( $config_name, $new[$config_name] ); } } *************** *** 106,110 **** if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $message = $lang['KB_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_kb_config'], "<a href=\"" . append_sid( "admin_kb_config.$phpEx?mode=config" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); --- 117,122 ---- if ( isset( $HTTP_POST_VARS['submit'] ) ) { ! $mx_kb_cache->unload(); ! $message = $lang['KB_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_kb_config'], "<a href=\"" . append_sid( "admin_kb_settings.$phpEx?mode=config" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 112,186 **** } ! $new_yes = ( $new['allow_new'] ) ? "checked=\"checked\"" : ""; ! $new_no = ( !$new['allow_new'] ) ? "checked=\"checked\"" : ""; ! ! $allow_html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allow_html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; ! ! $allow_bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! ! $allow_smilies_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! ! $formatting_fixup_yes = ( $new['formatting_fixup'] ) ? "checked=\"checked\"" : ""; ! $formatting_fixup_no = ( !$new['formatting_fixup'] ) ? "checked=\"checked\"" : ""; ! $wysiwyg_yes = ( $new['wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $wysiwyg_no = ( !$new['wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $kb_allowed_html_tags = $new['allowed_html_tags']; $wysiwyg_path = $new['wysiwyg_path']; ! $pretext_show = ( $new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( !$new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pt_header = $new['pt_header']; ! $pt_body = $new['pt_body']; ! $notify_none = ( $new['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $new['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $new['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $admin_id = $new['admin_id']; ! $use_comments_yes = ( $new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( !$new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; ! // Added by Haplo ! $comments_show_yes = ( $new['comments_show'] ) ? "checked=\"checked\"" : ""; ! $comments_show_no = ( !$new['comments_show'] ) ? "checked=\"checked\"" : ""; ! $bump_post_yes = ( $new['bump_post'] ) ? "checked=\"checked\"" : ""; ! $bump_post_no = ( !$new['bump_post'] ) ? "checked=\"checked\"" : ""; ! $stats_list_yes = ( $new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $stats_list_no = ( !$new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $header_banner_yes = ( $new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $header_banner_no = ( !$new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_yes = ( $new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( !$new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_yes = ( $new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_no = ( !$new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_yes = ( $new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_no = ( !$new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $article_pag = $new['art_pagination']; ! $comments_pag = $new['comments_pagination']; ! $news_sort_options = array(); ! $news_sort_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); ! $news_sort_list = '<select name="news_sort">'; ! for( $j = 0; $j < count( $news_sort_options ); $j++ ) { ! if ( $new['news_sort'] == $news_sort_options[$j] ) { $status = "selected"; --- 124,189 ---- } ! $template->set_filenames( array( "body" => "admin/kb_config_body.tpl" ) ); ! // ! // General Settings ! // ! $module_name = $new['module_name']; ! $enable_module_yes = ( $new['enable_module'] ) ? "checked=\"checked\"" : ""; ! $enable_module_no = ( !$new['enable_module'] ) ? "checked=\"checked\"" : ""; $wysiwyg_path = $new['wysiwyg_path']; ! // ! // Article ! // ! $allow_wysiwyg_yes = ( $new['allow_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_wysiwyg_no = ( !$new['allow_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_html_yes = ( $new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allow_html_no = ( !$new['allow_html'] ) ? "checked=\"checked\"" : ""; ! $allowed_html_tags = $new['allowed_html_tags']; ! $allow_bbcode_yes = ( $new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_bbcode_no = ( !$new['allow_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_yes = ( $new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_smilies_no = ( !$new['allow_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_images_yes = ( $new['allow_images'] ) ? "checked=\"checked\"" : ""; ! $allow_images_no = ( !$new['allow_images'] ) ? "checked=\"checked\"" : ""; ! $allow_links_yes = ( $new['allow_links'] ) ? "checked=\"checked\"" : ""; ! $allow_links_no = ( !$new['allow_links'] ) ? "checked=\"checked\"" : ""; ! $no_image_message = $new['no_image_message']; ! $no_link_message = $new['no_link_message']; ! $max_chars = $new['max_chars']; ! $max_subject_chars = $new['max_subject_chars']; ! $max_desc_chars = $new['max_desc_chars']; ! $format_truncate_links_yes = ( $new['formatting_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_truncate_links_no = ( !$new['formatting_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_image_resize = $new['formatting_image_resize']; ! $format_wordwrap_yes = ( $new['formatting_wordwrap'] ) ? "checked=\"checked\"" : ""; ! $format_wordwrap_no = ( !$new['formatting_wordwrap'] ) ? "checked=\"checked\"" : ""; ! // ! // Appearance ! // ! $pagination = $new['pagination']; ! $sort_method_options = array(); ! $sort_method_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); ! $sort_method_list = '<select name="sort_method">'; ! for( $j = 0; $j < count( $sort_method_options ); $j++ ) { ! if ( $new['sort_method'] == $sort_method_options[$j] ) { $status = "selected"; *************** *** 190,204 **** $status = ''; } ! $news_sort_list .= '<option value="' . $news_sort_options[$j] . '" ' . $status . '>' . $news_sort_options[$j] . '</option>'; } ! $news_sort_list .= '</select>'; ! $news_sort_par_options = array(); ! $news_sort_par_options = array( "DESC", "ASC" ); ! $news_sort_par_list = '<select name="news_sort_par">'; ! for( $j = 0; $j < count( $news_sort_par_options ); $j++ ) { ! if ( $new['news_sort_par'] == $news_sort_par_options[$j] ) { $status = "selected"; --- 193,208 ---- $status = ''; } ! $sort_method_list .= '<option value="' . $sort_method_options[$j] . '" ' . $status . '>' . $sort_method_options[$j] . '</option>'; } ! $sort_method_list .= '</select>'; ! $sort_order_options = array(); ! $sort_order_options = array( "DESC", "ASC" ); ! $sort_order_list = '<select name="sort_order">'; ! ! for( $j = 0; $j < count( $sort_order_options ); $j++ ) { ! if ( $new['sort_order'] == $sort_order_options[$j] ) { $status = "selected"; *************** *** 208,288 **** $status = ''; } ! $news_sort_par_list .= '<option value="' . $news_sort_par_options[$j] . '" ' . $status . '>' . $news_sort_par_options[$j] . '</option>'; } ! $news_sort_par_list .= '</select>'; ! $template->set_filenames( array( "body" => "admin/kb_config_body.tpl" ) ); ! $template->assign_vars( array( ! 'S_ACTION' => append_sid( "admin_kb_config.$phpEx?mode=config" ), ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! 'L_CONFIGURATION_TITLE' => $lang['KB_config_title'], ! 'L_CONFIGURATION_EXPLAIN' => $lang['KB_config_explain'], - 'L_NEW_NAME' => $lang['New_title'], - 'L_NEW_EXPLAIN' => $lang['New_explain'], - 'S_NEW_YES' => $new_yes, - 'S_NEW_NO' => $new_no, ! 'L_SHOW' => $lang['Show'], ! 'L_HIDE' => $lang['Hide'], ! 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], ! 'L_PRE_TEXT_HEADER' => $lang['Pre_text_header'], ! 'L_PRE_TEXT_BODY' => $lang['Pre_text_body'], ! 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], ! 'S_SHOW_PRETEXT' => $pretext_show, ! 'S_HIDE_PRETEXT' => $pretext_hide, ! 'L_PT_HEADER' => $pt_header, ! 'L_PT_BODY' => $pt_body, ! 'L_NOTIFY_NAME' => $lang['Notify_name'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'L_ADMIN_ID_NAME' => $lang['Admin_id_name'], ! 'L_ADMIN_ID_EXPLAIN' => $lang['Admin_id_explain'], ! 'ADMIN_ID' => $admin_id, ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! 'L_RATINGS_INFO' => $lang['Rating_info'], ! 'L_COMMENTS_INFO' => $lang['Comment_info'], ! 'L_COMMENTS_SHOW' => $lang['Comments_show'], ! 'L_COMMENTS_SHOW_EXPLAIN' => $lang['Comments_show_explain'], ! 'S_COMMENTS_SHOW_YES' => $comments_show_yes, ! 'S_COMMENTS_SHOW_NO' => $comments_show_no, ! 'L_BUMP_POST' => $lang['Bump_post'], ! 'L_BUMP_POST_EXPLAIN' => $lang['Bump_post_explain'], ! 'S_BUMP_POST_YES' => $bump_post_yes, ! 'S_BUMP_POST_NO' => $bump_post_no, ! 'L_FORMATTING_FIXUP' => $lang['Formatting_fixup'], ! 'L_FORMATTING_FIXUP_EXPLAIN' => $lang['Formatting_fixup_explain'], ! 'S_FORMATTING_FIXUP_YES' => $formatting_fixup_yes, ! 'S_FORMATTING_FIXUP_NO' => $formatting_fixup_no, ! 'L_WYSIWYG' => $lang['Wysiwyg'], ! 'L_WYSIWYG_EXPLAIN' => $lang['Wysiwyg_explain'], ! 'S_WYSIWYG_YES' => $wysiwyg_yes, ! 'S_WYSIWYG_NO' => $wysiwyg_no, ! 'L_WYSIWYG_PATH' => $lang['Wysiwyg_path'], 'L_WYSIWYG_PATH_EXPLAIN' => $lang['Wysiwyg_path_explain'], ! 'WYSIWYG_PATH' => $wysiwyg_path, 'L_ALLOW_HTML' => $lang['Allow_HTML'], --- 212,347 ---- $status = ''; } ! $sort_order_list .= '<option value="' . $sort_order_options[$j] . '" ' . $status . '>' . $sort_order_options[$j] . '</option>'; } ! $sort_order_list .= '</select>'; ! $header_banner_yes = ( $new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $header_banner_no = ( !$new['header_banner'] ) ? "checked=\"checked\"" : ""; ! $stats_list_yes = ( $new['stats_list'] ) ? "checked=\"checked\"" : ""; ! $stats_list_no = ( !$new['stats_list'] ) ? "checked=\"checked\"" : ""; ! // ! // Instructions ! // ! $pretext_show = ( $new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( !$new['show_pretext'] ) ? "checked=\"checked\"" : ""; ! $pt_header = $new['pt_header']; ! $pt_body = $new['pt_body']; ! // ! // Comments (default settings) ! // ! $use_comments_yes = ( $new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( !$new['use_comments'] ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( !$new['internal_comments'] ) ? "checked=\"checked\"" : ""; ! $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_yes = ( $new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( !$new['autogenerate_comments'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_wysiwyg_yes = ( $new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_wysiwyg_no = ( !$new['allow_comment_wysiwyg'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_html_yes = ( $new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_html_no = ( !$new['allow_comment_html'] ) ? "checked=\"checked\"" : ""; ! $allowed_comment_html_tags = $new['allowed_comment_html_tags']; ! ! $allow_comment_bbcode_yes = ( $new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_bbcode_no = ( !$new['allow_comment_bbcode'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_smilies_yes = ( $new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_smilies_no = ( !$new['allow_comment_smilies'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_links_yes = ( $new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_links_no = ( !$new['allow_comment_links'] ) ? "checked=\"checked\"" : ""; ! ! $allow_comment_images_yes = ( $new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! $allow_comment_images_no = ( !$new['allow_comment_images'] ) ? "checked=\"checked\"" : ""; ! ! $no_comment_link_message = $new['no_comment_link_message']; ! $no_comment_image_message = $new['no_comment_image_message']; ! ! $max_comment_chars = $new['max_comment_chars']; ! $max_comment_subject_chars = $new['max_comment_subject_chars']; ! ! $format_comment_truncate_links_yes = ( $new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! $format_comment_truncate_links_no = ( !$new['formatting_comment_truncate_links'] ) ? "checked=\"checked\"" : ""; ! ! $format_comment_image_resize = $new['formatting_comment_image_resize']; ! ! $format_comment_wordwrap_yes = ( $new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! $format_comment_wordwrap_no = ( !$new['formatting_comment_wordwrap'] ) ? "checked=\"checked\"" : ""; ! ! $comments_pag = $new['comments_pagination']; ! ! // ! // Ratings (default settings) ! // ! $use_ratings_yes = ( $new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( !$new['use_ratings'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_ip_yes = ( $new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! $votes_check_ip_no = ( !$new['votes_check_ip'] ) ? "checked=\"checked\"" : ""; ! ! $votes_check_userid_yes = ( $new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! $votes_check_userid_no = ( !$new['votes_check_userid'] ) ? "checked=\"checked\"" : ""; ! ! // ! // Notifications ! // ! $notify_none = ( $new['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $new['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $new['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! ! $notify_group_list = mx_get_groups($new['notify_group'], 'notify_group'); ! ! $template->assign_vars( array( ! 'S_ACTION' => append_sid( "admin_kb_settings.$phpEx?mode=config" ), ! ! 'L_CONFIGURATION_TITLE' => $lang['Panel_config_title'], ! 'L_CONFIGURATION_EXPLAIN' => $lang['Panel_config_explain'], ! ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! // ! // General ! // ! 'L_GENERAL_TITLE' => $lang['General_title'], ! 'L_MODULE_NAME' => $lang['Module_name'], ! 'L_MODULE_NAME_EXPLAIN' => $lang['Module_name_explain'], ! 'MODULE_NAME' => $module_name, ! ! 'L_ENABLE_MODULE' => $lang['Enable_module'], ! 'L_ENABLE_MODULE_EXPLAIN' => $lang['Enable_module_explain'], ! 'S_ENABLE_MODULE_YES' => $enable_module_yes, ! 'S_ENABLE_MODULE_NO' => $enable_module_no, ! 'L_WYSIWYG_PATH' => $lang['Wysiwyg_path'], 'L_WYSIWYG_PATH_EXPLAIN' => $lang['Wysiwyg_path_explain'], ! 'WYSIWYG_PATH' => $wysiwyg_path, ! ! // ! // Article ! // ! 'L_ARTICLE_TITLE' => $lang['Article_title'], ! ! 'L_ALLOW_WYSIWYG' => $lang['Allow_Wysiwyg'], ! 'L_ALLOW_WYSIWYG_EXPLAIN' => $lang['Allow_Wysiwyg_explain'], ! 'S_ALLOW_WYSIWYG_YES' => $allow_wysiwyg_yes, ! 'S_ALLOW_WYSIWYG_NO' => $allow_wysiwyg_no, 'L_ALLOW_HTML' => $lang['Allow_HTML'], *************** *** 303,308 **** 'L_ALLOWED_HTML_TAGS' => $lang['Allowed_tags'], 'L_ALLOWED_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_HTML_TAGS' => $kb_allowed_html_tags, 'L_STATS_LIST' => $lang['Stats_list'], 'L_STATS_LIST_EXPLAIN' => $lang['Stats_list_explain'], --- 362,428 ---- 'L_ALLOWED_HTML_TAGS' => $lang['Allowed_tags'], 'L_ALLOWED_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_HTML_TAGS' => $allowed_html_tags, ! ! 'L_ALLOW_IMAGES' => $lang['Allow_images'], ! 'L_ALLOW_IMAGES_EXPLAIN' => $lang['Allow_images_explain'], ! 'S_ALLOW_IMAGES_YES' => $allow_images_yes, ! 'S_ALLOW_IMAGES_NO' => $allow_images_no, ! ! 'L_ALLOW_LINKS' => $lang['Allow_links'], ! 'L_ALLOW_LINKS_EXPLAIN' => $lang['Allow_links_explain'], ! 'S_ALLOW_LINKS_YES' => $allow_links_yes, ! 'S_ALLOW_LINKS_NO' => $allow_links_no, ! ! 'L_LINKS_MESSAGE' => $lang['Allow_links_message'], ! 'L_LINKS_MESSAGE_EXPLAIN' => $lang['Allow_links_message_explain'], ! 'MESSAGE_LINK' => $no_link_message, ! ! 'L_IMAGES_MESSAGE' => $lang['Allow_images_message'], ! 'L_IMAGES_MESSAGE_EXPLAIN' => $lang['Allow_images_message_explain'], ! 'MESSAGE_IMAGE' => $no_image_message, ! ! 'L_MAX_SUBJECT_CHAR' => $lang['Max_subject_char'], ! 'L_MAX_SUBJECT_CHAR_EXPLAIN' => $lang['Max_subject_char_explain'], ! 'MAX_SUBJECT_CHAR' => $max_subject_chars, ! ! 'L_MAX_DESC_CHAR' => $lang['Max_desc_char'], ! 'L_MAX_DESC_CHAR_EXPLAIN' => $lang['Max_desc_char_explain'], ! 'MAX_DESC_CHAR' => $max_desc_chars, ! ! 'L_MAX_CHAR' => $lang['Max_char'], ! 'L_MAX_CHAR_EXPLAIN' => $lang['Max_char_explain'], ! 'MAX_CHAR' => $max_chars, ! ! 'L_FORMAT_WORDWRAP' => $lang['Format_wordwrap'], ! 'L_FORMAT_WORDWRAP_EXPLAIN' => $lang['Format_wordwrap_explain'], ! 'S_FORMAT_WORDWRAP_YES' => $format_wordwrap_yes, ! 'S_FORMAT_WORDWRAP_NO' => $format_wordwrap_no, ! ! 'L_FORMAT_IMAGE_RESIZE' => $lang['Format_image_resize'], ! 'L_FORMAT_IMAGE_RESIZE_EXPLAIN' => $lang['Format_image_resize_explain'], ! 'FORMAT_IMAGE_RESIZE' => $format_image_resize, ! ! 'L_FORMAT_TRUNCATE_LINKS' => $lang['Format_truncate_links'], ! 'L_FORMAT_TRUNCATE_LINKS_EXPLAIN' => $lang['Format_truncate_links_explain'], ! 'S_FORMAT_TRUNCATE_LINKS_YES' => $format_truncate_links_yes, ! 'S_FORMAT_TRUNCATE_LINKS_NO' => $format_truncate_links_no, ! ! // ! // Appearance ! // ! 'L_APPEARANCE_TITLE' => $lang['Appearance_title'], ! ! 'L_PAGINATION' => $lang['Article_pag'], ! 'L_PAGINATION_EXPLAIN' => $lang['Article_pag_explain'], ! 'PAGINATION' => $pagination, ! ! 'L_SORT_METHOD' => $lang['Sort_method'], ! 'L_SORT_METHOD_EXPLAIN' => $lang['Sort_method_explain'], ! 'SORT_METHOD' => $sort_method_list, + 'L_SORT_ORDER' => $lang['Sort_order'], + 'L_SORT_ORDER_EXPLAIN' => $lang['Sort_order_explain'], + 'SORT_ORDER' => $sort_order_list, + 'L_STATS_LIST' => $lang['Stats_list'], 'L_STATS_LIST_EXPLAIN' => $lang['Stats_list_explain'], *************** *** 313,322 **** 'L_HEADER_BANNER_EXPLAIN' => $lang['Header_banner_explain'], 'S_HEADER_BANNER_YES' => $header_banner_yes, ! 'S_HEADER_BANNER_NO' => $header_banner_no, ! 'L_ANON_NAME' => $lang['Allow_anon_name'], ! 'L_ANON_EXPLAIN' => $lang['Allow_anon_explain'], ! 'S_ANON_YES' => $anon_yes, ! 'S_ANON_NO' => $anon_no, 'L_USE_RATINGS' => $lang['Use_ratings'], --- 433,539 ---- 'L_HEADER_BANNER_EXPLAIN' => $lang['Header_banner_explain'], 'S_HEADER_BANNER_YES' => $header_banner_yes, ! 'S_HEADER_BANNER_NO' => $header_banner_no, ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! 'L_COMMENTS_TITLE_EXPLAIN' => $lang['Comments_title_explain'], ! ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! ! 'L_INTERNAL_COMMENTS' => $lang['Internal_comments'], ! 'L_INTERNAL_COMMENTS_EXPLAIN' => $lang['Internal_comments_explain'], ! 'S_INTERNAL_COMMENTS_INTERNAL' => $internal_comments_internal, ! 'S_INTERNAL_COMMENTS_PHPBB' => $internal_comments_phpbb, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], ! 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], ! 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], ! 'S_AUTOGENERATE_COMMENTS_YES' => $autogenerate_comments_yes, ! 'S_AUTOGENERATE_COMMENTS_NO' => $autogenerate_comments_no, ! ! 'L_ALLOW_COMMENT_WYSIWYG' => $lang['Allow_Wysiwyg'], ! 'L_ALLOW_COMMENT_WYSIWYG_EXPLAIN' => $lang['Allow_Wysiwyg_explain'], ! 'S_ALLOW_COMMENT_WYSIWYG_YES' => $allow_comment_wysiwyg_yes, ! 'S_ALLOW_COMMENT_WYSIWYG_NO' => $allow_comment_wysiwyg_no, ! ! 'L_ALLOW_COMMENT_HTML' => $lang['Allow_HTML'], ! 'L_ALLOW_COMMENT_HTML_EXPLAIN' => $lang['Allow_html_explain'], ! 'S_ALLOW_COMMENT_HTML_YES' => $allow_comment_html_yes, ! 'S_ALLOW_COMMENT_HTML_NO' => $allow_comment_html_no, ! ! 'L_ALLOW_COMMENT_BBCODE' => $lang['Allow_BBCode'], ! 'L_ALLOW_COMMENT_BBCODE_EXPLAIN' => $lang['Allow_bbcode_explain'], ! 'S_ALLOW_COMMENT_BBCODE_YES' => $allow_comment_bbcode_yes, ! 'S_ALLOW_COMMENT_BBCODE_NO' => $allow_comment_bbcode_no, ! ! 'L_ALLOW_COMMENT_SMILIES' => $lang['Allow_smilies'], ! 'L_ALLOW_COMMENT_SMILIES_EXPLAIN' => $lang['Allow_smilies_explain'], ! 'S_ALLOW_COMMENT_SMILIES_YES' => $allow_comment_smilies_yes, ! 'S_ALLOW_COMMENT_SMILIES_NO' => $allow_comment_smilies_no, ! ! 'L_ALLOWED_COMMENT_HTML_TAGS' => $lang['Allowed_tags'], ! 'L_ALLOWED_COMMENT_HTML_TAGS_EXPLAIN' => $lang['Allowed_tags_explain'], ! 'ALLOWED_COMMENT_HTML_TAGS' => $allowed_comment_html_tags, ! ! 'L_ALLOW_COMMENT_IMAGES' => $lang['Allow_images'], ! 'L_ALLOW_COMMENT_IMAGES_EXPLAIN' => $lang['Allow_images_explain'], ! 'S_ALLOW_COMMENT_IMAGES_YES' => $allow_comment_images_yes, ! 'S_ALLOW_COMMENT_IMAGES_NO' => $allow_comment_images_no, ! ! 'L_ALLOW_COMMENT_LINKS' => $lang['Allow_links'], ! 'L_ALLOW_COMMENT_LINKS_EXPLAIN' => $lang['Allow_links_explain'], ! 'S_ALLOW_COMMENT_LINKS_YES' => $allow_comment_links_yes, ! 'S_ALLOW_COMMENT_LINKS_NO' => $allow_comment_links_no, ! ! 'L_COMMENT_LINKS_MESSAGE' => $lang['Allow_links_message'], ! 'L_COMMENT_LINKS_MESSAGE_EXPLAIN' => $lang['Allow_links_message_explain'], ! 'COMMENT_MESSAGE_LINK' => $no_comment_link_message, ! ! 'L_COMMENT_IMAGES_MESSAGE' => $lang['Allow_images_message'], ! 'L_COMMENT_IMAGES_MESSAGE_EXPLAIN' => $lang['Allow_images_message_explain'], ! 'COMMENT_MESSAGE_IMAGE' => $no_comment_image_message, ! ! 'L_COMMENT_MAX_SUBJECT_CHAR' => $lang['Max_subject_char'], ! 'L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN' => $lang['Max_subject_char_explain'], ! 'COMMENT_MAX_SUBJECT_CHAR' => $max_comment_subject_chars, ! ! 'L_COMMENT_MAX_CHAR' => $lang['Max_char'], ! 'L_COMMENT_MAX_CHAR_EXPLAIN' => $lang['Max_char_explain'], ! 'COMMENT_MAX_CHAR' => $max_comment_chars, ! ! 'L_COMMENT_FORMAT_WORDWRAP' => $lang['Format_wordwrap'], ! 'L_COMMENT_FORMAT_WORDWRAP_EXPLAIN' => $lang['Format_wordwrap_explain'], ! 'S_COMMENT_FORMAT_WORDWRAP_YES' => $format_comment_wordwrap_yes, ! 'S_COMMENT_FORMAT_WORDWRAP_NO' => $format_comment_wordwrap_no, ! ! 'L_COMMENT_FORMAT_IMAGE_RESIZE' => $lang['Format_image_resize'], ! 'L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN' => $lang['Format_image_resize_explain'], ! 'COMMENT_FORMAT_IMAGE_RESIZE' => $format_comment_image_resize, ! ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS' => $lang['Format_truncate_links'], ! 'L_COMMENT_FORMAT_TRUNCATE_LINKS_EXPLAIN' => $lang['Format_truncate_links_explain'], ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_YES' => $format_comment_truncate_links_yes, ! 'S_COMMENT_FORMAT_TRUNCATE_LINKS_NO' => $format_comment_truncate_links_no, ! ! 'L_COMMENTS_PAG' => $lang['Comments_pag'], ! 'L_COMMENTS_PAG_EXPLAIN' => $lang['Comments_pag_explain'], ! 'COMMENTS_PAG' => $comments_pag, ! ! 'L_DEL_TOPIC' => $lang['Del_topic'], ! 'L_DEL_TOPIC_EXPLAIN' => $lang['Del_topic_explain'], ! 'S_DEL_TOPIC_YES' => $del_topic_yes, ! 'S_DEL_TOPIC_NO' => $del_topic_no, ! ! // ! // Ratings ! // ! 'L_RATINGS_TITLE' => $lang['Ratings_title'], ! 'L_RATINGS_TITLE_EXPLAIN' => $lang['Ratings_title_explain'], 'L_USE_RATINGS' => $lang['Use_ratings'], *************** *** 334,359 **** 'S_VOTES_CHECK_USERID_YES' => $votes_check_userid_yes, 'S_VOTES_CHECK_USERID_NO' => $votes_check_userid_no, ! 'L_ARTICLE_PAG' => $lang['Article_pag'], ! 'L_ARTICLE_PAG_EXPLAIN' => $lang['Article_pag_explain'], ! 'ARTICLE_PAG' => $article_pag, ! ! 'L_COMMENTS_PAG' => $lang['Comments_pag'], ! 'L_COMMENTS_PAG_EXPLAIN' => $lang['Comments_pag_explain'], ! 'COMMENTS_PAG' => $comments_pag, ! ! 'L_NEWS_SORT' => $lang['News_sort'], ! 'L_NEWS_SORT_EXPLAIN' => $lang['News_sort_explain'], ! 'NEWS_SORT' => $news_sort_list, ! 'L_NEWS_SORT_PAR' => $lang['News_sort_par'], ! 'L_NEWS_SORT_PAR_EXPLAIN' => $lang['News_sort_par_explain'], ! 'NEWS_SORT_PAR' => $news_sort_par_list, ! 'L_DEL_TOPIC' => $lang['Del_topic'], ! 'L_DEL_TOPIC_EXPLAIN' => $lang['Del_topic_explain'], ! 'S_DEL_TOPIC_YES' => $del_topic_yes, ! 'S_DEL_TOPIC_NO' => $del_topic_no ) ! ); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); --- 551,594 ---- 'S_VOTES_CHECK_USERID_YES' => $votes_check_userid_yes, 'S_VOTES_CHECK_USERID_NO' => $votes_check_userid_no, + + // + // Instructions + // + 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], + + 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], + 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], + 'S_SHOW_PRETEXT' => $pretext_show, + 'S_HIDE_PRETEXT' => $pretext_hide, + 'S_DEFAULT_PRETEXT' => $pretext_default, + + 'L_SHOW' => $lang['Show'], + 'L_HIDE' => $lang['Hide'], + + 'L_PRE_TEXT_HEADER' => $lang['Pre_text_header'], + 'L_PT_HEADER' => $pt_header, + + 'L_PRE_TEXT_BODY' => $lang['Pre_text_body'], + 'L_PT_BODY' => $pt_body, + + // + // Notifications + // + 'L_NOTIFICATIONS_TITLE' => $lang['Notifications_title'], ! 'L_NOTIFY' => $lang['Notify'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'L_NOTIFY_GROUP' => $lang['Notify_group'], ! 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], ! 'NOTIFY_GROUP' => $notify_group_list, ! )); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** admin_kb_art.php 3 Nov 2005 12:13:33 -0000 1.26 --- admin_kb_art.php 8 Dec 2005 15:04:23 -0000 1.27 *************** *** 40,45 **** include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); --- 40,43 ---- *************** *** 74,82 **** } $mx_kb->init(); $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->get('a', MX_TYPE_INT, 0); if( empty( $mode ) ) --- 72,93 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $mx_kb->init(); $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); ! $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); ! $article_id = $mx_request_vars->request('a', MX_TYPE_INT, 0); if( empty( $mode ) ) *************** *** 104,165 **** case 'approve': - $kb_custom_field = new kb_custom_field(); - $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 ); } $kb_row = $db->sql_fetchrow( $results ); ! $topic_sql = ''; $kb_comment = array(); ! ! // // Populate the kb_comment variable ! // ! $kb_comment = $mx_kb->kb_get_data($kb_row, $userdata ); ! ! // // Compose post header - // $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = kb_compose_comment( $kb_comment ); ! ! $kb_message = $message_temp['message']; ! $kb_update_message = $message_temp['update_message']; ! // ! // Insert comment, if not already present ! // if ( $kb_config['use_comments'] ) { if ( !$kb_row['topic_id'] ) { - // // Post - // $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $topic_sql = ", topic_id = " . $topic_data['topic_id']; } } ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " ! WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } - - $article_category_id = $kb_row['article_category_id']; - - update_kb_number( $article_category_id ); - kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); - mx_add_search_words( 'single', $article_id, stripslashes( $kb_row['article_body'] ), stripslashes( $kb_row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); --- 115,170 ---- 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 ); } + $kb_row = $db->sql_fetchrow( $results ); ! $topic_sql = ''; + /* $kb_comment = array(); ! // Populate the kb_comment variable ! $kb_comment = $this->kb_get_data($kb_row, $userdata ); ! // Compose post header $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; ! $message_temp = $this->kb_compose_comment( $kb_comment ); ! $kb_message = $message_temp['message']; ! $kb_update_message = $message_temp['update_message']; ! if ( $kb_config['use_comments'] ) { if ( !$kb_row['topic_id'] ) { // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); ! $topic_sql = ", topic_id = " . $topic_data['topic_id']; } } ! */ ! $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " ! WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! /* ! $this->kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); ! */ ! ! $mx_kb->modified( true ); ! $mx_kb->_kb(); ! ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 170,198 **** $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 0 WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! ! $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $article_category_id = $kb_row['article_category_id']; ! } ! ! update_kb_number( $article_category_id ); ! mx_remove_search_post( $article_id, 'kb' ); ! ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); break; --- 175,190 ---- $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 0 WHERE article_id = " . $article_id; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not update article data", '', __LINE__, __FILE__, $sql ); } ! ! $mx_kb->modified( true ); ! $mx_kb->_kb(); ! ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); + break; *************** *** 202,207 **** { $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) --- 194,199 ---- { $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = " . $article_id; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 209,339 **** mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); } ! ! if ( $article = $db->sql_fetchrow( $result ) ) ! { ! $article_category_id = $article['article_category_id']; ! } ! ! if ( $article['approved'] == 1 ) ! { ! update_kb_number( $article_category_id ); ! } ! ! if ( $kb_config['del_topic'] && $article['topic_id'] ) { ! $topic = $article['topic_id']; ! ! $sql = "SELECT poster_id, COUNT(post_id) AS posts ! FROM " . POSTS_TABLE . " ! WHERE topic_id = " . $topic . " ! GROUP BY poster_id"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get poster id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $count_sql = array(); ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $count_sql[] = "UPDATE " . USERS_TABLE . " ! SET user_posts = user_posts - " . $kb_row['posts'] . " ! WHERE user_id = " . $kb_row['poster_id']; ! } ! $db->sql_freeresult( $result ); ! ! if ( sizeof( $count_sql ) ) ! { ! for( $i = 0; $i < sizeof( $count_sql ); $i++ ) ! { ! if ( !$db->sql_query( $count_sql[$i] ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! ! $sql = "SELECT forum_id ! FROM " . TOPICS_TABLE . " ! WHERE topic_id = $topic"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get forum id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $forum_id = array(); ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $forum_id = $kb_row['forum_id']; ! } ! $db->sql_freeresult( $result ); ! ! $sql = "SELECT post_id ! FROM " . POSTS_TABLE . " ! WHERE topic_id = $topic"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql ); ! } ! ! $post_array = array(); ! $ii = 0; ! $post_id_sql = ''; ! while ( $kb_row = $db->sql_fetchrow( $result ) ) ! { ! $post_array[$ii] = $kb_row['post_id']; ! $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . $kb_row['post_id']; ! $ii++; ! } ! $db->sql_freeresult( $result ); ! ! // Got all required info so go ahead and start deleting everything ! ! $sql = "DELETE ! FROM " . TOPICS_TABLE . " ! WHERE topic_id = $topic ! OR topic_moved_id = $topic"; ! if ( !$db->sql_query( $sql, BEGIN_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $post_id_sql != '' ) ! { ! $sql = "DELETE ! FROM " . POSTS_TABLE . " ! WHERE topic_id = $topic"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete posts', '', __LINE__, __FILE__, $sql ); ! } ! ! for ( $i = 0; $i < count( $post_array ); $i++ ) ! { ! $sql = "DELETE ! FROM " . POSTS_TEXT_TABLE . " ! WHERE post_id = $post_array[$i]"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete posts text', '', __LINE__, __FILE__, $sql ); ! } ! } ! ! remove_search_post( $post_id_sql ); ! } ! ! $sql = "DELETE ! FROM " . TOPICS_WATCH_TABLE . " ! WHERE topic_id = $topic"; ! if ( !$db->sql_query( $sql, END_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete watched post list', '', __LINE__, __FILE__, $sql ); ! } ! if ( !empty( $forum_id ) ) ! { ! sync( 'forum', $forum_id ); ! } } ! $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 201,215 ---- mx_message_die( GENERAL_ERROR, "Could not obtain article category", '', __LINE__, __FILE__, $sql ); } ! ! $article_info = $db->sql_fetchrow( $result ); ! ! if ( $this->comments[$article_info['article_category_id']]['activated'] && !$this->comments[$article_info['article_category_id']]['internal_comments'] && $kb_config['del_topic'] && $article_info['topic_id'] ) { ! include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); ! $mx_kb_comments = new mx_kb_comments(); ! $mx_kb_comments->init( $article_info, 'phpbb' ); ! $mx_kb_comments->post('delete', $article_info['topic_id']); } ! $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; *************** *** 342,354 **** mx_message_die( GENERAL_ERROR, "Could not delete article data", '', __LINE__, __FILE__, $sql ); } ! $sql = "DELETE FROM " . KB_MATCH_TABLE . " WHERE article_id = " . $article_id; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not delete article wordmatch data", '', __LINE__, __FILE__, $sql ); ! } ! ! mx_remove_search_post( $article_id, 'kb' ); $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); --- 218,226 ---- mx_message_die( GENERAL_ERROR, "Could not delete article data", '', __LINE__, __FILE__, $sql ); } + + $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; ! $mx_kb->modified( true ); ! $mx_kb->_kb(); $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); *************** *** 372,386 **** // edited articles // ! $mx_kb->get_kb_articles( '', 2, 'editrow', $start ); // // need to be approved // ! $mx_kb->get_kb_articles( '', 0, 'notrow', $start ); // // Articles that are approved // ! $total_articles = $mx_kb->get_kb_articles( '', 1, 'approverow', $start, $kb_config['art_pagination'] ); // --- 244,258 ---- // edited articles // ! $mx_kb->display_articles( '', 2, 'editrow', $start ); // // need to be approved // ! $mx_kb->display_articles( '', 0, 'notrow', $start ); // // Articles that are approved // ! $total_articles = $mx_kb->display_articles( '', 1, 'approverow', $start, $kb_config['pagination'] ); // *************** *** 401,405 **** { $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['art_pagination'], $start ) . ' '; } --- 273,277 ---- { $total_articles = $total['total']; ! $pagination = generate_pagination( append_sid ( "admin_kb_art.$phpEx" ), $total_articles, $kb_config['pagination'], $start ) . ' '; } *************** *** 410,429 **** $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['art_pagination'] ) + 1 ), ceil( $total_articles / $kb_config['art_pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! 'L_ARTICLE' => $lang['Article'], ! 'L_ARTICLE_CAT' => $lang['Category'], ! 'L_ARTICLE_TYPE' => $lang['Article_type'], ! 'L_ARTICLE_AUTHOR' => $lang['Author'], ! 'L_ACTION' => $lang['Art_action'], ! 'L_APPROVED' => $lang['Art_approved'], ! 'L_NOT_APPROVED' => $lang['Art_not_approved'], ! 'L_EDITED' => $lang['Art_edit'], ! 'L_KB_ART_TITLE' => $lang['Art_man'], ! 'L_KB_ART_DESCRIPTION' => $lang['KB_art_description'] ) ! ); break; } --- 282,302 ---- $template->assign_vars( array( ! 'PAGINATION' => $pagination, ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['pagination'] ) + 1 ), ceil( $total_articles / $kb_config['pagination'] ) ), ! 'L_GOTO_PAGE' => $lang['Goto_page'], ! ! 'L_ARTICLE' => $lang['Article'], ! 'L_ARTICLE_CAT' => $lang['Category'], ! 'L_ARTICLE_TYPE' => $lang['Article_type'], ! 'L_ARTICLE_AUTHOR' => $lang['Author'], ! 'L_ACTION' => $lang['Art_action'], ! 'L_APPROVED' => $lang['Art_approved'], ! 'L_NOT_APPROVED' => $lang['Art_not_approved'], ! 'L_EDITED' => $lang['Art_edit'], ! 'L_ART_TITLE' => $lang['Panel_art_title'], ! 'L_ART_EXPLAIN' => $lang['Panel_art_explain'] ! )); break; } Index: admin_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_auth.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_kb_auth.php 3 Nov 2005 12:13:33 -0000 1.11 --- admin_kb_auth.php 8 Dec 2005 15:04:25 -0000 1.12 *************** *** 80,84 **** if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_kb_cat_list = $mx_kb->get_kb_cat_list( '', 0, 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); --- 80,84 ---- if ( !isset( $HTTP_POST_VARS['submit'] ) ) { ! $s_kb_cat_list = $mx_kb->generate_jumpbox( '', 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_kb_cat.php 3 Nov 2005 12:13:33 -0000 1.19 --- admin_kb_cat.php 8 Dec 2005 15:04:25 -0000 1.20 *************** *** 72,111 **** } ! function get_forums( $sel_id = 0 ) { ! global $db; ! ! $sql = "SELECT forum_id, forum_name ! FROM " . FORUMS_TABLE; ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); ! } ! ! $forumlist = '<select name="forum_id">'; ! ! if ( $sel_id == 0 ) ! { ! $forumlist .= '<option value="0" selected > Select a Forum !</option>'; ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! if ( $sel_id == $row['forum_id'] ) ! { ! $status = "selected"; ! } ! else ! { ! $status = ''; ! } ! $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; ! } ! ! $forumlist .= '</select>'; ! ! return $forumlist; } $mx_kb->init(); --- 72,86 ---- } ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } $mx_kb->init(); *************** *** 140,144 **** { $new_cat_name = stripslashes( $HTTP_POST_VARS['new_cat_name'] ); ! // // Generate page --- 115,158 ---- { $new_cat_name = stripslashes( $HTTP_POST_VARS['new_cat_name'] ); ! ! // ! // Comments ! // ! $use_comments_yes = ""; ! $use_comments_no = ""; ! $use_comments_default = "checked=\"checked\""; ! ! $internal_comments_internal = ""; ! $internal_comments_phpbb = ""; ! $internal_comments_default = "checked=\"checked\""; ! ! $autogenerate_comments_yes = ""; ! $autogenerate_comments_no = ""; ! $autogenerate_comments_default = "checked=\"checked\""; ! ! // ! // Ratings ! // ! $use_ratings_yes = ""; ! $use_ratings_no = ""; ! $use_ratings_default = "checked=\"checked\""; ! ! // ! // Instructions ! // ! $pretext_show = ""; ! $pretext_hide = ""; ! $pretext_default = "checked=\"checked\""; ! ! // ! // Notification ! // ! $notify_none = ""; ! $notify_pm = ""; ! $notify_email = ""; ! $notify_default = "checked=\"checked\""; ! ! $notify_group_list = mx_get_groups('', 'notify_group'); ! // // Generate page *************** *** 149,156 **** $template->assign_vars( array( 'L_EDIT_TITLE' => $lang['Create_cat'], 'L_EDIT_DESCRIPTION' => $lang['Create_description'], 'L_CATEGORY' => $lang['Category'], ! 'L_DESCRIPTION' => $lang['Article_description'], 'L_NUMBER_ARTICLES' => $lang['Articles'], 'L_CAT_SETTINGS' => $lang['Cat_settings'], --- 163,172 ---- $template->assign_vars( array( + 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=create" ), + 'L_EDIT_TITLE' => $lang['Create_cat'], 'L_EDIT_DESCRIPTION' => $lang['Create_description'], 'L_CATEGORY' => $lang['Category'], ! 'L_DESCRIPTION' => $lang['Category_description'], 'L_NUMBER_ARTICLES' => $lang['Articles'], 'L_CAT_SETTINGS' => $lang['Cat_settings'], *************** *** 159,174 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $mx_kb->get_kb_cat_list( '', 0, 0, 0, 0, true ), 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], 'FORUM_LIST' => get_forums( ), ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=create" ), ! 'CAT_NAME' => $new_cat_name, ! 'DESC' => '', ! 'NUMBER_ARTICLES' => '0', ! // Category permissions 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], --- 175,264 ---- 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $mx_kb->generate_jumpbox( '', 0, 0, 0, true ), ! 'CAT_NAME' => $new_cat_name, ! 'DESC' => '', ! 'NUMBER_ARTICLES' => '0', ! ! 'L_DEFAULT' => $lang['Use_default'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'L_NONE' => $lang['Acc_None'], ! ! // ! // Comments ! // ! 'L_COMMENTS_TITLE' => $lang['Comments_title'], ! ! 'L_USE_COMMENTS' => $lang['Use_comments'], ! 'L_USE_COMMENTS_EXPLAIN' => $lang['Use_comments_explain'], ! 'S_USE_COMMENTS_YES' => $use_comments_yes, ! 'S_USE_COMMENTS_NO' => $use_comments_no, ! 'S_USE_COMMENTS_DEFAULT' => $use_comments_default, ! ! 'L_INTERNAL_COMMENTS' => $lang['Internal_comments'], ! 'L_INTERNAL_COMMENTS_EXPLAIN' => $lang['Internal_comments_explain'], ! 'S_INTERNAL_COMMENTS_INTERNAL' => $internal_comments_internal, ! 'S_INTERNAL_COMMENTS_PHPBB' => $internal_comments_phpbb, ! 'S_INTERNAL_COMMENTS_DEFAULT' => $internal_comments_default, ! 'L_INTERNAL_COMMENTS_INTERNAL' => $lang['Internal_comments_internal'], ! 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], 'FORUM_LIST' => get_forums( ), + + 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], + 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], + 'S_AUTOGENERATE_COMMENTS_YES' => $autogenerate_comments_yes, + 'S_AUTOGENERATE_COMMENTS_NO' => $autogenerate_comments_no, + 'S_AUTOGENERATE_COMMENTS_DEFAULT' => $autogenerate_comments_default, + + // + // Ratings + // + 'L_RATINGS_TITLE' => $lang['Ratings_title'], + + 'L_USE_RATINGS' => $lang['Use_ratings'], + 'L_USE_RATINGS_EXPLAIN' => $lang['Use_ratings_explain'], + 'S_USE_RATINGS_YES' => $use_ratings_yes, + 'S_USE_RATINGS_NO' => $use_ratings_no, + 'S_USE_RATINGS_DEFAULT' => $use_ratings_default, + + // + // Instructions + // + 'L_INSTRUCTIONS_TITLE' => $lang['Instructions_title'], + + 'L_PRE_TEXT_NAME' => $lang['Pre_text_name'], + 'L_PRE_TEXT_EXPLAIN' => $lang['Pre_text_explain'], + 'S_SHOW_PRETEXT' => $pretext_show, + 'S_HIDE_PRETEXT' => $pretext_hide, + 'S_DEFAULT_PRETEXT' => $pretext_default, + + 'L_SHOW' => $lang['Show'], + 'L_HIDE' => $lang['Hide'], ! // ! // Notifications ! // ! 'L_NOTIFICATIONS_TITLE' => $lang['Notifications_title'], ! ! 'L_NOTIFY' => $lang['Notify'], ! 'L_NOTIFY_EXPLAIN' => $lang['Notify_explain'], ! 'L_EMAIL' => $lang['Email'], ! 'L_PM' => $lang['PM'], ! ! 'S_NOTIFY_NONE' => $notify_none, ! 'S_NOTIFY_EMAIL' => $notify_email, ! 'S_NOTIFY_PM' => $notify_pm, ! 'S_NOTIFY_DEFAULT' => $notify_default, ! ! 'L_NOTIFY_GROUP' => $lang['Notify_group'], ! 'L_NOTIFY_GROUP_EXPLAIN' => $lang['Notify_group_explain'], ! 'NOTIFY_GROUP' => $notify_group_list, ! ! // // Category permissions + // 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], *************** *** 213,218 **** --- 303,319 ---- $cat_desc = $HTTP_POST_VARS['catdesc']; $parent = intval( $HTTP_POST_VARS['parent'] ); + + $cat_use_comments = ( isset( $HTTP_POST_VARS['cat_allow_comments'] ) ) ? intval( $HTTP_POST_VARS['cat_allow_comments'] ) : 0; + $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; + $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; $comments_forum_id = intval( $HTTP_POST_VARS['forum_id'] ); + + $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; + + $cat_use_ratings = ( isset( $HTTP_POST_VARS['cat_allow_ratings'] ) ) ? intval( $HTTP_POST_VARS['cat_allow_ratings'] ) : 0; + $cat_notify = ( isset( $HTTP_POST_VARS['notify'] ) ) ? intval( $HTTP_POST_VARS['notify'] ) : 0; + $cat_notify_group = ( isset( $HTTP_POST_VARS['notify_group'] ) ) ? intval( $HTTP_POST_VARS['notify_group'] ) : 0; + if ( $comments_forum_id == 0 ) { *************** *** 244,249 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 345,350 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 277,281 **** --- 378,422 ---- $number_articles = $kb_cat['number_articles']; $parent = $kb_cat['parent']; + + // + // Comments + // + $use_comments_yes = ( $kb_cat['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $use_comments_no = ( $kb_cat['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; + $use_comments_default = ( $kb_cat['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; + + $internal_comments_internal = ( $kb_cat['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $internal_comments_phpbb = ( $kb_cat['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; + $internal_comments_default = ( $kb_cat['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; + $comments_forum_id = $kb_cat['comments_forum_id']; + + $autogenerate_comments_yes = ( $kb_cat['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; + $autogenerate_comments_no = ( $kb_cat['autogenerate_comments'] == 0) ? "checked=\"checked\"" : ""; + $autogenerate_comments_default = ( $kb_cat['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; + + // + // Ratings + // + $use_ratings_yes = ( $kb_cat['cat_allow_ratings'] == 1) ? "checked=\"checked\"" : ""; + $use_ratings_no = ( $kb_cat['cat_allow_ratings'] == 0) ? "checked=\"checked\"" : ""; + $use_ratings_default = ( $kb_cat['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; + + // + // Instructions + // + $pretext_show = ( $kb_cat['show_pretext'] == 1) ? "checked=\"checked\"" : ""; + $pretext_hide = ( $kb_cat['show_pretext'] == 0) ? "checked=\"checked\"" : ""; + $pretext_default = ( $kb_cat['show_pretext'] == -1 ) ?... [truncated message content] |