|
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; |