phpbb3 -> bbpress converter
-
hi !
am working on moving my site from phpbb3 to bbpress, of course there is no converters out there for that purpose, so i decided to write my own.
am still testing it and trying to improve the code a little bit. right now it can convert the following :
1- forums
2- topics, completely with topic types and status.. announcements and glopal announcements are stickied to front page.
3- posts, all bbcode is converted into html, smiles are changed into img tags, so you might want to install allow images plugin.
4- users, including permissions .. notice that bbpress doesn’t support per forum permissions as phpbb3, so it only convert users as following :
founder -> key master
inactive -> inactive
banned -> blocked
moderators and admins are converted into normal users, so you have to assign them again
because phpbb3 doesn’t use md5 hashing anymore, the script copies passwords as it is. to solve that problem i modified the md5 insecurity for bbpress plugin to first check the passwords the phpbb3 way, if it matches, it will rehash it using bbpress functions.
the script converts all the table rows at once, so it’s very heavy and consumes too much cpu depending on your forum size, i strongly suggest that you do the conversion on your own machine, not on a shared hosting account. you might also want to increase the php max execution time on your machine before starting the script cause it takes lots of time converting posts.
here is the steps for converting your phpbb3 board :
1- make a backup from your database and files.
2- install bbpress anywhere, just use the same database of phpbb3. this is important cause the script assumes that all tables are in the same database.
3- download the script from here. extract it, and you’ll get 2 files.
4- copy the file phpbb3tobbpress.php to phpbb3 directory.
5- copy the file _phpbb3_pass.php to bb-plugins directory.
6- go to http://path-to-phpbb3/phpbb3tobbpress.php and start converting your board.
7- voila .. all your data is converted to bbpress tables, go to your bbpress installation and login. don’t forget to visit admin->manage->recount to make sure your converted board is updated.
i can’t stress enough on how consuming is the process of converting posts, my board has 25,000 posts, and it takes nearly 15 minutes to convert them on my local machine, so again : i don’t recommend using this converter on shared hosting.
ciao !
-
There was an error in my converted phpbb sql file, the error clearly pointed me to the right direction. So all I did was download the phpbb database, then I traced the error down to the line that was being pointed out, I deleted what I thought could be causing it, saved it and exported it back to the database.
As soon as I ran the converter script, it worked like a charm.
Are you having any problem? It didn’t take me more than 30mins to do all the conversions. I was initially on SMF, converted that to Phpbb, before finally converting to bbpress.
I’d love to hear if anyone has found a way to successfully convert the format of the passwords from phpBB to bbPress.
I was able to convert everything successfully! But when I login as the administrator I don’t get the Admin link to access the “administration panel”. Has anyone had this same issue and found a solution???
my users are not converting over but everything else is. anyone have a similar problem? i am using phpbb3 version 7 and bbpress 1.0.
For everyone having trouble with special characters in forum names and descriptions,
FIND (on or around lines 193 and 194 of the original script)
$forum_name = $row;
$forum_desc = $row;
CHANGE TO (adding the addslashes() function)
$forum_name = addslashes($row);
$forum_desc = addslashes($row);
And that should resolve most of the complaints I’ve seen here about the conversion failing.
Fix Topic Slug phpBB Convert bbPress
add this to function.php in your template file
function fix_topicslug() {
global $bbdb;
$get_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE topic_slug='' ");
foreach( $get_topics as $get_topic ) {
$slug_fix = bb_slug_sanitize( wp_specialchars_decode($get_topic->topic_title));
$topic_id = $get_topic->topic_id;
$bbdb->query("UPDATE $bbdb->topics SET topic_slug= '$slug_fix' WHERE topic_id = '$topic_id' ;");
}
}and echo fix_topicslug in header. cek your database, and dont forget to remove the above code if you already finish.
my problem now the post_position is broken after convert to bbpress (all post is position 1) any fix ?
fix post position
function fix_post_position() {
global $bbdb;
$get_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics ORDER BY topic_start_time ASC");
foreach( $get_topics as $get_topic ) {
$get_posttopic = $get_topic->topic_id;
$postorder = 1;
$get_posts = $bbdb->get_results("SELECT * FROM $bbdb->posts WHERE topic_id = '$get_posttopic' AND post_position = '1' ORDER BY post_time ASC");
foreach( $get_posts as $get_post ) {
echo "UPDATE bb_posts SET post_position = ";
echo $postorder++;
echo " WHERE topic_id = ";
echo $get_post->topic_id;
echo " AND post_id = ";
echo $get_post->post_id;
echo " ;";
echo '<br/>';
}
} }echo fix_post_position in your template file and copy the sql query to your database
Ok i just moved everything over using this but my users are missing, including both admins so we can’t login to bbpress, does anyone know how to fix this? If so please email me on how to fix this! The tables for users are there, but nothing to browse when i go to phpmyadmin
hmm you can copy the user db from phpbb to bbpress but your website user need to reset password because phpbb use md5 hash
I got all my users over, but the system never sends me an email when I try to to reset the password. Has anyone encountered that problem?
Also, how may one copy users from the phpbb_users database to the bb_users database manually?
Thanks for all help.
Just gone through this process, and for the most part it was painless (I had to go through and remove those offending characters).
But I can’t get my head around the password situation, the documentation with the plugin seems to suggest that the users password will be converted upon login, but they can’t log in because their password has changed.
Link to plugin https://bbpress.org/plugins/topic/md5-insecurity-for-bbpress/
What exactly is this plugin doing then? am I just stuck with everyone needing to reset? In which case do I need this plugin installed?
I updated the current code and hosted it under google code at http://code.google.com/p/phpbb3-to-bbpress1-converter/
now it works with bbpress 1.0.2 and phpbb 3.0.7
have fun! and thanx original poster: wmnasef
Hi numediaweb,
first of all thank you for the script: it does everything it promises and it’s easy to use
Non surprisingly it still seems to lack a few feature which are probably very hard to develop: it doesn’t parse the bbcode inside posts (meaning that all the links inside the posts are gone) and it doesn’t convert the attachments…
I hope someone will find the time to implement those, as I believe they’re necessary to properly move a forum from one software to another.
Our forum is here
But thanks again anyway
that’s true: this converter doesn’t deal with attachements, for my forum, i didn’t need attachements that’s why I did’nt try to fix this probeleme, anyway, if I have time, i’ll check this.. another think is the way phpbb3 stores attachements; it crypts file names so instead of “myimage.gif” it stores the file encrypted like “55_5230d911b6e6212b7a55075668053db2” but there will be a way just needs time!
it doesn’t parse the bbcode inside posts (meaning that all the links inside the posts are gone)
Is the bbcode still present in the bbPress database?
if so, then there are a few bbCode parsers for bbPress availible. I know Matt doesn’t like it, and therefore we are the only forum that won’t support it, but i think it only slows adoption
Kevin: like this one -> https://bbpress.org/plugins/topic/bbcode-lite/faq/
are you aware of a way to handle the attachments?
Numediaweb: thanks a lot for your effort, much appreciated!
I’ve been fighting with phpbb for a few days now, it’s leaking everywhere now and I can’t wait to get rid of it
Thanks everybody!
A.
I’m clueless about attatchements from anything to bbPress sadly; but that bbCode plugin works a treat
I think this is great. I mean, I installed phpbb3 in my site and have been regreting it since users became more and more active.
I have a question, though. I’ve spent three days looking for some info (at google, wordpress, etc) and I think this is the right place.
Do I have to upload the bbpress files into the same directory where the phpbb files are right now or the new bbpress files can be anywhere? I’ve read that the database must be the same. My guess is that the files can be anywhere but I just want to make sure.
Hi Frank. Only should have installed bbpress in the same dbase which contain phpbb content. Place for files is not matter.
Remember! Make backup!
Hi, I’ve made some tests and I have seen that the topics are not loading (links not working) when the permalinks are set to be name based.
Works like a dream. Thanks!
Btw, I did the conversion on a shared server, and each conversion was instant. Of course, my forum is not that big, but worth mentioning …
Hi there. can this be done without installing phpbb3 as I’m also moving the forum to another location.
Steps I made:
1. Export phpbb3 SQL from the old location
2. Import phpbb3 SQL to the new location.
3. Install bbpress with the same db info where I imported the phpbb3 SQL.
4. Called the script from root folder of bbpress, but I get 500 Internal Server Error.
I can see that there are some hooks to phpbb3 root folder.
I don’t know what is being called there, but maybe I could define DB settings manually somehow?
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();So can this be done without phpbb3 installation?
is this for real.. hope i could get this!
this is helpful.. thanks!! good stuff!! cheers!
Thanks for this converter! I have managed to sucesfully convert a phpbb3.0.8 forum to a bbpress one, but one problem remains, how can i convert attachments as well?
My forum heavily depends on people attaching images, migrating to bbpress and losing attachments is like losing half the fun.
Any help?
- The topic ‘phpbb3 -> bbpress converter’ is closed to new replies.