|
From: Jon O. <jon...@us...> - 2005-03-28 20:23:25
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20851/modules/mx_kb Modified Files: db_install.php db_upgrade.php kb.php kb_article_reader.php kb_search.php Log Message: finally rewriting this module, once and for all - rewritten post methods - better security - separated html. bbcode, smilies from phpbb - wysiwyg support - adding custom fields - making it compatible with phpBB mod Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_search.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** kb_search.php 11 Feb 2005 22:10:29 -0000 1.10 --- kb_search.php 28 Mar 2005 20:22:46 -0000 1.11 *************** *** 473,477 **** $template->pparse( 'body' ); // load footer ! include ( $module_root_path . "includes/kb_footer." . $phpEx ); if ( !$is_block ) --- 473,477 ---- $template->pparse( 'body' ); // load footer ! //include ( $module_root_path . "includes/kb_footer." . $phpEx ); if ( !$is_block ) Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** kb.php 26 Mar 2005 22:52:35 -0000 1.14 --- kb.php 28 Mar 2005 20:22:45 -0000 1.15 *************** *** 130,135 **** --- 130,140 ---- include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); + include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); + // Instanciate custom fields + $kb_custom_field = new kb_custom_field(); + $kb_custom_field->init(); + $show_new = true; Index: kb_article_reader.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_article_reader.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_article_reader.php 6 Mar 2005 01:12:29 -0000 1.3 --- kb_article_reader.php 28 Mar 2005 20:22:46 -0000 1.4 *************** *** 50,54 **** else { - // Read block Configuration --- 50,53 ---- *************** *** 73,80 **** --- 72,85 ---- include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); + include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); // echo(var_export($_SESSION['newssuite_'.$page_id]['testar'])); + // Instanciate custom fields + $kb_custom_field = new kb_custom_field(); + $kb_custom_field->init(); + $show_new = true; + // options if ( !$board_config['allow_html'] ) Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** db_install.php 26 Mar 2005 22:52:35 -0000 1.22 --- db_install.php 28 Mar 2005 20:22:45 -0000 1.23 *************** *** 80,89 **** "CREATE TABLE " . $mx_table_prefix . "kb_categories ( ! 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', --- 80,89 ---- "CREATE TABLE " . $mx_table_prefix . "kb_categories ( ! 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', *************** *** 104,109 **** auth_moderator_groups varchar(255), comments_forum_id tinyint(3) NOT NULL DEFAULT '-1', ! ! KEY category_id (category_id) )", --- 104,108 ---- auth_moderator_groups varchar(255), comments_forum_id tinyint(3) NOT NULL DEFAULT '-1', ! KEY category_id (category_id) )", *************** *** 188,192 **** --- 187,212 ---- KEY post_id (article_id), KEY word_id (word_id) + )", + + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_custom` + "CREATE TABLE " . $mx_table_prefix . "kb_custom ( + 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) + )", + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_customdata` + "CREATE TABLE " . $mx_table_prefix . "kb_customdata ( + customdata_file int(50) NOT NULL default '0', + customdata_custom int(50) NOT NULL default '0', + data text NOT NULL )" + ); Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** db_upgrade.php 26 Mar 2005 22:52:35 -0000 1.15 --- db_upgrade.php 28 Mar 2005 20:22:45 -0000 1.16 *************** *** 61,64 **** --- 61,65 ---- $upgrade_108 = 0; $upgrade_109 = 0; + $upgrade_200 = 0; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 107,111 **** } // validate before 1.09 ! if ( !$result = $db->sql_query( "SELECT cat_view_level from " . $mx_table_prefix . "kb_categories" ) ) { $upgrade_109 = 1; --- 108,112 ---- } // validate before 1.09 ! if ( !$result = $db->sql_query( "SELECT auth_edit_groups from " . $mx_table_prefix . "kb_categories" ) ) { $upgrade_109 = 1; *************** *** 121,125 **** { $upgrade_200 = 1; ! $message .= "<b>Validating v. 2.00...ok</b><br/><br/>"; } else --- 122,126 ---- { $upgrade_200 = 1; ! $message .= "<b>Upgrading to v. 2.00...ok</b><br/><br/>"; } else *************** *** 250,253 **** --- 251,274 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allow_smilies', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('allowed_html_tags', 'b,i,u,a')"; + + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_custom` + $sql[] = "CREATE TABLE " . $mx_table_prefix . "kb_custom ( + 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) + )"; + // -------------------------------------------------------- + // Table structure for table `phpbb_pa_customdata` + $sql[] = "CREATE TABLE " . $mx_table_prefix . "kb_customdata ( + customdata_file int(50) NOT NULL default '0', + customdata_custom int(50) NOT NULL default '0', + data text NOT NULL + )"; } else |