Page 1 of 1

Migrate data from custom forum

Posted: Tue Jun 11, 2019 4:05 pm
by larynx
I'm looking to migrate an existing custom-made forum to phpBB 3.2.7.

I need to migrate the users, messages and threads. I was thinking about writing a script that reads a row from an existing forum DB table and writes the data to the phpBB table with the fields in their proper format and location.

Is that the correct way of migrating data or should I use some other way?

Thank you

Re: Migrate data from custom forum

Posted: Tue Jun 11, 2019 4:34 pm
by david63
larynx wrote:
Tue Jun 11, 2019 4:05 pm
I was thinking about writing a script that reads a row from an existing forum DB table and writes the data to the phpBB table with the fields in their proper format and location.

Is that the correct way of migrating data?
Basically yes, but there is a lot more to it than that. Many of the phpBB tables are interlinked so you would need to understand the phpBB database structure so that you added the correct data into all of the relevant tables. There are several functions within phpBB that would make some of this task easier

Re: Migrate data from custom forum

Posted: Tue Jun 11, 2019 6:31 pm
by warmweer
larynx wrote:
Tue Jun 11, 2019 4:05 pm
I'm looking to migrate an existing custom-made forum to phpBB 3.2.7.

I need to migrate the users, messages and threads. I was thinking about writing a script that reads a row from an existing forum DB table and writes the data to the phpBB table with the fields in their proper format and location.

Is that the correct way of migrating data or should I use some other way?

Thank you
You mention threads.
phpBB uses topics (flat) and thus if you are really using a threaded forum, that information will be lost.
I suggest you install a phpBB-board to see exactly which data your forum doesn't have so that you have an idea of the necessary scripts which have to be written (in order to fabricate the inexistent data).

Everything is feasible but depending on the size of your forum it could be a large job.

Re: Migrate data from custom forum

Posted: Thu Jun 13, 2019 9:42 pm
by larynx
I managed to import the users by selecting all the data from the previous users table and running each row with the user_add function from includes/functions_user.php

I saw that there is a submit_post function in includes/functions_posting.php that I can use to create new posts but I haven't found the proper function to create categories and forums.

Can anyone point me in the right direction?

Thanks