Merging Two Forums

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Merging Two Forums

Post by onigumo » Sun Jun 18, 2006 2:43 am

A friend of mine has a forum he has no use for anymore. They're both phpBB, but the friend's forum has older phpBB software (though they're both of the latter 2x line). I want to merge his forum's posts, topics, and membership into mine. I also want to be able to choose where to place those topics and forums, or just to have those forums added to mine so that I can move the topics and rid of them. I don't want to merge any forum features, database stuff, including the settings, and other technical and unnesessary aspects. Is that possible? If so, please provide me with the info I need. Thanks.
I write articles on community building
@ The Infinity Program.

User avatar
Noobarmy
Registered User
Posts: 2388
Joined: Tue Apr 04, 2006 6:15 pm
Location: London
Contact:

Post by Noobarmy » Sun Jun 18, 2006 4:30 am

It'ld be a bit complicated. I'm guessing they're in different DB's so with your mate's forum in its old DB enter phpmyadmin.

go to table _forums

change all the forum_id s to something that is not in ur DB, (so find the greatest forum id for your forums and then add on from there) -> try and keep them the same number but just adding the highest forum id on your forum(it'll make the next bit easier)

go to _topics

change all forum_id s by adding on the meximum forum number
-> This SQL query might work
->"UPDATE _topics SET forum_id=topic_id+[max_of_your_forum] WHERE forum_id > 0"

then find the highest topic id in your forum then go to _topics again

change all TOPIC_id s by adding on the meximum topic number
-> This SQL query might work
->"UPDATE _topics SET topic_id=forum_id+[max_topic_of_your_forum] WHERE topic_id > 0"

Then modify the _posts table to adhere to the topic table

-> This SQL query might work
->"UPDATE _posts SET topic_id=topic_id+[max_topic_of_your_forum] WHERE topic_id > 0"

Now you need to modify all the post ids

-> This SQL query might work
->"UPDATE _posts SET post_id=post_id+[max_post_of_your_forum] WHERE post_id > 0"

Then all the text

-> This SQL query might work
->"UPDATE _posts_text SET post_id=post_id+[max_post_of_your_forum] WHERE post_id > 0"

all tables start with _ but the prefix should be before it so you need to change all table names by adding your forum prefix :D

i hope you get the drift. all you need to do is the same for users and whatever else you wanna transfer :D

best of luck ;)
Image

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken » Sun Jun 18, 2006 11:02 am

this might work. but I suggest you really make a backup of both databased before attempting to merge them.

in addition, Noobarmy do you got a script too that walks trhough the posts ( with a like statement ) and updates the post and topic id's ?

Rfn
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo » Mon Jun 19, 2006 5:22 am

Noobarmy wrote: i hope you get the drift. all you need to do is the same for users and whatever else you wanna transfer :D

best of luck ;)


Thanks. I think I get it. When I come across problems (as I'm expecting), I'll try to express what they are as best I can.

I'm wondering, do I get to choose the users or do I have to choose all of them? Can I choose based on which ones have posted? I don't want to pick up those hundreds of non-posting bots and spammers who've registered to that forum.
I write articles on community building
@ The Infinity Program.

User avatar
Noobarmy
Registered User
Posts: 2388
Joined: Tue Apr 04, 2006 6:15 pm
Location: London
Contact:

Post by Noobarmy » Mon Jun 19, 2006 3:30 pm

you could. if u want it to look nicer you should try and keep the numbers sequential (as gaps will be caused where there are non-posters) but all-in-all it doesn't matter :D
Image

Post Reply

Return to “[2.0.x] MOD Requests”