Import from external Database (source db is not phpbb)

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Ideas Centre
Locked
Django23
Registered User
Posts: 2
Joined: Wed Sep 01, 2010 12:22 pm

Import from external Database (source db is not phpbb)

Post by Django23 »

Hello,


We I'm working on an import to a PHPBB forum.
I work from an old ASP forum from a company, and i want to convert it to PHPBB.

Of course my database is not at all structured in the same way as the one of PHPBB.

I have the following tables:

* Users
* Topics
* Categories

It works with joins. I that way it' s not really different than PHPBB.

Time for my questions:

1. Is there a way to import these data easily in PHPBB
2. Should I make my own database tables so it will match the ones of PHPBB ? Which fields are mandatory, and which are not?
3. Should I export my data to a CSV instead ?

Thank you already for your help.

Django

Drummer
Registered User
Posts: 199
Joined: Wed Jul 21, 2010 11:49 am

Re: Import from external Database (source db is not phpbb)

Post by Drummer »

If it has only those 3 tables then it will be very easy to convert :p
Post the full structure of your database.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Import from external Database (source db is not phpbb)

Post by D¡cky »

The best way is to use the phpBB2 to phpBB3 convertor which comes with phpBB3 and modify it to get the information from your database and import to phpBB3.

Alternatively, You could create the categories and forums manually in the phpBB3 administration panel.
Use the Import User Tool to import your users.
The topics and posts is a little more difficult. Some people have used the submit_post function. See Stuck trying to migrate forum with submit_post. Also see http://www.phpbb.com/community/viewtopi ... #p12821709 for more tips.
Have you hugged someone today?

Django23
Registered User
Posts: 2
Joined: Wed Sep 01, 2010 12:22 pm

Re: Import from external Database (source db is not phpbb)

Post by Django23 »

Okay,

Well thanks for the info, both of you.

I have the following tables. It' s quite a bad structure and is in MSSsql.
If you could take a look if all obligatory fields are present.

--------------------------
tForumPostMember
--------------------------
ID_Post
ID_Fan


--------------------------
tForumSubcat
--------------------------
ID_Subcat
strTitle
txtDesc
blnUserTopics


--------------------------
tForumSubcatTopic
--------------------------
ID_Subcat
ID_Topic


--------------------------
tFanSite
--------------------------
ID_Fan
ID_Site
blnNewsletter


--------------------------
tForumTopicPost
--------------------------
ID_Topic
ID_Post
blnFirstPost


--------------------------
tForumCatSubcat
--------------------------
ID_Category
ID_Subcat


--------------------------
tForumTopicMember
--------------------------
ID_Topic
ID_Member


--------------------------
tForumTopicpost
--------------------------
ID_Topic
strTitle
numViews
blnLocked
numTopicType


--------------------------
tForumCat
--------------------------
ID_Category
dtrTitle
numPosts
ID_Site


--------------------------
tForumPost
--------------------------
ID_Post
dtDate
txtMessage
blnPublic
strIP
dtLastEdit
numEdits


--------------------------
tFan
--------------------------
ID_tFan
ID_Language
ID_CUntry
strFirstname
StrLastname
strEmail
strPhone
strMobilePhone
dtBirthDate
strNickname
strPassword
strICQLogin
strMSNLogin
strAIMLogin
strURL
txtIntrest
txtMusicInterect
txtPersonalIntro
txtSignature
blnInfoPublic
strAvatar
strStreet
strCity
strZipcode
chrGender
blnConfirmed
strRegCode
blnLocked
bnlLocked
numPosts
dtCreationDate
dtLastLogin
strProvence
blnMarried
blnChilderen
intProfile

Drummer
Registered User
Posts: 199
Joined: Wed Jul 21, 2010 11:49 am

Re: Import from external Database (source db is not phpbb)

Post by Drummer »

You would have to explain what exactly each table/field mean (the concept of category/forum seems to be different).

I also suggest you to create the categories and forums through ACP, as Dick said.

Importing users must be easy. Read the data from your old db, put it in an associative array and call user_add() (the phpbb function). The keys of the associative array is the name of phpbb users table fields.
Mandatory fields are: username, group_id, user_email and user_type. You can pass group_id and user_type as constants: 2 (registered users group) and 0 (normal users), respectively.
But you can import much more info, have a look at the wiki to see the fields of the users table: http://wiki.phpbb.com/display/DEV/Table.phpbb+users

The topics and posts may be directly inserted in the respective tables, but calling submit_post() has the advantage of synchronize everything by itself.

Locked

Return to “[3.0.x] Convertors”