SMF Support > phpBB
[SMF Converter] phpBB3
JayBachatero:
Software: phpBB
Version: 3.0
It's finally here. Spent the whole day working on it and managed to get a beta out. The converter is still in beta and some things are missing. If you have suggestions for other things to convert just post them :) . Here is a list of what is converted.
Converts
* Members
* Ranks
* Groups
* Categories
* Boards
* Topics
* Posts
* Attachments
* Personal Messages
* PollsDoes Not Convert
* Permissions (This might not be supported at all so please check permissions before making the board live. Everything will be admin only for board access.)
* Redirection Boards (I want to add support for the redirection boards mod.)
* Avatars
* Profile Fields (I want to look into this and see if I can make them SMF compatible. You would just need to make the template changes.)
* Basic Settings (Convert some of the basic forum settings. (site name, max post length, etc)
* Smileys
Password Support
phpBB has their own custom password hash so you need to edit Sources/LogInOut.php from the SMF folder to add support for password conversion. Alternatively, you can used the attached phpBB3_Login_Fix.tgz modification (attached below) via Package Manager.
--- Code: (find) --- // Snitz style - SHA-256. Technically, this is a downgrade, but most PHP configurations don't support sha256 anyway.
if (strlen($user_settings['passwd']) == 64 && function_exists('mhash') && defined('MHASH_SHA256'))
$other_passwords[] = bin2hex(mhash(MHASH_SHA256, $_REQUEST['passwrd']));
--- End code ---
--- Code: (add after) --- // phpBB3 users new hashing.
$other_passwords[] = phpBB3_password_check($_REQUEST['passwrd'], $user_settings['passwd']);
--- End code ---
--- Code: (find) ---?>
--- End code ---
--- Code: (add before) ---function phpBB3_password_check($passwd, $passwd_hash)
{
// Too long or too short?
if (strlen($passwd_hash) != 34)
return;
// Range of characters allowed.
$range = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
// Tests
$strpos = strpos($range, $passwd_hash[3]);
$count = 1 << $strpos;
$count2 = $count;
$salt = substr($passwd_hash, 4, 8);
// Things are done differently for PHP 5.
if (@version_compare(PHP_VERSION, '5') == 1)
{
$hash = md5($salt . $passwd, true);
for (; $count != 0; --$count)
$hash = md5($hash . $passwd, true);;
}
else
{
$hash = pack('H*', md5($salt . $passwd));
for (; $count != 0; --$count)
$hash = pack('H*', md5($hash . $passwd));
}
$output = substr($passwd_hash, 0, 12);
$i = 0;
while ($i < 16)
{
$value = ord($hash[$i++]);
$output .= $range[$value & 0x3f];
if ($i < 16)
$value |= ord($hash[$i]) << 8;
$output .= $range[($value >> 6) & 0x3f];
if ($i++ >= 16)
break;
if ($i < 16)
$value |= ord($hash[$i]) << 16;
$output .= $range[($value >> 12) & 0x3f];
if ($i++ >= 16)
break;
$output .= $range[($value >> 18) & 0x3f];
}
// Return now.
return $output;
}
--- End code ---
Notes:
- Set SMF to UTF-8 mode since phpBB3 is set to UTF-8 by default.
Changelog
! Make sure that all boards get converted properly.
! Initial upload.
convert.php
Use this convert.php with the .sql file attached in this topic.
Aaron:
Great job Jay! I'm sure you've just made a lot of people happy. :)
codenaught:
Awesome Jay! :D I'll give it a test run a little later.
Augh:
Thank You Jay :)
All working good now...
JayBachatero:
Augh can you check and make sure that entities where converter correctly? phpBB uses utf8_bin for text fields so hopefully everything transfers correctly.
Another thing that I just remembered. phpBB has support for sub categories. SMF does support this so sub categories will be set as regular categories with the boards on the main page.
Navigation
[0] Message Index
[#] Next page
Go to full version