View Full Version : Wrong userids after ipb1.3 - vb3.0.3 import
rlamego
Mon 22nd Nov '04, 11:06pm
Hi!
I'm trying to import my IPB 1.3 to vB 3.0.3 using the supplied IMPEX.
I've read the (sticky) importing HOWTO but a few questions remain.
Besides not being able to import any pM and attachments, my major problem is that vB gives a different userid to the imported users because it creates a Guest user with ID #2.
Although it seems that vB handles the new ids pretty well, my integrated Photopost and Reviewpost installations are not. Every photo and comment is being credited to the wrong user.
I've seached the forum but nothing valuable came up. Any idea on how to solve this?
Thanks! =)
Ricardo
Zachery
Mon 22nd Nov '04, 11:10pm
We do not support third party scripts.
Impex just assigns the user the next id according to mysqls autoincrment feature.
So every user it adds it just adds lastused+1=newid
And there isnt really anyway around this, for fixing the photopost and review post you should contact the makers of the software and see if they are able to assit, you could also try asking at vBulletin.org
rlamego
Mon 22nd Nov '04, 11:30pm
Wow! Fast reply! Thanks! =)
I know you don't support 3rd party but I'm not asking for that. I only need that the importer script to use the original user id.
This is all caused because the script is creating a bogus user called "Guest" with id #2 when there is no user like that in the original user database. Is this normal?
Ignore that, please! The Guest user exists and it has id #0 but the importer script is assigning it id #2.
Is there anyway of making the importer script ignore that id #? Like starting the import at id #1?
rlamego
Tue 23rd Nov '04, 12:39am
Well, on second thought the sequential id assignment is the problem. The last user id does not match the original's last user id.
If the system is like that and there is no other way to do it, then I guess I will have to return the license because I will not throw away two years of content. =(
Steve Machol
Tue 23rd Nov '04, 12:47am
Honestly I can't follow this. What 'content' is missing exactly?
rlamego
Tue 23rd Nov '04, 1:26am
Hi Steve! The "missing" content is something like 10000 comments and 2000 pictures posted on my community photoblog (photopost ), which was built using IPB and Photopost (http://photopost.com).
Since the IMPEX importer assigns sequential ids to users (and everything else for what I can tell), all the previously linked content using those ids is lost, either pointing to a wrong id or non existing id.
For example, all comments and photos posted by one of my moderators (previously id #4) is now "signed" by a different user with id #5.
Like I said before, vB handles the new ids pretty well, everything on the forum is fine but the rest of the site is broken.
I've made a request for help in the Photopost support forums because I'm really interested on keeping vB.
Jerry
Tue 23rd Nov '04, 8:13am
The origional userid is the importuserid.
Point photopost at that.
Jerry
Tue 23rd Nov '04, 8:24am
I've made a request for help in the Photopost support forums because I'm really interested on keeping vB.
I've come across this before, ImpEx will not force a userid, it can't and would break it.
Though if the column that photopost does a lookup on can be change from userid to importuserid, it will work, as far as I can see.
I've not been through the photopost code, though I would hope that it isn't hard coded.
rlamego
Tue 23rd Nov '04, 5:03pm
Though if the column that photopost does a lookup on can be change from userid to importuserid, it will work, as far as I can see.
Thanks Jerry, I didn't know vB kept the original user id.
This will help solving the imported users but what about new ones, the ones that register on vB itself? Does vB also fills the importuserid db field with the userid?
If it does, I can change all Photopost code to use importuserid. If it doesn't, all new users won't have an id to point to.
Anyway, this is the best news today because I got an answer from the photopost developers stating that there is no solution that doesn't involve huge amounts of work.
Jerry
Tue 23rd Nov '04, 5:12pm
Thanks Jerry, I didn't know vB kept the original user id.
This will help solving the imported users but what about new ones, the ones that register on vB itself? Does vB also fills the importuserid db field with the userid?
If it does, I can change all Photopost code to use importuserid. If it doesn't, all new users won't have an id to point to.
True.
Though it would be very simple to add an incremental counter to the user registration to add a int to importuserid for that user. Custom code, though easy to do.
Anyway, this is the best news today because I got an answer from the photopost developers stating that there is no solution that doesn't involve huge amounts of work.
Can you elaborate on that ? Are their lookups all over the place ?
rlamego
Tue 23rd Nov '04, 5:54pm
That answer was before knowing that vB keeps the importuserid, which I initially think was lost. It would need an import script to reassign the userids nevertheless because they are used everywhere. This is in the database domain though and then there is the files problem.
For example, when a user creates an album and uploads a photo, a folder with his userid is created on the photopost uploads folder and his photo is prefixed with his userid. All files need to be changed.
Jerry
Tue 23rd Nov '04, 7:41pm
Sounds like a lot of work .......
Is the userid used in the storing of the photopost files some where or in the database ?
If I have an image : jerry_001.jpg
and 001 is my user id.
Then I import into vBulletin and jerry becomes 003, then it a case of updating jerry_001.jpg to jerry_003.jpg ?
Would that be the case ?
rlamego
Tue 23rd Nov '04, 8:37pm
Yes, something like that. Concerning file name on the server, your photos and folder need to be changed from /pp_uploads/001/jerry_001.jpg to /pp_uploads/003/jerry_003.jpg
In the db and lucky for me, all file names are stored in the tables without the userid prefix, so the script has just to change each row's owner id field.
Each call made to display a picture in photopost is made using something like img src="/photos/$userid/$userid$filename" and since is it's all dynamic, this all endeavor is possible, otherwise would be a kill.
Jerry
Tue 23rd Nov '04, 9:14pm
well I can see the renaming of the filenames in the /pp_uploads/folder being eaisly scriptable.
i.e. file X replace with Y.
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights