is this the place to ask questions about importing (not impEx)??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pussySniper
    Member
    • Apr 2004
    • 55

    is this the place to ask questions about importing (not impEx)??

    I am importing from a forum not compatible with with impEx and have a few questions.
    right now my main interest is importing the user password.
    haven imported all the users yet, just the moderators. have all their info in the 'moderator' and 'user' tables (an other tables i should be lookin at?)
    imported everything but the password, i'm making another script to do that. so i'd like to know how to call and use the vbulletin_md5.js
    i mean, can i just call it in my php script give it some values and it will return the crypted password?
    and how do i use it to decrypt the password (for testing purpose to see if it works?)
    hope someone can help.
  • Jerry
    Senior Member
    • Dec 2002
    • 9137
    • 1.1.x

    #2
    Originally posted by pussySniper
    I am importing from a forum not compatible with with impEx
    So you arn't using impex or its API at all ?

    Originally posted by pussySniper
    i mean, can i just call it in my php script give it some values and it will return the crypted password?
    Depends on the origional format of the password.

    Originally posted by pussySniper
    and how do i use it to decrypt the password (for testing purpose to see if it works?)
    If you are talking about a vB3 password, its a md5 hash, which is one way you will need to origional password and salt to be able to compare them.
    I wrote ImpEx.

    Blog | Me

    Comment

    • pussySniper
      Member
      • Apr 2004
      • 55

      #3
      no, not using impEx or its API at all, writing my own scripts. think I should?


      the original format of the password is ... the password!! no encryption, no nothing. thats why i want to use the vB3 md5.js script but not sure how. I want to know how to use it from my .php import script...

      Comment

      • Jerry
        Senior Member
        • Dec 2002
        • 9137
        • 1.1.x

        #4
        Originally posted by pussySniper
        no, not using impEx or its API at all, writing my own scripts. think I should?
        Well I wrote it so that it could be extended very eaisly, and I included the API doc for people who want to write their own, no point re-inventing the wheel.

        Originally posted by pussySniper
        the original format of the password is ... the password!! no encryption, no nothing.
        Plain text then.

        Originally posted by pussySniper
        thats why i want to use the vB3 md5.js script but not sure how. I want to know how to use it from my .php import script...
        I would advise against trying to do something like that and have a look and some thing like :

        impex/systems/eve/003.php

        for an example of how it imports a users, just have a look at lines 154-248 and ignore everything else atm.
        I wrote ImpEx.

        Blog | Me

        Comment

        • pussySniper
          Member
          • Apr 2004
          • 55

          #5
          already had a look at the 003.php file, that is where i started from.
          hadnt looked at the apidoc, thats a useful tip thanx.
          but i dont have an option, i have to get the plain text passwords from the other database and convert them with md5. (not up to me to decide)
          what other option is there? leave them as plain text and when vb3 goes to fetch them edit vb3 so it doesn't decrypt them?

          even if i where to do that, out of curiousity... can i use the md5.js script in a .php script (never used javascript before don't know if it can be done)
          in the top comment it says

          * vBulletin Usage: md5hash(input,output)
          * Recommend: input = password input field; output = hidden field

          also, the mandatory fields you pointed out to me [eve/003.php file]
          are the only things that HAVE to be filled in?? the rest of the fields in the 'user' table can be left as blank?

          Comment

          • Jerry
            Senior Member
            • Dec 2002
            • 9137
            • 1.1.x

            #6
            They will not be left plain text, impex will hash it and create the salt and put it in the database, thats what it does.

            Yes for an object to be imported all its mandatory vaules must be present, if they aren't it will fail is_valid().
            I wrote ImpEx.

            Blog | Me

            Comment

            • pussySniper
              Member
              • Apr 2004
              • 55

              #7
              They will not be left plain text, impex will hash it and create the salt and put it in the database, thats what it does.
              I know but i'm not using impex. i'm writing my own scripts and running them by hand.
              so far i've inserted all the channels and subchannels for the forums to go into and now just imported the moderators in the 'moderator' table.
              next I have to import them in the user table and I have all the fields ready except for password because I don't know how to hash it.

              Comment

              • Steward
                Member
                • May 2004
                • 34
                • 3.0.1

                #8
                I'm with you, PussySniper

                Jerry wants us to slog through his API. It's a huge document which demands knowledge of the very thing we do not know: our new vb system. Way too overblown to simply convert a member list.

                In my case, starting with SELECT * from my member file, I end up in a loop pulling out each row as $row=mysql_fetch_object($result). The row contains an id and password.

                We need to populate the salt and password fields for vb. Passwords are not encoded in my current system. This works for me:

                PHP Code:
                   $salt substr(md5($row->id),0,3); // anything will do I guess
                   
                $password=md5($row->password); // vb javascript does this
                   
                $password=md5("$password$salt"); // vb login script does this 
                I continue to populate the vb member record with my own. Then I found the following seemed to be necessary. I do not yet know for sure what these are:

                PHP Code:
                   $result=mysql_query($q);
                   
                $newid mysql_insert_id($result);
                 
                   
                $q="INSERT INTO vb_adminutil VALUES ('ids', '$newid')";
                 
                   
                $q="INSERT INTO vb_userfield VALUES ($newid, '', '', '', '', '')";
                 
                   
                $q="INSERT INTO vb_usertextfield VALUES ($newid, '', '', '', '', '', '')"
                (Code removed for readability).

                After my conversion, when I sign on as a user, vb is a mess. But running every repair/optomize thingy I can find in the admin panel does the job. It looks good to go.

                BUT... I cannot get vb to recognize the new user count.

                Here is what I think should happen...
                PHP Code:
                 $userdata['numbermembers']=$count;
                 
                $userdata['newusername']='steward'// test
                 
                $userdata['newuserid']=1// test
                 
                $q="UPDATE vb_datastore SET data='$data' WHERE title='userstats'"
                I assume the latest user will be overwritten shortly, it is the member count I want updated. But try as I might, vb never seems to display this new number. Even when I just edit it using phpMyAdmin!

                Again: the ImpEx system appears slick and professional. Just a tad overwhelming to copy some members from one table to another. Eventually I will dig my way into it or chargeback my purchase of vb.

                Sorry to be a frustrated whiner. I am a webmaster and a programmer, I know what it feels like to deal with whiners.

                But this is not rocket science, and I have paid my money. Days later, I watch the "WOW 30 minutes for support" counter tick by, and this simple question goes unanswered.

                Grrr.

                Otherwise, the system looks like fun. I am looking forward getting over this hurdle.

                Cheers.

                Comment

                • Jerry
                  Senior Member
                  • Dec 2002
                  • 9137
                  • 1.1.x

                  #9
                  Originally posted by Steward
                  Jerry wants us to slog through his API. It's a huge document which demands knowledge of the very thing we do not know: our new vb system. Way too overblown to simply convert a member list.
                  Not at all, that API doc was something I did while I was writing the system for myself, I put it in because I though it might be of some help to people who are used to reading then.

                  You don't have to know anything about it really, its all in the systems folders.

                  Originally posted by Steward
                  Then I found the following seemed to be necessary. I do not yet know for sure what these are:
                  This is the reason I made an API, things like that are taken care off as is the clean up when retrying.

                  Originally posted by Steward
                  Again: the ImpEx system appears slick and professional. Just a tad overwhelming to copy some members from one table to another. Eventually I will dig my way into it or chargeback my purchase of vb.
                  The core product is vB, I'm not sure if not understanding the code or implementation of a supporting tool is a valid reason for doing something like that.

                  Originally posted by Steward
                  But this is not rocket science, and I have paid my money. Days later, I watch the "WOW 30 minutes for support" counter tick by, and this simple question goes unanswered.
                  If you are talking about pussySniper's question, that was delt with by PM, or do you mean your own ?
                  I wrote ImpEx.

                  Blog | Me

                  Comment

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