Convert phpBB 1.2.4RC1 Mambo Component to SMF

Started by netpat, January 19, 2005, 04:39:26 AM

Previous topic - Next topic

netpat

So far I had difficulties to convert my phpBB 1.2.4RC Mambo Component to SMF with the converter. First it showed me an error about EXTENSIONS.INC [nofollow] and after I replaced this with the file from the original phpBB it continued but stopped with a database-login-errors. Is there somebody who can confirm me, that it should be possible to use the converter with the modified phpBB (Mambo Component)? The Mambo phpBB is creating a slightly different database than the original phpBB.

Thanks for an hint.
www.oii.ch [nofollow] - a swiss bulletin board

Norphy

I've had to do the exact same thing just recently. In the end, I just set up a new installation of phpBB with a new database and dumped the phpbb_* tables from the Mambo database into the new phpBB database. The only fairly tricky bit was getting the user info out which I did by exporting the mos_users table from the mambo database into a CSV file using phpMyAdmin. I opened that CSV file in Excel and removed the columns which were necessary for Mambo leaving me with what looked like a standard phpbb table.

I then went back to phpMyAdmin, opened the new phpBB database and imported the contents of the CSV file into the phpbb_users table.

I went into the phpbb admin panel to change a couple of settings (things like domain and path to board)

After that I ran the phpbb conversion script which was found on this site and everything got converted without any hassle :)

Janner

#2
I found the following worked for me

1. created a copy of mos_users named phpbb_users (deleting the existng version of this)
2. removed all the extra (Mambo) variables from the newly created phpbb_users
3. renamed all the variables in phpbb_users that were changed by the PHPBB component
4. reordered the variables in phpbb_users to match what they should be in a clean installation of PHPBB
5. ran the PHPBB->SMF converter

And it really wasn't as involved as I have just made it sound :o

You will also need to cleanup the mos_users table.

I would suggest that you do all this locally (Mambo Standalone Server (MSAS) is great for this). Test locally, and then once you are sure everything is okay, apply the changes to your live database (making a backup first!).

And speaking as somebody who had to do this on two sites, and who has used the PHPBB component for some time (and PHPBB standalone before that) I can say that it really was worth the effort 8)

vaporizedman

#3
I have made all necessary changes for making phpbb component database a standalone phpbb database (removing coloumns in phpbb_users related with joomla, changing some of coloumn names, etc.) after that I run php 2 smf converter downloaded from smf homesite. I get the error message below repeatedly and if I do not interfere phg.exe uses all my available ram and cpu. and conversion can not be done. can anybody help me. thx a lot

QuoteConverting members...
Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 511

Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 514

Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 529

Warning: Bad arguments to implode() in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 531

Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 511

Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 514

Warning: Cannot use a scalar value as an array in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 529

Warning: Bad arguments to implode() in c:\apache\htdocs\phpbb2_to_smf-etsiz.php on line 531

and the lines in phpbb2_tp_smf.php file are as follows

$rows = array();
while ($row = mysql_num_rows($result))
{
// Remove some illegal characters.
line511 $row['memberName'] = preg_replace('/[<>&"\'=\\\]/is', '', $row['memberName']);

            // timeOffset = phpBB user TZ - phpBB board TZ.
line514 $row['timeOffset'] = $row['timeOffset'] - $board_timezone;

// If the avatar type is uploaded (type=1) copy avatar as an attachment with the correct name.
if ($row['user_avatar_type'] == 1 && strlen($row['avatar']) > 0)
{
$smf_avatar_filename = 'avatar_' . $row['ID_MEMBER'] . strrchr($row['avatar'], '.');
copy($phpbb_avatar_upload_path . '/' . $row['avatar'], $smf_attachments_dir . '/' . $smf_avatar_filename);

mysql_query("
INSERT INTO {$to_prefix}attachments
(ID_MSG, ID_MEMBER, filename)
VALUES (0, $row[ID_MEMBER], '" . addslashes($smf_avatar_filename) . "')");
$row['avatar'] = '';
}
unset($row['user_avatar_type']);
line529 $row['signature'] = preg_replace('~\[size=([789]|[012]\d)\]~is', '[size=$1px]', $row['signature']);

$rows[] = "'" . implode("', '", addslashes_recursive($row)) . "'";
}

Advertisement: