diff --git a/Scripts/newbb2phpbb/GPL b/Scripts/newbb2phpbb/GPL new file mode 100755 index 0000000..5b6e7c6 --- /dev/null +++ b/Scripts/newbb2phpbb/GPL @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Scripts/newbb2phpbb/classes/db_mysql.php b/Scripts/newbb2phpbb/classes/db_mysql.php new file mode 100755 index 0000000..60c9893 --- /dev/null +++ b/Scripts/newbb2phpbb/classes/db_mysql.php @@ -0,0 +1,208 @@ + + ***/ + +class DB_MYSQL +{ + public $db_conn; + + public $db_host; + public $db_user; + public $db_pass; + public $db_xoops_db; + public $db_xoops_tbl; + public $db_phpbb_db; + public $db_phpbb_tbl; + + /*** + * Class Construct + ***/ + + function __construct() + { + // Initialize configuration values + $this->db_host = 'localhost'; + $this->db_user = 'root'; + $this->db_pass = ''; + $this->db_xoops_db = 'xoops'; + $this->db_xoops_tbl = 'xoops_'; + $this->db_phpbb_db = 'phpBB'; + $this->db_phpbb_tbl = 'phpbb_'; + + // Reinitialize configuration values + $config = array('db_host', 'db_user', 'db_pass', 'db_xoops_db', + 'db_xoops_tbl', 'db_phpbb_db', 'db_phpbb_tbl'); + + foreach ( $config as $param ) + { + if ( ! isset( $_SESSION[$param] ) ) + { + $_SESSION[$param] = $this->$param; + } + + $_SESSION[$param] = isset($_POST[$param])?$_POST[$param]:$_SESSION[$param]; + + $this->$param = $_SESSION[$param]; + } + } + + /*** + * Connect + */ + function connect() + { + // Connect to MySQL database + $this->db_conn = mysql_connect( $this->db_host, + $this->db_user, + $this->db_pass ); + if ( $this->db_conn ) + { + return true; + } + else + { + return false; + } + } + + /*** + * DB Configuration + */ + function get_configForm( $disabled = '' ) + { + $htmlblock = array(); + + array_push( $htmlblock, + // Common DB Configuration + '

Common DB configuration:

', + '
', + '
Server:
', + '
', + + '
Username:
', + '
', + + '
Password:
', + '
', + '
', + + // Xoops Configuration + '

Xoops configuration:

', + '
', + '
Xoops database name:
', + '
', + + '
Xoops table prefix:
', + '
', + + '
', + + // phpBB Configuration + '

phpBB configuration:

', + '
', + '
Phpbb database name:
', + '
', + + '
Phpbb table prefix:
', + '
', + '
'); + + return $htmlblock; + } + + /*** + * Query + */ + function query( $sql ) + { + $this->connect(); + $result = mysql_query( $sql, $this->db_conn ); + if ( $result ) + { + return $result; + } + else + { + return false; + } + } + + /*** + * Check existance + */ + function check_existance( $name ) + { + + switch ( $name ) + { + case 'phpbb': + $check_dbname = $this->db_phpbb_db; + $check_suffix = $this->db_phpbb_tbl; + $check_tables = array('users', 'forums', 'topics', 'posts'); + break; + + case 'xoops': + $check_dbname = $this->db_xoops_db; + $check_suffix = $this->db_xoops_tbl; + $check_tables = array('users', 'bb_forums', 'bb_topics', 'bb_posts', 'bb_posts_text'); + break; + } + + $error = 0; + $table_list = array(); + + // Check database existance + if ( ! mysql_select_db( $check_dbname ) ) + { + $error++; + } + + // Check tables existance + else + { + $sql = 'SHOW TABLES FROM ' . $check_dbname . ';'; + $result = $this->query( $sql ); + while ( $row = mysql_fetch_row ($result) ) + { + array_push($table_list, $row[0]); + } + + foreach ($check_tables as $tablename) + { + $tablename = $check_suffix . $tablename; + if (in_array($tablename, $table_list) === false ) + { + $error++; + } + } + } + + if ( $error == 0 ) + { + return true; + } + else + { + return false; + } + } + + /*** + * Class Destruct + ***/ + + function disconnect() + { + mysql_close( $this->db_conn ); + } +} + +$db = new DB_MYSQL; +?> diff --git a/Scripts/newbb2phpbb/classes/html.php b/Scripts/newbb2phpbb/classes/html.php new file mode 100755 index 0000000..6c85f07 --- /dev/null +++ b/Scripts/newbb2phpbb/classes/html.php @@ -0,0 +1,132 @@ + '', + 1 => "\t", + 2 => "\t\t", + 3 => "\t\t\t", + 4 => "\t\t\t\t", + 5 => "\t\t\t\t\t"); + + // Define indententaion level by tags + $levels = array('/<\/?html/' => 0, + '/<\/?(body|head)( .+|>)/' => 1, + '/<\/?(title)( .+|>)/' => 2, + '/<\/?(br|hr) \/>/' => 2, + '/<\/?(p|pre|table|dl|ul|ol|div|h[1-9]|form|link)( .+|>)/' => 3, + '/<\/?(li|dt|dd|span|select|option|tr)( .+|>)/' => 4, + '/<\/?(th|td)( .+|>)/' => 5); + + // Set line level, line by line + foreach ( $htmlblock as $line ) + { + foreach ( $levels as $tag => $level ) + { + if ( preg_match( $tag, $line ) ) + { + $html_formatted .= $tabs[$level] . $line . "\n"; + } + + } + } + + return $html_formatted; + } + + /*** + * Format messages + * + * $message : the message text itself. + * $color : grey|green|orange|blue|violet|red + * if no color is specified grey color is assumed as default + */ + function format_message( $message = 'Empty', $color = '' ) + { + // Validate color to be used + $valid_colors = array('grey', 'green', 'orange', 'violet', 'blue', 'red'); + if ( ! in_array( $color, $valid_colors ) ) + { + $color = ''; + } + + // Build message html + $html = '
' . strtoupper($message) . '
'; + + return $html; + } + + /*** + * Where is my position in the migration ? + * ---------------------------------------------------- + * It is somehow a breadcrumb of where you are in the migration process. + */ + function get_stepPosition() + { + // Define migration process stepts + $steps = array(0 => 'Configuration', + 1 => 'Verification', + 2 => 'Migration', + 3 => 'Reset Passwords'); + + $position = isset( $_POST['step'] )?$_POST['step']:0; + + $htmlblock = array(''); + + return $htmlblock; + } + + /*** + * Navibar + */ + function get_navibar() + { + global $db; + + $htmlblock = array(''); + + return $htmlblock; + } +} + +$html = new HTML; +?> diff --git a/Scripts/newbb2phpbb/classes/ldap.php b/Scripts/newbb2phpbb/classes/ldap.php new file mode 100755 index 0000000..63d78b0 --- /dev/null +++ b/Scripts/newbb2phpbb/classes/ldap.php @@ -0,0 +1,321 @@ + + ***/ + +class LDAP +{ + public $this_conn; + public $this_host; + public $this_port; + public $this_rootdn; + public $this_rootpw; + public $this_authschema; + public $this_basedn; + + /*** + * Class initialization + */ + function __construct() + { + // Initialize configuration values + $this->ldap_host = 'localhost'; + $this->ldap_port = '389'; + $this->ldap_rootdn = 'cn=manager,dc=example,dc=com'; + $this->ldap_rootpw = ''; + $this->ldap_authschema = '{MD5}'; + $this->ldap_basedn = 'ou=people,dc=example,dc=com'; + + // Reinitialize configuration values + $config = array('ldap_host', 'ldap_port', 'ldap_rootdn', + 'ldap_rootpw', 'ldap_authschema','ldap_basedn'); + + foreach ( $config as $param ) + { + if ( ! isset($_SESSION[$param] ) ) + { + $_SESSION[$param] = $this->$param; + } + + $_SESSION[$param] = isset($_POST[$param])?$_POST[$param]:$_SESSION[$param]; + + $this->$param = $_SESSION[$param]; + } + + // Open connection against ldap server + if ( $this->ldap_host && $this->ldap_port ) + { + $this->ldap_conn = ldap_connect( $this->ldap_host, $this->ldap_port ); + } + + // Set protocol version to use LDAPv3 + ldap_set_option( $this->ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); + } + + /*** + * LDAP configuration + */ + function get_configForm( $disabled = "" ) + { + $htmlblock = array(); + + array_push( $htmlblock, + + '

LDAP configuration:

', '
', + + '
Host:
', + '
', + + '
Port:
', + '
', + + '
Bind DN:
', + '
', + + '
Base DN:
', + '
', + + '
Bind Password:
', + '
', + + + '
Schema:
', + '
', + '', + '
', + + '
'); + + return $htmlblock; + } + + + /*** + * Verify configuration + */ + function verify_configuration() + { + + } + + /*** + * Bind to LDAP server + */ + function do_bind() + { + return ldap_bind( $this->ldap_conn, $this->ldap_rootdn, $this->ldap_rootpw ); + } + + /*** + * Verify LDAP uid's value uniqness + */ + function is_uid_present( $uid ) + { + $filter = 'uid=' . $uid; + $result = ldap_search( $this->ldap_conn, $this->ldap_basedn, $filter); + $entry = ldap_get_entries( $this->ldap_conn, $result); + + if ( $uid != '' && $entry['count'] == 1 ) + { + return true; + } + else + { + return false; + } + } + + /*** + * Prepare LDAP userPassword attribute + */ + function prepare_userpassword( $userpassword ) + { + $dirty['userpassword'] = $userpassword; + $clean['userpassword'] = ''; + + switch ( $this->ldap_authschema ) + { + case '{MD5}': + $clean['userpassword'] = '{MD5}' . base64_encode( pack( 'H*', md5( $dirty['userpassword'] ) ) ); + break; + + case '{SHA}': + $clean['userpassword'] = '{SHA}' . base64_encode( pack( 'H*', sha1( $dirty['userpassword'] ) ) ); + break; + } + + return $clean['userpassword']; + } + + + /*** + * Add User + */ + function add_User( $entry ) + { + $this_entry = array(); + + // Define user DN + $dn = 'uid=' . $entry['email'] . ',' . $this->ldap_basedn; + + // Remove user if exists + if ( $this->is_uid_present( $entry['uname'] ) === true ) + { + $this->delete_User( $entry ); + } + + // Prepare userPassword and other attributes for insertion in LDAP directory. + $this_entry['objectclass'] = 'inetOrgPerson'; + $this_entry['cn'] = $entry['name']; + $this_entry['mail'] = $entry['email']; + $this_entry['userpassword'] = $this->prepare_userpassword($entry['pass']); + $this_entry['sn'] = preg_replace('/^([a-zA-Z0-9_]+ ?)/','', $this_entry['cn']); + $this_entry['uid'][0] = $this_entry['mail']; + $this_entry['uid'][1] = $entry['uname']; + $this_entry['displayname'] = $entry['uname']; + $this_entry['employeetype'] = 'writer'; + $this_entry['preferredlanguage'] = 'en'; + + if ( $this->do_bind() && ldap_add( $this->ldap_conn, $dn, $this_entry )) + { + return true; + } + else + { + return false; + } + } + + /*** + * Delete User + */ + function delete_User( $entry ) + { + // Define user DN + $dn = 'uid=' . $entry['email'] . ',' . $this->ldap_basedn; + + if ( $this->do_bind() && ldap_delete( $this->ldap_conn, $dn ) ) + { + return true; + } + else + { + return false; + } + } + + /*** + * Update LDAP userPassword only. + */ + function update_userPassword( $dn, $userPassword ) + { + $entry = array('userpassword' => $userPassword ); + + if ( $this->do_bind() && ldap_modify( $this->ldap_conn, $dn, $entry) ) + { + return true; + } + else + { + return false; + } + } + + /*** + * Get LDAP user list + * ---------------------------------------------------- + * 1. Show a form with a list of all users inserted from xoops.users table. + * 2. Generate random passwords for each user and codify them into + * userPassword format. + * 3. Real passwords are not displayed. + */ + function get_userList() + { + global $newbb_to_phpbb; + global $mail; + + // Get users from LDAP server + $filter = 'objectclass=inetorgperson'; + $result = ldap_search( $this->ldap_conn, $this->ldap_basedn, $filter); + $users = ldap_get_entries( $this->ldap_conn, $result ); + + $htmlblock = array('

'.$users['count'].' password(s) reset under: '.$this->ldap_basedn.'

', + '', + '', + '', + '', + '', + '', + '', + '', + ''); + + for ($i = 0; $i < $users['count']; $i++) + { + // Reset userPassword value in a random manner + $newPassword = $newbb_to_phpbb->get_randomPass(); + $userPassword = $this->prepare_userpassword($newPassword); + + array_push($htmlblock, '', + '', + '', + '', + ''); + + // Update LDAP userPassword field + if ( $this->update_userPassword( $users[$i]['dn'], $userPassword ) === true ) + { + array_push($htmlblock,''); + } + else + { + array_push($htmlblock,''); + } + + // Send email notification + $info = array('mailto' => $users[$i]['mail'][0], + 'cn' => $users[$i]['cn'][0], + 'dn' => $users[$i]['dn'], + 'uid1' => $users[$i]['uid'][0], + 'uid2' => $users[$i]['uid'][1], + 'sn' => $users[$i]['sn'][0], + 'employeetype' => $users[$i]['employeetype'][0], + 'preferredlanguage' => $users[$i]['preferredlanguage'][0], + 'displayname' => $users[$i]['displayname'][0], + 'userpassword' => $newPassword); + if ( $mail->send( $info ) === true ) + { + array_push($htmlblock,''); + } + else + { + array_push($htmlblock,''); + } + array_push($htmlblock,''); + } + + array_push($htmlblock,'
DNCNNewPassuserPasswordPassword UpdatedEmail Notification
' . $users[$i]['dn'] . '' . $users[$i]['cn'][0] . '' . $newPassword . '' . $userPassword . 'YESNOSENTNOT SENT
'); + + return $htmlblock; + } + + /*** + * Class destruct + */ + function __destruct() + { + if ( isset( $this->ldap_conn ) ) + { + ldap_unbind( $this->ldap_conn ); + } + } +} + +$ldap = new LDAP; +?> diff --git a/Scripts/newbb2phpbb/classes/mail.php b/Scripts/newbb2phpbb/classes/mail.php new file mode 100755 index 0000000..ead6bfc --- /dev/null +++ b/Scripts/newbb2phpbb/classes/mail.php @@ -0,0 +1,157 @@ +notification = 'NO'; + $this->notification_subject = '[CentOS Forum] User account notification.'; + $this->notification_message = "Dear =USER_FIRST_NAME=, + +The CentOS Forums (http://centos.org/forums/) were migrated from +Xoops+CBB(newbb) to phpBB3 and the user accounts were moved to an LDAP +server. As consequence your user account is now on that LDAP server. + +In order to make this happen, it was needed to reset your account +password. Your password(userPassword) is here with the rest of your +user account information. + +The following LDAP entry has the information of your user account: + + dn: =DN= + uid: =UID1= + uid: =UID2= + userPassword: =PASS= + mail: =MAIL= + cn: =CN= + sn: =SN= + employeeType: =TYPE= +preferredLanguage: =LANG= + displayName: =DISPLAYNAME= + +With this migration we are preparing the ground to unify all CentOS +user accounts into a common place. If you need to authenticate +somewhere under centos.org domain use any of your uids and the +password provided above. + +Best Regards, +-- +The CentOS Team"; + + // Reinitialize variables with form values + $config = array('notification', 'notification_subject', 'notification_message'); + foreach ( $config as $param ) + { + if ( ! isset($_SESSION[$param])) + { + $_SESSION[$param] = $this->$param; + } + + $_SESSION[$param] = isset($_POST[$param])?$_POST[$param]:$_SESSION[$param]; + + $this->$param = $_SESSION[$param]; + } + } + + /*** + * Send + * ------- + * $info is an array with the following indexes: + * - mailto + * - name + * - dn + * - newpass + */ + + function send( $info ) + { + // Do replacements in message template + $this->notification_message = preg_replace('/=MAIL=/', $info['mailto'],$this->notification_message); + $this->notification_message = preg_replace('/=DN=/', $info['dn'],$this->notification_message); + $this->notification_message = preg_replace('/=UID1=/', $info['uid1'],$this->notification_message); + $this->notification_message = preg_replace('/=UID2=/', $info['uid2'],$this->notification_message); + $this->notification_message = preg_replace('/=PASS=/', $info['userpassword'],$this->notification_message); + $this->notification_message = preg_replace('/=CN=/', $info['cn'],$this->notification_message); + $this->notification_message = preg_replace('/=SN=/', $info['sn'],$this->notification_message); + $this->notification_message = preg_replace('/=TYPE=/', $info['employeetype'],$this->notification_message); + $this->notification_message = preg_replace('/=LANG=/', $info['preferredlanguage'],$this->notification_message); + $this->notification_message = preg_replace('/=DISPLAYNAME=/',$info['displayname'],$this->notification_message); + $this->notification_message = preg_replace('/=USER_FIRST_NAME=/', preg_replace('/ .+$/','',$info['cn']), $this->notification_message); + + $to = $info['mailto']; + $subject = $this->notification_subject; + $message = $this->notification_message; + $headers = 'From: webmaster'; + $extra_params = '-fwebmaster'; + if ( $this->notification == 'YES' ) + { + return mail( $to, $subject, $message, $headers, $extra_params ); + } + } + + /*** + * Send notification ? + * Show form selector + */ + + function get_configForm( $disabled = '' ) + { + $htmlblock = array('

Mail Notification:

','
'); + + // Mail template + array_push($htmlblock, + + '
Subject:
', + '
', + + '
Message:
', + '
', + + '
Send notifications ?:
', + '
Use it with care!
'); + + array_push($htmlblock, '
'); + + return $htmlblock; + } + + /*** + * Class destructor + */ + + function __destruct() + { + + } +} + +$mail = new MAIL; +?> diff --git a/Scripts/newbb2phpbb/classes/newbb_to_phpbb.php b/Scripts/newbb2phpbb/classes/newbb_to_phpbb.php new file mode 100755 index 0000000..2eb5e64 --- /dev/null +++ b/Scripts/newbb2phpbb/classes/newbb_to_phpbb.php @@ -0,0 +1,424 @@ + + ***/ + + +class NEWBB_TO_PHPBB +{ + + /*** + * Class Construct + * ---------------------------------------------------- + */ + function __construct() + { + // Initialize session + session_start(); + + // Check action: usedefaults + if ( isset( $_GET['action'] ) && $_GET['action'] == 'restore' ) + { + // Unset session values + session_unset(); + + // Reload page + header('Location: index.php'); + } + } + + /*** + * Verify Configuration + * + * This verification is needed to be sure new information entered + * is valid. + */ + function config_verification( $next_step ) + { + global $db; + global $ldap; + global $html; + + $htmlblock = array(); + $error = 0; + + // Verify LDAP bind + if ( $ldap->do_bind() ) + { + array_push($htmlblock, $html->format_message('LDAP Configuration is correct', 'green')); + } + else + { + array_push( $htmlblock, $html->format_message('LDAP Configuration is incorrect', 'orange')); + $error++; + } + + // Verify Database + if ( $db->connect() === true ) + { + array_push( $htmlblock, $html->format_message('Common DB Configuration is correct', 'green')); + + // Verify XOOPS database and table + if ( $db->check_existance('xoops') === true ) + { + array_push( $htmlblock, $html->format_message('Xoops configuration is correct', 'green')); + } + else + { + array_push( $htmlblock, $html->format_message('Xoops configuration is incorrect', 'orange')); + $error++; + } + + // Verify PHPBB database and table + if ( $db->check_existance('phpbb') === true ) + { + array_push( $htmlblock, $html->format_message('phpBB configuration is correct', 'green')); + } + else + { + array_push( $htmlblock, $html->format_message('phpBB configuration is incorrect', 'orange')); + $error++; + } + } + else + { + array_push( $htmlblock, $html->format_message('Common DB Configuration is incorrect', 'orange')); + $error++; + } + + // Add action button + if ( $error == 0 ) + { + $next_step++; + array_push( $htmlblock, + '

+ + +

'); + } + else + { + array_push($htmlblock, '

PreviousCheck your configuration

'); + } + + return $html->format_htmlblock($htmlblock); + } + + /*** + * Groups + * + * All users in xoops.users will be inserted into phpBB.users + * using the REGISTERED group (group_id = 2). Forums administrators should + * be redifined after migration. + */ + + /*** + * Users + * + * Basic fields are copied from xoops.users to phpBB.users. + * + * Password field should be redifined by the user in order to get logged in + * after the migration. + * + * If LDAP authentication is used the directory structure should be design + * to receive uid and userPassword attributes. In this case the migration + * should be focused from xoops.users to LDAP directory not phpBB.users. + * + * The LDAP registration process is (as my understanding): 1. Add an entry + * for the user in the LDAP directory. 2. Add an entry for the user in the + * DB (this is automatically done by phpBB). This is needed to relate user + * against user specific information like topics, posts, etc. + * + * As we are using LDAP server for users. This function use php's ldap + * extension to add users into LDAP directory. If the user do no exist in + * the Database but in LDAP server, phpBB will automatically insert a + * record for that user in the phpBB.user table. It is needed to relate + * user identity to posts, topics, etc . + * + * User passwords need to be reseted and a notification could be send to each + * user telling the new password set. This is requiered because the + * password codification used in newbb, phpbb and LDAP is different. + * + * The structure of LDAP user entries was built with rfc2377 in mind. + */ + function copy_Users() + { + global $ldap; + global $db; + + $htmlblock = array('

Users

','
    '); + + // Remove phpBB.users. Number 52 seems to be the greatest user_id + // value when no user has been created. + + array_push($htmlblock,'
  • Cleanning up ...
  • '); + + $sql = sprintf('DELETE FROM %s.%susers WHERE user_id > 52;', + $db->db_phpbb_db, + $db->db_phpbb_tbl ); + $db->query( $sql ); + + // Add users into LDAP directory + + array_push($htmlblock,'
  • Copying ...
  • '); + + $sql = sprintf("SELECT uname, + name, + email, + pass + FROM %s.%susers WHERE uid > 1", + $db->db_xoops_db, + $db->db_xoops_tbl ); + + $result = $db->query( $sql ); + + $counter = 0; + + while ( $entry = mysql_fetch_array( $result ) ) + { + // Add xoops.users into LDAP directory + if ( $ldap->add_User( $entry ) === true ) + { + $counter++; + } + } + + array_push($htmlblock,'
  • '. $counter .' user(s) copied successfully.
  • ','
'); + + return $htmlblock; + } + + /*** + * Categories + * + * Not copied. In phpBB there is no category. + */ + + /*** + * Copy Forum + */ + function copy_Forums() + { + global $db; + + $htmlblock = array('

Forums

', '
    '); + + // Clean up Forums + + array_push( $htmlblock, '
  • Cleanning up ...
  • ' ); + + $sql = sprintf("TRUNCATE %s.%sforums;", + $db->db_phpbb_db, + $db->db_phpbb_tbl ); + + $db->query( $sql ); + + // Copy Forums + + array_push($htmlblock,'
  • Copying ...
  • '); + + $sql = sprintf("INSERT INTO %s.%sforums (forum_name, + forum_desc, + forum_topics, + forum_topics_real, + forum_type, + forum_posts) SELECT forum_name, + forum_desc, + forum_topics, + forum_topics, + (SELECT 1 AS forum_type), + forum_posts FROM %s.%sbb_forums;", + $db->db_phpbb_db, $db->db_phpbb_tbl, + $db->db_xoops_db, $db->db_xoops_tbl); + + $db->query( $sql ); + + // Get forums recently added and update their order, ownership, and type. + + $sql = sprintf('SELECT forum_id, left_id, right_id FROM %s.%sforums;', + $db->db_phpbb_db, + $db->db_phpbb_tbl ); + + $result = $db->query( $sql ); + + // Sanitize forum's order one by one + + $left_id = 1; + $right_id = 2; + $counter = 0; + + while ( $row = mysql_fetch_array( $result ) ) + { + $sql = sprintf("UPDATE %s.%sforums SET left_id = %d, right_id = %d WHERE forum_id = %d;", + $db->db_phpbb_db, + $db->db_phpbb_tbl, + $left_id, + $right_id, + $row['forum_id']); + + $db->query( $sql ); + + $left_id = $left_id + 2; + $right_id = $left_id + 1; + + // Counter + + $counter++; + } + + // Get amount of forums copied. + array_push( $htmlblock, '
  • ' . $counter . ' forum(s) copied successfully.
  • ', '
'); + + return $htmlblock; + } + + /*** + * Topics + * + * When doing Topic copying the user used will be administrator. This means + * that all topics and posts after migration will be own by the + * administrator user. + */ + function copy_Topics() + { + global $db; + + $htmlblock = array('

Topics

','
    '); + + // Claen up topics + + array_push( $htmlblock, '
  • Cleanning up ...
  • ' ); + + $sql = sprintf("TRUNCATE %s.%stopics;", + $db->db_phpbb_db, + $db->db_phpbb_tbl ); + + $db->query( $sql ); + + // Copy topics + + array_push( $htmlblock, '
  • Copying ...
  • ' ); + + $sql = sprintf("INSERT INTO %s.%stopics (forum_id, + topic_title, + topic_time, + topic_last_post_time, + topic_views, + topic_last_poster_id, + topic_poster, + topic_replies, + topic_replies_real) SELECT forum_id, + topic_title, + topic_time, + topic_time, + topic_views, + (SELECT 2 AS last_poster_id), + (SELECT 2 AS last_poster_id), + topic_replies, + topic_replies + FROM %s.%sbb_topics", + $db->db_phpbb_db, $db->db_phpbb_tbl, + $db->db_xoops_db, $db->db_xoops_tbl ); + + $db->query( $sql ); + + array_push( $htmlblock, '
  • ' . mysql_affected_rows() . ' topic(s) copied successfully.
  • ', '
' ); + + return $htmlblock; + } + + /*** + * Posts + */ + function copy_Posts() + { + global $db; + + $htmlblock = array('

Posts

','
    '); + + // Clean Up posts + + array_push($htmlblock,'
  • Cleanning up ...
  • '); + + $sql = sprintf("TRUNCATE %s.%sposts;", $db->db_phpbb_db, $db->db_phpbb_tbl); + + $db->query( $sql ); + + // Copy Posts + + array_push( $htmlblock, '
  • Copying ...
  • '); + + $sql = sprintf("INSERT INTO %s.%sposts (topic_id, + forum_id, + poster_id, + post_time, + post_subject, + post_text) SELECT t1.topic_id, + t1.forum_id, + (SELECT 2 AS poster_id), + t1.post_time, + t1.subject, + t2.post_text + FROM %s.%sbb_posts t1 + LEFT JOIN %s.%sbb_posts_text t2 + ON t2.post_id = t1.post_id;", + $db->db_phpbb_db, $db->db_phpbb_tbl, + $db->db_xoops_db, $db->db_xoops_tbl, + $db->db_xoops_db, $db->db_xoops_tbl); + + $db->query( $sql ); + + array_push( $htmlblock, '
  • ' . mysql_affected_rows() .' posts(s) copied successfully.
  • ', '
'); + + return $htmlblock; + } + + /*** + * Generate random password + */ + function get_randomPass() + { + // Add lower case letters + $seed = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', + 'i', 'j', 'k', 'i', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', + 'y', 'z'); + + // Add upper case letters + foreach ( $seed as $value ) + { + array_push( $seed, strtoupper($value) ); + } + + // Add numbers + array_push( $seed, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' ); + + // Use some symbols chars + array_push( $seed, '!', '@', '#', '$', '%', '=', '/','+' ); + + // Build password based on seed + $userPassword = ''; + $passwordLength = 20; + for ($i = 0; $i < $passwordLength; $i++) + { + $userPassword = $userPassword . $seed[array_rand($seed)]; + } + + return $userPassword; + } + + /*** + * Class Destruct + * ---------------------------------------------------- + */ + + function __destruct() + { + } +} + +$newbb_to_phpbb = new NEWBB_TO_PHPBB; +?> diff --git a/Scripts/newbb2phpbb/contents/content.php b/Scripts/newbb2phpbb/contents/content.php new file mode 100755 index 0000000..b1cbb49 --- /dev/null +++ b/Scripts/newbb2phpbb/contents/content.php @@ -0,0 +1,17 @@ + diff --git a/Scripts/newbb2phpbb/contents/footer.php b/Scripts/newbb2phpbb/contents/footer.php new file mode 100755 index 0000000..0c54f0d --- /dev/null +++ b/Scripts/newbb2phpbb/contents/footer.php @@ -0,0 +1,6 @@ +', + '', + '', + ''); +?> diff --git a/Scripts/newbb2phpbb/contents/header.php b/Scripts/newbb2phpbb/contents/header.php new file mode 100755 index 0000000..9b9851d --- /dev/null +++ b/Scripts/newbb2phpbb/contents/header.php @@ -0,0 +1,27 @@ + +', + '', + '', + 'newbb to phpbb :: Migrating Xoops+CBB(newbb) to phpBB', + '', + '', + '', + ''); + + // Where am I in the migration process ? + if ( ! isset($_GET['p'] ) ) + { + $htmlblock = array_merge($htmlblock, $html->get_stepPosition()); + } + + array_push($htmlblock,'
'); +?> diff --git a/Scripts/newbb2phpbb/contents/p_help.php b/Scripts/newbb2phpbb/contents/p_help.php new file mode 100755 index 0000000..111af2e --- /dev/null +++ b/Scripts/newbb2phpbb/contents/p_help.php @@ -0,0 +1,36 @@ + + newbb to phpbb :: Migrating from Xoops+CBB(newbb) to phpBB+LDAP + Copyright (C) 2009 Alain Reguera Delgado + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +"; + +array_push($htmlblock,'

Help

', '
', + '

About

', + '

newbb to phpbb do two things mainly:

', + '
    ', + '
  1. Migrate users from Xoops to LDAP.
  2. ', + '
  3. Migrate Forums, Topics, and Posts from Xoops\' CBB module (a.k.a newbb) to phpBB3.
  4. ', + '
', + '

Documentation works are in the project\'s page.

', + '

Authors

', + '', + '

Lisence

', + $lisence); diff --git a/Scripts/newbb2phpbb/contents/p_main.php b/Scripts/newbb2phpbb/contents/p_main.php new file mode 100755 index 0000000..75f66c9 --- /dev/null +++ b/Scripts/newbb2phpbb/contents/p_main.php @@ -0,0 +1,59 @@ +'); + // Configuration + if ( $next_step == 0 ) + { + $next_step++; + array_push($htmlblock,'

Configuration

', '
'); + $htmlblock = array_merge($htmlblock,$ldap->get_configForm()); + $htmlblock = array_merge($htmlblock,$db->get_configForm()); + $htmlblock = array_merge($htmlblock,$mail->get_configForm()); + + array_push($htmlblock, '

', + 'ReloadReload default configuration + ', + '', + '

'); + } + + // Verification + else if ( $next_step == 1 ) + { + array_push($htmlblock,'

Verification

', + '
', + $newbb_to_phpbb->config_verification( $next_step )); + } + + // Migration + else if ( $next_step == 2 ) + { + array_push($htmlblock,'

Migration

', '
'); + $htmlblock = array_merge($htmlblock, $newbb_to_phpbb->copy_Forums(), + $newbb_to_phpbb->copy_Users(), + $newbb_to_phpbb->copy_Topics(), + $newbb_to_phpbb->copy_Posts()); + $next_step++; + array_push($htmlblock,'

+ + +

'); + } + + // Reset Passwords + else if ( $next_step == 3 ) + { + $next_step++; + array_push($htmlblock,'

Reset Passwords

', '
'); + $htmlblock = array_merge($htmlblock, $ldap->get_userList()); + array_push($htmlblock,'

That\'s all! smile

'); + } + + array_push($htmlblock,''); + +?> diff --git a/Scripts/newbb2phpbb/img/header-bg.png b/Scripts/newbb2phpbb/img/header-bg.png new file mode 100755 index 0000000..ff2a7b0 Binary files /dev/null and b/Scripts/newbb2phpbb/img/header-bg.png differ diff --git a/Scripts/newbb2phpbb/img/html-bg.png b/Scripts/newbb2phpbb/img/html-bg.png new file mode 100755 index 0000000..30f7d70 Binary files /dev/null and b/Scripts/newbb2phpbb/img/html-bg.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-blue.png b/Scripts/newbb2phpbb/img/moin-msg-bg-blue.png new file mode 100755 index 0000000..7a816cf Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-blue.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-gray.png b/Scripts/newbb2phpbb/img/moin-msg-bg-gray.png new file mode 100755 index 0000000..43d1a55 Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-gray.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-green.png b/Scripts/newbb2phpbb/img/moin-msg-bg-green.png new file mode 100755 index 0000000..f4ca7ca Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-green.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-orange.png b/Scripts/newbb2phpbb/img/moin-msg-bg-orange.png new file mode 100755 index 0000000..25a57b5 Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-orange.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-red.png b/Scripts/newbb2phpbb/img/moin-msg-bg-red.png new file mode 100755 index 0000000..2dfcf09 Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-red.png differ diff --git a/Scripts/newbb2phpbb/img/moin-msg-bg-violet.png b/Scripts/newbb2phpbb/img/moin-msg-bg-violet.png new file mode 100755 index 0000000..657824d Binary files /dev/null and b/Scripts/newbb2phpbb/img/moin-msg-bg-violet.png differ diff --git a/Scripts/newbb2phpbb/img/navibartop-bg.png b/Scripts/newbb2phpbb/img/navibartop-bg.png new file mode 100755 index 0000000..936da33 Binary files /dev/null and b/Scripts/newbb2phpbb/img/navibartop-bg.png differ diff --git a/Scripts/newbb2phpbb/img/navibartop-hover-bg.png b/Scripts/newbb2phpbb/img/navibartop-hover-bg.png new file mode 100755 index 0000000..1d5596e Binary files /dev/null and b/Scripts/newbb2phpbb/img/navibartop-hover-bg.png differ diff --git a/Scripts/newbb2phpbb/img/previous.png b/Scripts/newbb2phpbb/img/previous.png new file mode 100644 index 0000000..d3bc514 Binary files /dev/null and b/Scripts/newbb2phpbb/img/previous.png differ diff --git a/Scripts/newbb2phpbb/img/reload.png b/Scripts/newbb2phpbb/img/reload.png new file mode 100644 index 0000000..e46da27 Binary files /dev/null and b/Scripts/newbb2phpbb/img/reload.png differ diff --git a/Scripts/newbb2phpbb/img/smile.png b/Scripts/newbb2phpbb/img/smile.png new file mode 100755 index 0000000..44cc239 Binary files /dev/null and b/Scripts/newbb2phpbb/img/smile.png differ diff --git a/Scripts/newbb2phpbb/index.php b/Scripts/newbb2phpbb/index.php new file mode 100755 index 0000000..58d93dc --- /dev/null +++ b/Scripts/newbb2phpbb/index.php @@ -0,0 +1,13 @@ +format_htmlblock( $htmlblock ); +?> diff --git a/Scripts/newbb2phpbb/schemas/newbb-mysql.sql b/Scripts/newbb2phpbb/schemas/newbb-mysql.sql new file mode 100755 index 0000000..a3f14f6 --- /dev/null +++ b/Scripts/newbb2phpbb/schemas/newbb-mysql.sql @@ -0,0 +1,311 @@ +-- phpMyAdmin SQL Dump +-- version 2.6.4-pl4 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: May 07, 2006 at 01:26 PM +-- Server version: 5.0.16 +-- PHP Version: 5.1.0 +-- +-- CBB 3.04 +-- +-- +-- Database: `cbb` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_archive` +-- + +CREATE TABLE `bb_archive` ( + `topic_id` int(8) unsigned NOT NULL default '0', + `post_id` int(10) unsigned NOT NULL default '0', + `post_text` text NOT NULL +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_attachments` +-- + +CREATE TABLE `bb_attachments` ( + `attach_id` int(8) unsigned NOT NULL auto_increment, + `post_id` int(10) unsigned NOT NULL default '0', + `name_saved` varchar(255) NOT NULL default '', + `name_disp` varchar(255) NOT NULL default '', + `mimetype` varchar(255) NOT NULL default '', + `online` tinyint(1) unsigned NOT NULL default '1', + `attach_time` int(10) unsigned NOT NULL default '0', + `download` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`attach_id`), + KEY `post_id` (`post_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_categories` +-- + +CREATE TABLE `bb_categories` ( + `cat_id` smallint(3) unsigned NOT NULL auto_increment, + `cat_image` varchar(50) NOT NULL default '', + `cat_title` varchar(100) NOT NULL default '', + `cat_description` text NOT NULL, + `cat_order` smallint(3) unsigned NOT NULL default '0', + `cat_url` varchar(255) NOT NULL default '', + PRIMARY KEY (`cat_id`), + KEY `cat_order` (`cat_order`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_digest` +-- + +CREATE TABLE `bb_digest` ( + `digest_id` int(8) unsigned NOT NULL auto_increment, + `digest_time` int(10) unsigned NOT NULL default '0', + `digest_content` text, + PRIMARY KEY (`digest_id`), + KEY `digest_time` (`digest_time`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_forums` +-- + +CREATE TABLE `bb_forums` ( + `forum_id` smallint(4) unsigned NOT NULL auto_increment, + `forum_name` varchar(150) NOT NULL default '', + `forum_desc` text, + `parent_forum` smallint(4) unsigned NOT NULL default '0', + `forum_moderator` varchar(255) NOT NULL default '', + `forum_topics` int(8) unsigned NOT NULL default '0', + `forum_posts` int(10) unsigned NOT NULL default '0', + `forum_last_post_id` int(10) unsigned NOT NULL default '0', + `cat_id` smallint(3) unsigned NOT NULL default '0', + `forum_type` tinyint(1) unsigned NOT NULL default '0', + `allow_html` tinyint(1) unsigned NOT NULL default '1', + `allow_sig` tinyint(1) unsigned NOT NULL default '1', + `allow_subject_prefix` tinyint(1) unsigned NOT NULL default '0', + `hot_threshold` tinyint(3) unsigned NOT NULL default '10', + `forum_order` smallint(4) unsigned NOT NULL default '0', +# `allow_attachments` tinyint(1) unsigned NOT NULL default '1', + `attach_maxkb` smallint(3) unsigned NOT NULL default '1000', + `attach_ext` varchar(255) NOT NULL default '', + `allow_polls` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`forum_id`), + KEY `forum_last_post_id` (`forum_last_post_id`), + KEY `cat_forum` (`cat_id`,`forum_order`), + KEY `forum_order` (`forum_order`), + KEY `cat_id` (`cat_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_moderates` +-- + +CREATE TABLE `bb_moderates` ( + `mod_id` int(10) unsigned NOT NULL auto_increment, + `mod_start` int(10) unsigned NOT NULL default '0', + `mod_end` int(10) unsigned NOT NULL default '0', + `mod_desc` varchar(255) NOT NULL default '', + `uid` int(10) unsigned NOT NULL default '0', + `ip` varchar(32) NOT NULL default '', + `forum_id` smallint(4) unsigned NOT NULL default '0', + PRIMARY KEY (`mod_id`), + KEY `uid` (`uid`), + KEY `mod_end` (`mod_end`), + KEY `forum_id` (`forum_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_online` +-- + +CREATE TABLE `bb_online` ( + `online_forum` int(10) unsigned NOT NULL default '0', + `online_topic` int(8) unsigned NOT NULL default '0', + `online_uid` int(10) unsigned NOT NULL default '0', + `online_uname` varchar(255) NOT NULL default '', + `online_ip` varchar(32) NOT NULL default '', + `online_updated` int(10) unsigned NOT NULL default '0', + KEY `online_forum` (`online_forum`), + KEY `online_topic` (`online_topic`), + KEY `online_updated` (`online_updated`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_posts` +-- + +CREATE TABLE `bb_posts` ( + `post_id` int(10) unsigned NOT NULL auto_increment, + `pid` int(10) unsigned NOT NULL default '0', + `topic_id` int(8) unsigned NOT NULL default '0', + `forum_id` smallint(4) unsigned NOT NULL default '0', + `post_time` int(10) unsigned NOT NULL default '0', + `uid` int(10) unsigned NOT NULL default '0', + `poster_name` varchar(255) NOT NULL default '', + `poster_ip` int(11) NOT NULL default '0', + `subject` varchar(255) NOT NULL default '', + `dohtml` tinyint(1) unsigned NOT NULL default '0', + `dosmiley` tinyint(1) unsigned NOT NULL default '1', + `doxcode` tinyint(1) unsigned NOT NULL default '1', + `dobr` tinyint(1) unsigned NOT NULL default '1', + `doimage` tinyint(1) unsigned NOT NULL default '1', + `icon` varchar(25) NOT NULL default '', + `attachsig` tinyint(1) unsigned NOT NULL default '0', + `approved` smallint(2) NOT NULL default '1', + `post_karma` int(10) unsigned NOT NULL default '0', + `attachment` text, + `require_reply` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`post_id`), + KEY `uid` (`uid`), + KEY `pid` (`pid`), + KEY `forum_id` (`forum_id`), + KEY `topic_id` (`topic_id`), + KEY `subject` (`subject`(40)), + KEY `forumid_uid` (`forum_id`,`uid`), + KEY `topicid_uid` (`topic_id`,`uid`), + KEY `post_time` (`post_time`), + KEY `topicid_postid_pid` (`topic_id`,`post_id`,`pid`), + FULLTEXT KEY `search` (`subject`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_posts_text` +-- + +CREATE TABLE `bb_posts_text` ( + `post_id` int(10) unsigned NOT NULL default '0', + `post_text` text, + `post_edit` text, + PRIMARY KEY (`post_id`), + FULLTEXT KEY `search` (`post_text`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_reads_forum` +-- + +CREATE TABLE `bb_reads_forum` ( + `read_id` int(10) unsigned NOT NULL auto_increment, + `uid` int(10) unsigned NOT NULL default '0', + `read_time` int(10) unsigned NOT NULL default '0', + `read_item` smallint(4) unsigned NOT NULL default '0', + `post_id` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`read_id`), + KEY `uid` (`uid`), + KEY `read_item` (`read_item`), + KEY `post_id` (`post_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_reads_topic` +-- + +CREATE TABLE `bb_reads_topic` ( + `read_id` int(10) unsigned NOT NULL auto_increment, + `uid` int(10) unsigned NOT NULL default '0', + `read_time` int(10) unsigned NOT NULL default '0', + `read_item` int(8) unsigned NOT NULL default '0', + `post_id` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`read_id`), + KEY `uid` (`uid`), + KEY `read_item` (`read_item`), + KEY `post_id` (`post_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_report` +-- + +CREATE TABLE `bb_report` ( + `report_id` int(8) unsigned NOT NULL auto_increment, + `post_id` int(10) unsigned NOT NULL default '0', + `reporter_uid` int(10) unsigned NOT NULL default '0', + `reporter_ip` int(11) NOT NULL default '0', + `report_time` int(10) unsigned NOT NULL default '0', + `report_text` varchar(255) NOT NULL default '', + `report_result` tinyint(1) unsigned NOT NULL default '0', + `report_memo` varchar(255) NOT NULL default '', + PRIMARY KEY (`report_id`), + KEY `post_id` (`post_id`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_topics` +-- + +CREATE TABLE `bb_topics` ( + `topic_id` int(8) unsigned NOT NULL auto_increment, + `topic_title` varchar(255) NOT NULL default '', + `topic_poster` int(10) unsigned NOT NULL default '0', + `topic_time` int(10) unsigned NOT NULL default '0', + `topic_views` int(10) unsigned NOT NULL default '0', + `topic_replies` mediumint(8) unsigned NOT NULL default '0', + `topic_last_post_id` int(8) unsigned NOT NULL default '0', + `forum_id` smallint(4) unsigned NOT NULL default '0', + `topic_status` tinyint(1) unsigned NOT NULL default '0', + `topic_subject` smallint(3) unsigned NOT NULL default '0', + `topic_sticky` tinyint(1) unsigned NOT NULL default '0', + `topic_digest` tinyint(1) unsigned NOT NULL default '0', + `digest_time` int(10) unsigned NOT NULL default '0', + `approved` tinyint(2) NOT NULL default '1', + `poster_name` varchar(255) NOT NULL default '', + `rating` double(6,4) NOT NULL default '0.0000', + `votes` int(11) unsigned NOT NULL default '0', + `topic_haspoll` tinyint(1) unsigned NOT NULL default '0', + `poll_id` mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (`topic_id`), + KEY `forum_id` (`forum_id`), + KEY `topic_last_post_id` (`topic_last_post_id`), + KEY `topic_poster` (`topic_poster`), + KEY `topic_forum` (`topic_id`,`forum_id`), + KEY `topic_sticky` (`topic_sticky`), + KEY `topic_digest` (`topic_digest`), + KEY `digest_time` (`digest_time`) +) TYPE=MyISAM; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `bb_votedata` +-- + +CREATE TABLE `bb_votedata` ( + `ratingid` int(11) unsigned NOT NULL auto_increment, + `topic_id` int(8) unsigned NOT NULL default '0', + `ratinguser` int(10) unsigned NOT NULL default '0', + `rating` tinyint(3) unsigned NOT NULL default '0', + `ratinghostname` varchar(60) NOT NULL default '', + `ratingtimestamp` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`ratingid`), + KEY `ratinguser` (`ratinguser`), + KEY `ratinghostname` (`ratinghostname`), + KEY `topic_id` (`topic_id`) +) TYPE=MyISAM; diff --git a/Scripts/newbb2phpbb/schemas/phpBB3_mysql_41_schema.sql b/Scripts/newbb2phpbb/schemas/phpBB3_mysql_41_schema.sql new file mode 100755 index 0000000..ad25ef5 --- /dev/null +++ b/Scripts/newbb2phpbb/schemas/phpBB3_mysql_41_schema.sql @@ -0,0 +1,1003 @@ +# +# $Id: mysql_41_schema.sql 9129 2008-11-27 13:44:24Z acydburn $ +# + +# Table: 'phpbb_attachments' +CREATE TABLE phpbb_attachments ( + attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, + post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + physical_filename varchar(255) DEFAULT '' NOT NULL, + real_filename varchar(255) DEFAULT '' NOT NULL, + download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + attach_comment text NOT NULL, + extension varchar(100) DEFAULT '' NOT NULL, + mimetype varchar(100) DEFAULT '' NOT NULL, + filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, + filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, + thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (attach_id), + KEY filetime (filetime), + KEY post_msg_id (post_msg_id), + KEY topic_id (topic_id), + KEY poster_id (poster_id), + KEY is_orphan (is_orphan) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_acl_groups' +CREATE TABLE phpbb_acl_groups ( + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + KEY group_id (group_id), + KEY auth_opt_id (auth_option_id), + KEY auth_role_id (auth_role_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_acl_options' +CREATE TABLE phpbb_acl_options ( + auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, + auth_option varchar(50) DEFAULT '' NOT NULL, + is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (auth_option_id), + KEY auth_option (auth_option) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_acl_roles' +CREATE TABLE phpbb_acl_roles ( + role_id mediumint(8) UNSIGNED NOT NULL auto_increment, + role_name varchar(255) DEFAULT '' NOT NULL, + role_description text NOT NULL, + role_type varchar(10) DEFAULT '' NOT NULL, + role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (role_id), + KEY role_type (role_type), + KEY role_order (role_order) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_acl_roles_data' +CREATE TABLE phpbb_acl_roles_data ( + role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + PRIMARY KEY (role_id, auth_option_id), + KEY ath_op_id (auth_option_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_acl_users' +CREATE TABLE phpbb_acl_users ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + KEY user_id (user_id), + KEY auth_option_id (auth_option_id), + KEY auth_role_id (auth_role_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_banlist' +CREATE TABLE phpbb_banlist ( + ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, + ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + ban_ip varchar(40) DEFAULT '' NOT NULL, + ban_email varchar(100) DEFAULT '' NOT NULL, + ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, + ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, + ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + ban_reason varchar(255) DEFAULT '' NOT NULL, + ban_give_reason varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (ban_id), + KEY ban_end (ban_end), + KEY ban_user (ban_userid, ban_exclude), + KEY ban_email (ban_email, ban_exclude), + KEY ban_ip (ban_ip, ban_exclude) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_bbcodes' +CREATE TABLE phpbb_bbcodes ( + bbcode_id tinyint(3) DEFAULT '0' NOT NULL, + bbcode_tag varchar(16) DEFAULT '' NOT NULL, + bbcode_helpline varchar(255) DEFAULT '' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_match text NOT NULL, + bbcode_tpl mediumtext NOT NULL, + first_pass_match mediumtext NOT NULL, + first_pass_replace mediumtext NOT NULL, + second_pass_match mediumtext NOT NULL, + second_pass_replace mediumtext NOT NULL, + PRIMARY KEY (bbcode_id), + KEY display_on_post (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_bookmarks' +CREATE TABLE phpbb_bookmarks ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (topic_id, user_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_bots' +CREATE TABLE phpbb_bots ( + bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, + bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + bot_name varchar(255) DEFAULT '' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + bot_agent varchar(255) DEFAULT '' NOT NULL, + bot_ip varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (bot_id), + KEY bot_active (bot_active) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_config' +CREATE TABLE phpbb_config ( + config_name varchar(255) DEFAULT '' NOT NULL, + config_value varchar(255) DEFAULT '' NOT NULL, + is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (config_name), + KEY is_dynamic (is_dynamic) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_confirm' +CREATE TABLE phpbb_confirm ( + confirm_id char(32) DEFAULT '' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + confirm_type tinyint(3) DEFAULT '0' NOT NULL, + code varchar(8) DEFAULT '' NOT NULL, + seed int(10) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (session_id, confirm_id), + KEY confirm_type (confirm_type) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_disallow' +CREATE TABLE phpbb_disallow ( + disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, + disallow_username varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (disallow_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_drafts' +CREATE TABLE phpbb_drafts ( + draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + draft_subject varchar(255) DEFAULT '' NOT NULL, + draft_message mediumtext NOT NULL, + PRIMARY KEY (draft_id), + KEY save_time (save_time) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_extensions' +CREATE TABLE phpbb_extensions ( + extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + extension varchar(100) DEFAULT '' NOT NULL, + PRIMARY KEY (extension_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_extension_groups' +CREATE TABLE phpbb_extension_groups ( + group_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_name varchar(255) DEFAULT '' NOT NULL, + cat_id tinyint(2) DEFAULT '0' NOT NULL, + allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + upload_icon varchar(255) DEFAULT '' NOT NULL, + max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, + allowed_forums text NOT NULL, + allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (group_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_forums' +CREATE TABLE phpbb_forums ( + forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, + parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_parents mediumtext NOT NULL, + forum_name varchar(255) DEFAULT '' NOT NULL, + forum_desc text NOT NULL, + forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, + forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, + forum_desc_uid varchar(8) DEFAULT '' NOT NULL, + forum_link varchar(255) DEFAULT '' NOT NULL, + forum_password varchar(40) DEFAULT '' NOT NULL, + forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_image varchar(255) DEFAULT '' NOT NULL, + forum_rules text NOT NULL, + forum_rules_link varchar(255) DEFAULT '' NOT NULL, + forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, + forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, + forum_rules_uid varchar(8) DEFAULT '' NOT NULL, + forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, + forum_type tinyint(4) DEFAULT '0' NOT NULL, + forum_status tinyint(4) DEFAULT '0' NOT NULL, + forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_last_post_subject varchar(255) DEFAULT '' NOT NULL, + forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + forum_last_poster_name varchar(255) DEFAULT '' NOT NULL, + forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, + forum_flags tinyint(4) DEFAULT '32' NOT NULL, + display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, + prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (forum_id), + KEY left_right_id (left_id, right_id), + KEY forum_lastpost_id (forum_last_post_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_forums_access' +CREATE TABLE phpbb_forums_access ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + PRIMARY KEY (forum_id, user_id, session_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_forums_track' +CREATE TABLE phpbb_forums_track ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_forums_watch' +CREATE TABLE phpbb_forums_watch ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY forum_id (forum_id), + KEY user_id (user_id), + KEY notify_stat (notify_status) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_groups' +CREATE TABLE phpbb_groups ( + group_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_type tinyint(4) DEFAULT '1' NOT NULL, + group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + group_name varchar(255) DEFAULT '' NOT NULL, + group_desc text NOT NULL, + group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, + group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, + group_desc_uid varchar(8) DEFAULT '' NOT NULL, + group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + group_avatar varchar(255) DEFAULT '' NOT NULL, + group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, + group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_colour varchar(6) DEFAULT '' NOT NULL, + group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (group_id), + KEY group_legend_name (group_legend, group_name) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_icons' +CREATE TABLE phpbb_icons ( + icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, + icons_url varchar(255) DEFAULT '' NOT NULL, + icons_width tinyint(4) DEFAULT '0' NOT NULL, + icons_height tinyint(4) DEFAULT '0' NOT NULL, + icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (icons_id), + KEY display_on_posting (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_lang' +CREATE TABLE phpbb_lang ( + lang_id tinyint(4) NOT NULL auto_increment, + lang_iso varchar(30) DEFAULT '' NOT NULL, + lang_dir varchar(30) DEFAULT '' NOT NULL, + lang_english_name varchar(100) DEFAULT '' NOT NULL, + lang_local_name varchar(255) DEFAULT '' NOT NULL, + lang_author varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (lang_id), + KEY lang_iso (lang_iso) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_log' +CREATE TABLE phpbb_log ( + log_id mediumint(8) UNSIGNED NOT NULL auto_increment, + log_type tinyint(4) DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + log_ip varchar(40) DEFAULT '' NOT NULL, + log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + log_operation text NOT NULL, + log_data mediumtext NOT NULL, + PRIMARY KEY (log_id), + KEY log_type (log_type), + KEY forum_id (forum_id), + KEY topic_id (topic_id), + KEY reportee_id (reportee_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_moderator_cache' +CREATE TABLE phpbb_moderator_cache ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + username varchar(255) DEFAULT '' NOT NULL, + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_name varchar(255) DEFAULT '' NOT NULL, + display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + KEY disp_idx (display_on_index), + KEY forum_id (forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_modules' +CREATE TABLE phpbb_modules ( + module_id mediumint(8) UNSIGNED NOT NULL auto_increment, + module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + module_basename varchar(255) DEFAULT '' NOT NULL, + module_class varchar(10) DEFAULT '' NOT NULL, + parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + module_langname varchar(255) DEFAULT '' NOT NULL, + module_mode varchar(255) DEFAULT '' NOT NULL, + module_auth varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (module_id), + KEY left_right_id (left_id, right_id), + KEY module_enabled (module_enabled), + KEY class_left_id (module_class, left_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_poll_options' +CREATE TABLE phpbb_poll_options ( + poll_option_id tinyint(4) DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_option_text text NOT NULL, + poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + KEY poll_opt_id (poll_option_id), + KEY topic_id (topic_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_poll_votes' +CREATE TABLE phpbb_poll_votes ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_option_id tinyint(4) DEFAULT '0' NOT NULL, + vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + vote_user_ip varchar(40) DEFAULT '' NOT NULL, + KEY topic_id (topic_id), + KEY vote_user_id (vote_user_id), + KEY vote_user_ip (vote_user_ip) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_posts' +CREATE TABLE phpbb_posts ( + post_id mediumint(8) UNSIGNED NOT NULL auto_increment, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poster_ip varchar(40) DEFAULT '' NOT NULL, + post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + post_username varchar(255) DEFAULT '' NOT NULL, + post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, + post_text mediumtext NOT NULL, + post_checksum varchar(32) DEFAULT '' NOT NULL, + post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, + post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + post_edit_reason varchar(255) DEFAULT '' NOT NULL, + post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (post_id), + KEY forum_id (forum_id), + KEY topic_id (topic_id), + KEY poster_ip (poster_ip), + KEY poster_id (poster_id), + KEY post_approved (post_approved), + KEY tid_post_time (topic_id, post_time) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_privmsgs' +CREATE TABLE phpbb_privmsgs ( + msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, + root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_ip varchar(40) DEFAULT '' NOT NULL, + message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + message_subject varchar(255) DEFAULT '' NOT NULL, + message_text mediumtext NOT NULL, + message_edit_reason varchar(255) DEFAULT '' NOT NULL, + message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, + message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + to_address text NOT NULL, + bcc_address text NOT NULL, + PRIMARY KEY (msg_id), + KEY author_ip (author_ip), + KEY message_time (message_time), + KEY author_id (author_id), + KEY root_level (root_level) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_privmsgs_folder' +CREATE TABLE phpbb_privmsgs_folder ( + folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + folder_name varchar(255) DEFAULT '' NOT NULL, + pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (folder_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_privmsgs_rules' +CREATE TABLE phpbb_privmsgs_rules ( + rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_string varchar(255) DEFAULT '' NOT NULL, + rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_folder_id int(11) DEFAULT '0' NOT NULL, + PRIMARY KEY (rule_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_privmsgs_to' +CREATE TABLE phpbb_privmsgs_to ( + msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + folder_id int(11) DEFAULT '0' NOT NULL, + KEY msg_id (msg_id), + KEY author_id (author_id), + KEY usr_flder_id (user_id, folder_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_profile_fields' +CREATE TABLE phpbb_profile_fields ( + field_id mediumint(8) UNSIGNED NOT NULL auto_increment, + field_name varchar(255) DEFAULT '' NOT NULL, + field_type tinyint(4) DEFAULT '0' NOT NULL, + field_ident varchar(20) DEFAULT '' NOT NULL, + field_length varchar(20) DEFAULT '' NOT NULL, + field_minlen varchar(255) DEFAULT '' NOT NULL, + field_maxlen varchar(255) DEFAULT '' NOT NULL, + field_novalue varchar(255) DEFAULT '' NOT NULL, + field_default_value varchar(255) DEFAULT '' NOT NULL, + field_validation varchar(20) DEFAULT '' NOT NULL, + field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (field_id), + KEY fld_type (field_type), + KEY fld_ordr (field_order) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_profile_fields_data' +CREATE TABLE phpbb_profile_fields_data ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_profile_fields_lang' +CREATE TABLE phpbb_profile_fields_lang ( + field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_type tinyint(4) DEFAULT '0' NOT NULL, + lang_value varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (field_id, lang_id, option_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_profile_lang' +CREATE TABLE phpbb_profile_lang ( + field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_name varchar(255) DEFAULT '' NOT NULL, + lang_explain text NOT NULL, + lang_default_value varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (field_id, lang_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_ranks' +CREATE TABLE phpbb_ranks ( + rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, + rank_title varchar(255) DEFAULT '' NOT NULL, + rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + rank_image varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (rank_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_reports' +CREATE TABLE phpbb_reports ( + report_id mediumint(8) UNSIGNED NOT NULL auto_increment, + reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + report_text mediumtext NOT NULL, + PRIMARY KEY (report_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_reports_reasons' +CREATE TABLE phpbb_reports_reasons ( + reason_id smallint(4) UNSIGNED NOT NULL auto_increment, + reason_title varchar(255) DEFAULT '' NOT NULL, + reason_description mediumtext NOT NULL, + reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (reason_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_search_results' +CREATE TABLE phpbb_search_results ( + search_key varchar(32) DEFAULT '' NOT NULL, + search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + search_keywords mediumtext NOT NULL, + search_authors mediumtext NOT NULL, + PRIMARY KEY (search_key) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_search_wordlist' +CREATE TABLE phpbb_search_wordlist ( + word_id mediumint(8) UNSIGNED NOT NULL auto_increment, + word_text varchar(255) DEFAULT '' NOT NULL, + word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (word_id), + UNIQUE wrd_txt (word_text), + KEY wrd_cnt (word_count) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_search_wordmatch' +CREATE TABLE phpbb_search_wordmatch ( + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + UNIQUE unq_mtch (word_id, post_id, title_match), + KEY word_id (word_id), + KEY post_id (post_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_sessions' +CREATE TABLE phpbb_sessions ( + session_id char(32) DEFAULT '' NOT NULL, + session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, + session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, + session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + session_ip varchar(40) DEFAULT '' NOT NULL, + session_browser varchar(150) DEFAULT '' NOT NULL, + session_forwarded_for varchar(255) DEFAULT '' NOT NULL, + session_page varchar(255) DEFAULT '' NOT NULL, + session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (session_id), + KEY session_time (session_time), + KEY session_user_id (session_user_id), + KEY session_fid (session_forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_sessions_keys' +CREATE TABLE phpbb_sessions_keys ( + key_id char(32) DEFAULT '' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + last_ip varchar(40) DEFAULT '' NOT NULL, + last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (key_id, user_id), + KEY last_login (last_login) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_sitelist' +CREATE TABLE phpbb_sitelist ( + site_id mediumint(8) UNSIGNED NOT NULL auto_increment, + site_ip varchar(40) DEFAULT '' NOT NULL, + site_hostname varchar(255) DEFAULT '' NOT NULL, + ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (site_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_smilies' +CREATE TABLE phpbb_smilies ( + smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, + code varchar(50) DEFAULT '' NOT NULL, + emotion varchar(50) DEFAULT '' NOT NULL, + smiley_url varchar(50) DEFAULT '' NOT NULL, + smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (smiley_id), + KEY display_on_post (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles' +CREATE TABLE phpbb_styles ( + style_id mediumint(8) UNSIGNED NOT NULL auto_increment, + style_name varchar(255) DEFAULT '' NOT NULL, + style_copyright varchar(255) DEFAULT '' NOT NULL, + style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (style_id), + UNIQUE style_name (style_name), + KEY template_id (template_id), + KEY theme_id (theme_id), + KEY imageset_id (imageset_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles_template' +CREATE TABLE phpbb_styles_template ( + template_id mediumint(8) UNSIGNED NOT NULL auto_increment, + template_name varchar(255) DEFAULT '' NOT NULL, + template_copyright varchar(255) DEFAULT '' NOT NULL, + template_path varchar(100) DEFAULT '' NOT NULL, + bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, + template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, + template_inherit_path varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (template_id), + UNIQUE tmplte_nm (template_name) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles_template_data' +CREATE TABLE phpbb_styles_template_data ( + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + template_filename varchar(100) DEFAULT '' NOT NULL, + template_included text NOT NULL, + template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + template_data mediumtext NOT NULL, + KEY tid (template_id), + KEY tfn (template_filename) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles_theme' +CREATE TABLE phpbb_styles_theme ( + theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, + theme_name varchar(255) DEFAULT '' NOT NULL, + theme_copyright varchar(255) DEFAULT '' NOT NULL, + theme_path varchar(100) DEFAULT '' NOT NULL, + theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + theme_data mediumtext NOT NULL, + PRIMARY KEY (theme_id), + UNIQUE theme_name (theme_name) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles_imageset' +CREATE TABLE phpbb_styles_imageset ( + imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment, + imageset_name varchar(255) DEFAULT '' NOT NULL, + imageset_copyright varchar(255) DEFAULT '' NOT NULL, + imageset_path varchar(100) DEFAULT '' NOT NULL, + PRIMARY KEY (imageset_id), + UNIQUE imgset_nm (imageset_name) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_styles_imageset_data' +CREATE TABLE phpbb_styles_imageset_data ( + image_id mediumint(8) UNSIGNED NOT NULL auto_increment, + image_name varchar(200) DEFAULT '' NOT NULL, + image_filename varchar(200) DEFAULT '' NOT NULL, + image_lang varchar(30) DEFAULT '' NOT NULL, + image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (image_id), + KEY i_d (imageset_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_topics' +CREATE TABLE phpbb_topics ( + topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, + topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_status tinyint(3) DEFAULT '0' NOT NULL, + topic_type tinyint(3) DEFAULT '0' NOT NULL, + topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, + topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, + topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, + topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, + topic_last_post_subject varchar(255) DEFAULT '' NOT NULL, + topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_title varchar(255) DEFAULT '' NOT NULL, + poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, + poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, + poll_max_options tinyint(4) DEFAULT '1' NOT NULL, + poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL, + poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (topic_id), + KEY forum_id (forum_id), + KEY forum_id_type (forum_id, topic_type), + KEY last_post_time (topic_last_post_time), + KEY topic_approved (topic_approved), + KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), + KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_topics_track' +CREATE TABLE phpbb_topics_track ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, topic_id), + KEY forum_id (forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_topics_posted' +CREATE TABLE phpbb_topics_posted ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, topic_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_topics_watch' +CREATE TABLE phpbb_topics_watch ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY topic_id (topic_id), + KEY user_id (user_id), + KEY notify_stat (notify_status) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_user_group' +CREATE TABLE phpbb_user_group ( + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + KEY group_id (group_id), + KEY user_id (user_id), + KEY group_leader (group_leader) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_users' +CREATE TABLE phpbb_users ( + user_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_type tinyint(2) DEFAULT '0' NOT NULL, + group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, + user_permissions mediumtext NOT NULL, + user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_ip varchar(40) DEFAULT '' NOT NULL, + user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, + username varchar(255) DEFAULT '' NOT NULL, + username_clean varchar(255) DEFAULT '' NOT NULL, + user_password varchar(40) DEFAULT '' NOT NULL, + user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_email varchar(100) DEFAULT '' NOT NULL, + user_email_hash bigint(20) DEFAULT '0' NOT NULL, + user_birthday varchar(10) DEFAULT '' NOT NULL, + user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastpage varchar(200) DEFAULT '' NOT NULL, + user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, + user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_warnings tinyint(4) DEFAULT '0' NOT NULL, + user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, + user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, + user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_lang varchar(30) DEFAULT '' NOT NULL, + user_timezone decimal(5,2) DEFAULT '0' NOT NULL, + user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, + user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_colour varchar(6) DEFAULT '' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, + user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_full_folder int(11) DEFAULT '-3' NOT NULL, + user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, + user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, + user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, + user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, + user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_notify_type tinyint(4) DEFAULT '0' NOT NULL, + user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_options int(11) UNSIGNED DEFAULT '895' NOT NULL, + user_avatar varchar(255) DEFAULT '' NOT NULL, + user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, + user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_sig mediumtext NOT NULL, + user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, + user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, + user_from varchar(100) DEFAULT '' NOT NULL, + user_icq varchar(15) DEFAULT '' NOT NULL, + user_aim varchar(255) DEFAULT '' NOT NULL, + user_yim varchar(255) DEFAULT '' NOT NULL, + user_msnm varchar(255) DEFAULT '' NOT NULL, + user_jabber varchar(255) DEFAULT '' NOT NULL, + user_website varchar(200) DEFAULT '' NOT NULL, + user_occ text NOT NULL, + user_interests text NOT NULL, + user_actkey varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(40) DEFAULT '' NOT NULL, + user_form_salt varchar(32) DEFAULT '' NOT NULL, + PRIMARY KEY (user_id), + KEY user_birthday (user_birthday), + KEY user_email_hash (user_email_hash), + KEY user_type (user_type), + UNIQUE username_clean (username_clean) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_warnings' +CREATE TABLE phpbb_warnings ( + warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (warning_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_words' +CREATE TABLE phpbb_words ( + word_id mediumint(8) UNSIGNED NOT NULL auto_increment, + word varchar(255) DEFAULT '' NOT NULL, + replacement varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (word_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_zebra' +CREATE TABLE phpbb_zebra ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, zebra_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + diff --git a/Scripts/newbb2phpbb/schemas/xoops_mysql_schema.sql b/Scripts/newbb2phpbb/schemas/xoops_mysql_schema.sql new file mode 100755 index 0000000..ae6b895 --- /dev/null +++ b/Scripts/newbb2phpbb/schemas/xoops_mysql_schema.sql @@ -0,0 +1,570 @@ +# +# Table structure for table `avatar` +# + +CREATE TABLE avatar ( + avatar_id mediumint(8) unsigned NOT NULL auto_increment, + avatar_file varchar(30) NOT NULL default '', + avatar_name varchar(100) NOT NULL default '', + avatar_mimetype varchar(30) NOT NULL default '', + avatar_created int(10) NOT NULL default '0', + avatar_display tinyint(1) unsigned NOT NULL default '0', + avatar_weight smallint(5) unsigned NOT NULL default '0', + avatar_type char(1) NOT NULL default '', + PRIMARY KEY (avatar_id), + KEY avatar_type (avatar_type, avatar_display) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `avatar_user_link` +# + +CREATE TABLE avatar_user_link ( + avatar_id mediumint(8) unsigned NOT NULL default '0', + user_id mediumint(8) unsigned NOT NULL default '0', + KEY avatar_user_id (avatar_id,user_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `banner` +# + +CREATE TABLE banner ( + bid smallint(5) unsigned NOT NULL auto_increment, + cid tinyint(3) unsigned NOT NULL default '0', + imptotal mediumint(8) unsigned NOT NULL default '0', + impmade mediumint(8) unsigned NOT NULL default '0', + clicks mediumint(8) unsigned NOT NULL default '0', + imageurl varchar(255) NOT NULL default '', + clickurl varchar(255) NOT NULL default '', + date int(10) NOT NULL default '0', + htmlbanner tinyint(1) NOT NULL default '0', + htmlcode text, + PRIMARY KEY (bid), + KEY idxbannercid (cid), + KEY idxbannerbidcid (bid,cid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `bannerclient` +# + +CREATE TABLE bannerclient ( + cid smallint(5) unsigned NOT NULL auto_increment, + name varchar(60) NOT NULL default '', + contact varchar(60) NOT NULL default '', + email varchar(60) NOT NULL default '', + login varchar(10) NOT NULL default '', + passwd varchar(10) NOT NULL default '', + extrainfo text, + PRIMARY KEY (cid), + KEY login (login) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `bannerfinish` +# + +CREATE TABLE bannerfinish ( + bid smallint(5) unsigned NOT NULL auto_increment, + cid smallint(5) unsigned NOT NULL default '0', + impressions mediumint(8) unsigned NOT NULL default '0', + clicks mediumint(8) unsigned NOT NULL default '0', + datestart int(10) unsigned NOT NULL default '0', + dateend int(10) unsigned NOT NULL default '0', + PRIMARY KEY (bid), + KEY cid (cid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `block_module_link` +# + +CREATE TABLE block_module_link ( + block_id mediumint(8) unsigned NOT NULL default '0', + module_id smallint(5) NOT NULL default '0', + PRIMARY KEY (`module_id`, `block_id`) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `comments` +# + +CREATE TABLE xoopscomments ( + com_id mediumint(8) unsigned NOT NULL auto_increment, + com_pid mediumint(8) unsigned NOT NULL default '0', + com_rootid mediumint(8) unsigned NOT NULL default '0', + com_modid smallint(5) unsigned NOT NULL default '0', + com_itemid mediumint(8) unsigned NOT NULL default '0', + com_icon varchar(25) NOT NULL default '', + com_created int(10) unsigned NOT NULL default '0', + com_modified int(10) unsigned NOT NULL default '0', + com_uid mediumint(8) unsigned NOT NULL default '0', + com_ip varchar(15) NOT NULL default '', + com_title varchar(255) NOT NULL default '', + com_text text, + com_sig tinyint(1) unsigned NOT NULL default '0', + com_status tinyint(1) unsigned NOT NULL default '0', + com_exparams varchar(255) NOT NULL default '', + dohtml tinyint(1) unsigned NOT NULL default '0', + dosmiley tinyint(1) unsigned NOT NULL default '0', + doxcode tinyint(1) unsigned NOT NULL default '0', + doimage tinyint(1) unsigned NOT NULL default '0', + dobr tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (com_id), + KEY com_pid (com_pid), + KEY com_itemid (com_itemid), + KEY com_uid (com_uid), + KEY com_title (com_title(40)) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# RMV-NOTIFY +# Table structure for table `notifications` +# + +CREATE TABLE xoopsnotifications ( + not_id mediumint(8) unsigned NOT NULL auto_increment, + not_modid smallint(5) unsigned NOT NULL default '0', + not_itemid mediumint(8) unsigned NOT NULL default '0', + not_category varchar(30) NOT NULL default '', + not_event varchar(30) NOT NULL default '', + not_uid mediumint(8) unsigned NOT NULL default '0', + not_mode tinyint(1) NOT NULL default 0, + PRIMARY KEY (not_id), + KEY not_modid (not_modid), + KEY not_itemid (not_itemid), + KEY not_class (not_category), + KEY not_uid (not_uid), + KEY not_event (not_event) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `config` +# + +CREATE TABLE config ( + conf_id smallint(5) unsigned NOT NULL auto_increment, + conf_modid smallint(5) unsigned NOT NULL default '0', + conf_catid smallint(5) unsigned NOT NULL default '0', + conf_name varchar(25) NOT NULL default '', + conf_title varchar(255) NOT NULL default '', + conf_value text, + conf_desc varchar(255) NOT NULL default '', + conf_formtype varchar(15) NOT NULL default '', + conf_valuetype varchar(10) NOT NULL default '', + conf_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (conf_id), + KEY conf_mod_cat_id (conf_modid, conf_catid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configcategory` +# + +CREATE TABLE configcategory ( + confcat_id smallint(5) unsigned NOT NULL auto_increment, + confcat_name varchar(255) NOT NULL default '', + confcat_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confcat_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configoption` +# + +CREATE TABLE configoption ( + confop_id mediumint(8) unsigned NOT NULL auto_increment, + confop_name varchar(255) NOT NULL default '', + confop_value varchar(255) NOT NULL default '', + conf_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confop_id), + KEY conf_id (conf_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `groups` +# + +CREATE TABLE groups ( + groupid smallint(5) unsigned NOT NULL auto_increment, + name varchar(50) NOT NULL default '', + description text, + group_type varchar(10) NOT NULL default '', + PRIMARY KEY (groupid), + KEY group_type (group_type) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `group_permission` +# + +CREATE TABLE group_permission ( + gperm_id int(10) unsigned NOT NULL auto_increment, + gperm_groupid smallint(5) unsigned NOT NULL default '0', + gperm_itemid mediumint(8) unsigned NOT NULL default '0', + gperm_modid mediumint(5) unsigned NOT NULL default '0', + gperm_name varchar(50) NOT NULL default '', + PRIMARY KEY (gperm_id), + KEY groupid (gperm_groupid), + KEY itemid (gperm_itemid), + KEY gperm_modid (gperm_modid,gperm_name(10)) +) TYPE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `groups_users_link` +# + +CREATE TABLE groups_users_link ( + linkid mediumint(8) unsigned NOT NULL auto_increment, + groupid smallint(5) unsigned NOT NULL default '0', + uid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (linkid), + KEY groupid_uid (groupid,uid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `image` +# + +CREATE TABLE image ( + image_id mediumint(8) unsigned NOT NULL auto_increment, + image_name varchar(30) NOT NULL default '', + image_nicename varchar(255) NOT NULL default '', + image_mimetype varchar(30) NOT NULL default '', + image_created int(10) unsigned NOT NULL default '0', + image_display tinyint(1) unsigned NOT NULL default '0', + image_weight smallint(5) unsigned NOT NULL default '0', + imgcat_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (image_id), + KEY imgcat_id (imgcat_id), + KEY image_display (image_display) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagebody` +# + +CREATE TABLE imagebody ( + image_id mediumint(8) unsigned NOT NULL default '0', + image_body mediumblob, + KEY image_id (image_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagecategory` +# + +CREATE TABLE imagecategory ( + imgcat_id smallint(5) unsigned NOT NULL auto_increment, + imgcat_name varchar(100) NOT NULL default '', + imgcat_maxsize int(8) unsigned NOT NULL default '0', + imgcat_maxwidth smallint(3) unsigned NOT NULL default '0', + imgcat_maxheight smallint(3) unsigned NOT NULL default '0', + imgcat_display tinyint(1) unsigned NOT NULL default '0', + imgcat_weight smallint(3) unsigned NOT NULL default '0', + imgcat_type char(1) NOT NULL default '', + imgcat_storetype varchar(5) NOT NULL default '', + PRIMARY KEY (imgcat_id), + KEY imgcat_display (imgcat_display) +) TYPE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `imgset` +# + +CREATE TABLE imgset ( + imgset_id smallint(5) unsigned NOT NULL auto_increment, + imgset_name varchar(50) NOT NULL default '', + imgset_refid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (imgset_id), + KEY imgset_refid (imgset_refid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgset_tplset_link` +# + +CREATE TABLE imgset_tplset_link ( + imgset_id smallint(5) unsigned NOT NULL default '0', + tplset_name varchar(50) NOT NULL default '', + KEY tplset_name (tplset_name(10)) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgsetimg` +# + +CREATE TABLE imgsetimg ( + imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment, + imgsetimg_file varchar(50) NOT NULL default '', + imgsetimg_body blob, + imgsetimg_imgset smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (imgsetimg_id), + KEY imgsetimg_imgset (imgsetimg_imgset) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `modules` +# + +CREATE TABLE modules ( + mid smallint(5) unsigned NOT NULL auto_increment, + name varchar(150) NOT NULL default '', + version smallint(5) unsigned NOT NULL default '100', + last_update int(10) unsigned NOT NULL default '0', + weight smallint(3) unsigned NOT NULL default '0', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(25) NOT NULL default '', + hasmain tinyint(1) unsigned NOT NULL default '0', + hasadmin tinyint(1) unsigned NOT NULL default '0', + hassearch tinyint(1) unsigned NOT NULL default '0', + hasconfig tinyint(1) unsigned NOT NULL default '0', + hascomments tinyint(1) unsigned NOT NULL default '0', + hasnotification tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (mid), + KEY hasmain (hasmain), + KEY hasadmin (hasadmin), + KEY hassearch (hassearch), + KEY hasnotification (hasnotification), + KEY dirname (dirname), + KEY name (name(15)) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `newblocks` +# + +CREATE TABLE newblocks ( + bid mediumint(8) unsigned NOT NULL auto_increment, + mid smallint(5) unsigned NOT NULL default '0', + func_num tinyint(3) unsigned NOT NULL default '0', + options varchar(255) NOT NULL default '', + name varchar(150) NOT NULL default '', + title varchar(255) NOT NULL default '', + content text, + side tinyint(1) unsigned NOT NULL default '0', + weight smallint(5) unsigned NOT NULL default '0', + visible tinyint(1) unsigned NOT NULL default '0', + block_type char(1) NOT NULL default '', + c_type char(1) NOT NULL default '', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(50) NOT NULL default '', + func_file varchar(50) NOT NULL default '', + show_func varchar(50) NOT NULL default '', + edit_func varchar(50) NOT NULL default '', + template varchar(50) NOT NULL default '', + bcachetime int(10) unsigned NOT NULL default '0', + last_modified int(10) unsigned NOT NULL default '0', + PRIMARY KEY (bid), + KEY mid (mid), + KEY visible (visible), + KEY isactive_visible_mid (isactive,visible,mid), + KEY mid_funcnum (mid,func_num) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `online` +# + +CREATE TABLE online ( + online_uid mediumint(8) unsigned NOT NULL default '0', + online_uname varchar(25) NOT NULL default '', + online_updated int(10) unsigned NOT NULL default '0', + online_module smallint(5) unsigned NOT NULL default '0', + online_ip varchar(15) NOT NULL default '', + KEY online_module (online_module) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `priv_msgs` +# + +CREATE TABLE priv_msgs ( + msg_id mediumint(8) unsigned NOT NULL auto_increment, + msg_image varchar(100) default NULL, + subject varchar(255) NOT NULL default '', + from_userid mediumint(8) unsigned NOT NULL default '0', + to_userid mediumint(8) unsigned NOT NULL default '0', + msg_time int(10) unsigned NOT NULL default '0', + msg_text text, + read_msg tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (msg_id), + KEY to_userid (to_userid), + KEY touseridreadmsg (to_userid,read_msg), + KEY msgidfromuserid (msg_id,from_userid) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `ranks` +# + +CREATE TABLE ranks ( + rank_id smallint(5) unsigned NOT NULL auto_increment, + rank_title varchar(50) NOT NULL default '', + rank_min mediumint(8) unsigned NOT NULL default '0', + rank_max mediumint(8) unsigned NOT NULL default '0', + rank_special tinyint(1) unsigned NOT NULL default '0', + rank_image varchar(255) default NULL, + PRIMARY KEY (rank_id), + KEY rank_min (rank_min), + KEY rank_max (rank_max), + KEY rankminrankmaxranspecial (rank_min,rank_max,rank_special), + KEY rankspecial (rank_special) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `session` +# + +CREATE TABLE session ( + sess_id varchar(32) NOT NULL default '', + sess_updated int(10) unsigned NOT NULL default '0', + sess_ip varchar(15) NOT NULL default '', + sess_data text, + PRIMARY KEY (sess_id), + KEY updated (sess_updated) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `smiles` +# + +CREATE TABLE smiles ( + id smallint(5) unsigned NOT NULL auto_increment, + code varchar(50) NOT NULL default '', + smile_url varchar(100) NOT NULL default '', + emotion varchar(75) NOT NULL default '', + display tinyint(1) NOT NULL default '0', + PRIMARY KEY (id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `tplset` +# + +CREATE TABLE tplset ( + tplset_id int(7) unsigned NOT NULL auto_increment, + tplset_name varchar(50) NOT NULL default '', + tplset_desc varchar(255) NOT NULL default '', + tplset_credits text, + tplset_created int(10) unsigned NOT NULL default '0', + PRIMARY KEY (tplset_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `tplfile` +# + +CREATE TABLE tplfile ( + tpl_id mediumint(7) unsigned NOT NULL auto_increment, + tpl_refid smallint(5) unsigned NOT NULL default '0', + tpl_module varchar(25) NOT NULL default '', + tpl_tplset varchar(50) NOT NULL default '', + tpl_file varchar(50) NOT NULL default '', + tpl_desc varchar(255) NOT NULL default '', + tpl_lastmodified int(10) unsigned NOT NULL default '0', + tpl_lastimported int(10) unsigned NOT NULL default '0', + tpl_type varchar(20) NOT NULL default '', + PRIMARY KEY (tpl_id), + KEY tpl_refid (tpl_refid,tpl_type), + KEY tpl_tplset (tpl_tplset,tpl_file(10)) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `tplsource` +# + +CREATE TABLE tplsource ( + tpl_id mediumint(7) unsigned NOT NULL default '0', + tpl_source mediumtext, + KEY tpl_id (tpl_id) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# Table structure for table `users` +# + +CREATE TABLE users ( + uid mediumint(8) unsigned NOT NULL auto_increment, + name varchar(60) NOT NULL default '', + uname varchar(25) NOT NULL default '', + email varchar(60) NOT NULL default '', + url varchar(100) NOT NULL default '', + user_avatar varchar(30) NOT NULL default 'blank.gif', + user_regdate int(10) unsigned NOT NULL default '0', + user_icq varchar(15) NOT NULL default '', + user_from varchar(100) NOT NULL default '', + user_sig tinytext, + user_viewemail tinyint(1) unsigned NOT NULL default '0', + actkey varchar(8) NOT NULL default '', + user_aim varchar(18) NOT NULL default '', + user_yim varchar(25) NOT NULL default '', + user_msnm varchar(100) NOT NULL default '', + pass varchar(32) NOT NULL default '', + posts mediumint(8) unsigned NOT NULL default '0', + attachsig tinyint(1) unsigned NOT NULL default '0', + rank smallint(5) unsigned NOT NULL default '0', + level tinyint(3) unsigned NOT NULL default '1', + theme varchar(100) NOT NULL default '', + timezone_offset float(3,1) NOT NULL default '0.0', + last_login int(10) unsigned NOT NULL default '0', + umode varchar(10) NOT NULL default '', + uorder tinyint(1) unsigned NOT NULL default '0', + notify_method tinyint(1) NOT NULL default '1', + notify_mode tinyint(1) NOT NULL default '0', + user_occ varchar(100) NOT NULL default '', + bio tinytext, + user_intrest varchar(150) NOT NULL default '', + user_mailok tinyint(1) unsigned NOT NULL default '1', + PRIMARY KEY (uid), + KEY uname (uname), + KEY email (email), + KEY uiduname (uid,uname), + KEY unamepass (uname,pass) +) TYPE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `cache_model` +# + +CREATE TABLE cache_model ( + `cache_key` varchar(64) NOT NULL default '', + `cache_expires` int(10) unsigned NOT NULL default '0', + `cache_data` text, + + PRIMARY KEY (`cache_key`), + KEY `cache_expires` (`cache_expires`) +) TYPE=MyISAM; +# -------------------------------------------------------- diff --git a/Scripts/newbb2phpbb/style.css b/Scripts/newbb2phpbb/style.css new file mode 100755 index 0000000..6c13dba --- /dev/null +++ b/Scripts/newbb2phpbb/style.css @@ -0,0 +1,323 @@ +/* + * Convert Xoops + CBB (newbb) to phpBB + * Style Sheet. + * + */ + +html { + background-image:url(img/html-bg.png); + background-color: #FFF; + font-family: "DejaVu Sans", "Liberation Sans", sans-serif; + font-size: 0.85em; + line-height: 1.25em; + /* margin: 0; /* <- full screen */ + /* margin: 0 1% 0 1%; /* <- with 1% of left and right margin */ + /* margin: 0 2% 0 2%; /* <- with 2% of left and right margin */ + margin: 0 4% 0 4%; /* <- with 4% of left and right margin */ + /* margin: 0 10% 0 10%; /* <- with 10% of left and right margin */ + } + +body { + background: #FFF; + border-width: 10px; + border-style: solid; + border-color: #FFF; + padding:0; + margin:0; + } + +/* Links */ + +a:link { text-decoration: none; color: #204C8D; } +a:hover { text-decoration: underline; color: green; } +a:active { text-decoration: underline; color: green; } +a:visited { text-decoration: none; color: #204C8D; } +a:visited:hover { text-decoration: underline; color: green; } +a.nonexistent, a.badinterwiki { color: gray; } + +/* Header */ + +#header { + margin:0; + padding-top: 1em; + background-color: #204C8D; + background-image: url("img/header-bg.png"); + line-height: 1.0em; + border:none; + } + +#header h1 { + color: #fff; + margin: 0; + line-height: 1.7em; + text-align: center; + margin-bottom: 0; +} + +#header p.description { + color: #fff; + text-align: center; + margin: 0; + font-size: 0.9em; + +} + +/* Sublinks */ + +.sublinks { + clear: both; + display: block; + margin: 0; + white-space: nowrap; + background: #EDF4FF; + font-size: 0.9em; + padding: 0.5em; + padding-left: 20px; + border-top: 1px solid #ddd; + border-bottom: 2px dotted #628ECA; + } + +.sublinks li { + display: inline; + padding: 0; + margin-right: 5px; + } + +.sublinks li.current { + font-weight: bold; +} + +.sublinks li:after { + margin-left: 5px; + content: " ยป "; + } + +.sublinks li:last-child:after { + content: ""; + } + + +/* Page */ + +#page { + padding-top: 1em; + padding-right: 20px; + padding-bottom: 0; + padding-left: 20px; + background: #FFF; +} + +dd span.description { + margin-left: 0.5em; +} + +.navibar { + /* Problem: clear: right; aligns nicely right of + * logo, but lets it float high in the header, + * disconnected from ground */ + clear: both; + display: block; + height: 20px; + padding: 0; + padding-left: 20px; + margin: 0; + font-size: 0.9em; + + /* For avoiding a gap between navibar and pageline + * on IE */ + zoom: 1; + } + +.navibar li { + display: inline; + white-space: nowrap; + padding-top: 5px; + padding-bottom: 5px; + border-width: 1px; + border-style: solid; + border-color: #628ECA; + background-color: #FFF; + background-image: url("img/navibartop-bg.png"); + background-position: left top; + background-repeat: repeat-x; + } + +.navibar li a { + /* To cover the box area as linkable */ + padding: 8px; + padding-top: 4px; + padding-bottom: 5px; + } + +.navibar a, .navibar a:visited { + color: #204C8D; + text-decoration: none; + } + +.navibar li.current a { + color: #FFFFFF; + text-decoration: none; + font-weight: bold; + } + +.navibar li:hover { + background-color: #628ECA; + background-image: url("img/navibartop-hover-bg.png"); + background-position: left top; + background-repeat: repeat-x; + } + +.navibar li:hover a { + color: #FFFFFF; + text-decoration: none; + } + +.navibar li.current, +.navibar li.current:hover, +.navibar li.current:hover a, +.navibar li.current:active a { + color: #FFFFFF; + background-color: #628ECA; + background-image: url("img/navibartop-hover-bg.png"); + background-position: left top; + background-repeat: repeat-x; + } + +/* Alignment */ + +.right { text-align: right; } +.left { text-align: left; } +.center { text-align: center; } + +.floatr { float:right; } +.floatl { float:left; } + +/* Lists */ + +dl { + clear: both; + } + +dt { + float: left;; + width: 200px; + padding-top: 3px; + padding-right: 1em; + text-align: right; + } + +/* Form */ + +textarea { + padding: 3px; + padding-left: 0.5em; +} + +/* Tables */ + +td { + font-size: 0.85em; + padding: 0.5em; + font-family: monospace; +} + +th { + padding: 0.5em; + font-size: 0.85em; + font-family: monospace; + background: #f8f8f8; +} + +#footer{ + background: #fafafa; + padding: 3px; + margin-top: 1em; +} + +/* Messages */ + +.lm { + background-color: #ECECEC; + background-image: url("img/moin-msg-bg-gray.png"); + width: -10px; + border-width: 1px; + border-style: solid; + border-color: #CFCFCF; + border-left-width: 4px; + padding: 1em !important; + } + +.lm.red { + border-color: #E0B7B7; + background-color: #FFECEC; + background-image: url("img/moin-msg-bg-red.png"); + } +.lm.green { + border-color: #D6F6D2; + background-color: #EEFFEC; + background-image: url("img/moin-msg-bg-green.png"); + } + +.lm.violet { + border-color: #F6D2F6; + background-color: #FFECFF; + background-image: url("img/moin-msg-bg-violet.png"); + } + +.lm.blue { + border-color: #D2E0F6; + background-color: #ECF4FF; + background-image: url("img/moin-msg-bg-blue.png"); + } + +.lm.orange { + border-color: #F6E7D2; + background-color: #FFF8EC; + background-image: url("img/moin-msg-bg-orange.png"); + } + +.message { + margin-left: 20%; + margin-right: 20%; + margin-bottom: 0.5em; + padding-top: 1em; + padding-bottom: 1em; + padding-left: 1.5em; + border-width: 0; + border-top-width: 4px; + border-top-style: solid; + border-bottom-width: 4px; + border-bottom-style: solid; + text-align: center; + font-weight: bold; + } + +/* Misc */ + +.pageline { + clear: both; + margin: 0; + padding: 0; + width: 100%; + /* sync these values, line-height is needed for IE */ + height: 5px; + line-height: 5px; + background: #628ECA; + } + +.action { + background: #f8f8f8; + padding: 1em; + margin-bottom: 0; + +} + +.action span { + margin-top: 5px; +} + +.action img { + vertical-align: top; + margin-right: 0.5em; + border: none; +}