Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum import. After users are done, what links them to the topics/replies?


  • phil_b
    Participant

    @phil_b

    Hi all,

    I’m wondering how topics and replies get liked to users during import. Is it simply by ID, or by email?

    I.e you import 10,000 users. This completes. Then it moves on to topics, importing them and assigning them to the appropriate user. Does it take the user ID from the old forum software and compare to that stored for the imported user, or does it match via email address (which should be unique of course).

    I ask this because I’m considering importing topics/replies from 4 external forums in to a single bbpress install. There will really be no way to match up which topic/reply should be assigned to which user via ID, but it would work if matching via email.

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robkk
    Moderator

    @robkk

    @phil_b

    im not 100% but its probably ID by default


    phil_b
    Participant

    @phil_b

    Yea I suspect so too.

    If anyone, ideally a bbpress developer, could offer any advice on how I might re-code the import script to match topics/replies to user via email that would be great!

    I shall cross my fingers for a response 😉

    Thanks

    Indeed we use the user ID, an integer, the only work around for this would be to make a custom user table in one of two ways:

    1) A a table with a unique ID linked to each email and join this table in the the user section of the import script

    2) Similar to the above, but add a column to each of your four databases with a unique ID for each email address that will be common across all four DB’s.

    Thinking out loud both above and now, option 1 is kind of out, to keep performance reasonably quickly each forum, topic, and reply uses an integer ID for the post and bbPress uses this same method for all 25 importers except one, only one includes the email address of the poster in the topic and reply tables and each topic/reply is imported based on the original topic/reply author ID.

    In the end (or the beginning) you need to “normalise” your data from 4 databases to match 1, thinking the other way round, do your import into 4 separate WordPress installs and then merge the 4 WP install DB tables into a single DB. The benefit of this is that all your data will be now “normalised” in the WordPress format and then it’s a matter of updating the duplicate user ID’s to the primary user ID and remove the now redundant user ids.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar