Announcement

Collapse
No announcement yet.

Custom Import Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom Import Script

    Hello,
    My client is using a custom designed forum based on PHP and mySQL. The data structure is similar to vbulletins. We have purchased vB 3.5 and want to uppgrade now. What is the best strategy to import our data, can I take an ImpEX extension and modify it to work our database?

    Any advice is appreciated!

    Thanks M


  • #2
    You could review one of the exsisting import systems like phpBB to see how all the modules work.
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      Thank you I will do that. Is there any documentation for the ImpexAPI or something I can use to understand the code better?

      Thanks

      Comment


      • #4
        Currently there is no developers docs, though this HOWTO will give an over view :

        http://www.vbulletin.com/forum/showthread.php?t=116398

        and there is a example of how to import a custom user table here :

        http://www.vbulletin.com/forum/showp...85&postcount=3
        I wrote ImpEx.

        Blog | Me

        Comment


        • #5
          thanks I will take a look at these

          Comment


          • #6
            hello again, I have almost finished converting phpbb2 files to my forum but have one problem. Our forum also has a threaded feature like vbulletin, but I can't find a Impex system that handles this? I am guessing I would need to create a new column called "importparentid" and then create code to handle the cross macthing of parent post id´s??
            Any ideas?

            Thanks

            Comment


            • #7
              Well the post that is the parent of the one you are importing must already be in the database if they are being imported in order, so you can search for the parent's vBulletin post id and just import that

              A few of the systems do it, an example as to exactly what you need is in systems/ubb_threads/007.php lines 131 to 138 :

              PHP Code:
              if($post_details['B_Parent'])
              {
                  
              $try->set_value('nonmandatory''parentid'$this->get_vb_post_id($Db_target$target_database_type$target_table_prefix$post_details['B_Parent']));
              }
              else
              {
                  
              $try->set_value('nonmandatory''parentid',        '0');

              just add that to your import post module and change B_Parent for what ever is your post parent id field in your source database.
              I wrote ImpEx.

              Blog | Me

              Comment


              • #8
                Thank you very much!!! I will try this!

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X