1. Upload a fresh copy of PHPBB2 to the new directory, I used version 2.0.5.
2. Use PHPMyAdmin to drop the following tables in the fresh copy: {prefix}_auth-access, {prefix}_categories, {prefix}_forums, {prefix}_posts, {prefix}_posts_text, {prefix}_topics.
3. Then use PHPMyAdmin to export the above tables from the PHPNuke copy (nuke_bb*) then change the nuke_bb values to phpbb_ or whatever your prefix is and import them into the fresh copy. Be sure to choose data AND structure when exporting the original tables.
4. Now drop the table {prefix}_users from the fresh install. Then export data AND structure of the nuke_users table. Again change all the nuke_ values to phpbb_ and import it. Now you'll have to convert the regdate to unixtime, and luckily someone made a small script for it to speed things up, courtesy of
msimonds:
Code: Select all
Select all
<?
/*******************************************************************/
/* Place this file in the same folder as config.php */
/*******************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$sql = "SELECT user_id, user_regdate FROM phpbb_users";
$result = $db->sql_query($sql);
while($record = $db->sql_fetchrow($result)) {
extract($record);
$user_regdate = str_replace(',',' ',$user_regdate);
$date = explode(' ',$user_regdate,3);
switch($date[0]) {
case('Jan'): $m=1; break;
case('Feb'): $m=2; break;
case('Mar'): $m=3; break;
case('Apr'): $m=4; break;
case('May'): $m=5; break;
case('Jun'): $m=6; break;
case('Jul'): $m=7; break;
case('Aug'): $m=8; break;
case('Sep'): $m=9; break;
case('Oct'): $m=10; break;
case('Nov'): $m=11; break;
case('Dec'): $m=12; break;
}
$newDate = mktime(0, 0, 0, $m, $date[1], $date[2]);
echo $user_id.' -- '.$user_regdate.' = '.$newDate.' = '.date('m d Y',$newDate).'<br />';
/*******************************************************************/
/* When you are satisfied that the code is working correctly, */
/* uncomment the following 2 lines and resubmit the script. */
/*******************************************************************/
//$sql = "UPDATE phpbb_users set user_regdate = $newDate where user_id = $user_id";
//$result1 = $db->sql_query($sql);
}
?>
Put this in a file (ie. convert.php)and place it in the root of your fresh phpBB install, then run it from your browser.
5. When that is done, alter the user table by deleting all fields that NOT start with user_ (except username). There are two columns missing, so issue the following commands on the fresh install to create them, otherwise you won't be able to logon to the new forum:
Code: Select all
- ALTER TABLE phpbb_users ADD COLUMN user_login_tries smallint(5) UNSIGNED DEFAULT '0' NOT NULL
- ALTER TABLE phpbb_users ADD COLUMN user_last_login_try int(11) DEFAULT '0' NOT NULL
6. Then export DATA only of the following nuke fields: nuke_bbgroups and nuke_bbuser_groups. Again change the nuke_bb values to phpbb_ and then import them.
* This didn't work for me because there were duplicate keys, so I emptied the two tables before exporting the data again.
7. Now set the user_level of your admin in your phpbb_users table to 1.
8. Set some of your configuration options, and your done. PHPNuke can be deleted safely, but first make sure the forum works fine!