XF 2.2 Export/import Thread


Well-known member
Sometimes it would be really nice to export and import a complete thread.
But how we can do that, what sould be exportet/importet?

1. The thread itself.
Select by thread_id, no problem

2. All the posts with thread_id; problem could be if the users here do not exist at the target forum

3. attachment, content_type post, content_id = post_id; watch data_id
3.1 attachment_data with data_id from above

And we have to copy the attachments itself to the new forum with new data for dir and name.

For myself this ok; for the user i would use the existing one; if not existing a dummy_user.

But maybe this is not enough?
reactions, votes, something else?

I try to start now with something like this; fetch all threads from forum x, where we don't have any attachments.
I have two scenarios:

a) both forums are on one server; then I would prefer a script opening both db.
b) forum on localhost; then it is maybe best to use an add-on on localhost and use the api to import data on the second forum somewhere in the web.
c) third scenario i may try, is to use a mysql program to syncronize data on two servers.
Top Bottom