View Full Version : PHPBB -> VB3 - Guest users importing problem
fowler
Tue 9th Nov '04, 7:13am
When I import PHPBB to VB3, all messages which were posted by Guest users, under their Guest nicknames, are associated to an new registered username 'Anonymous'.
Now it looks like 'Anonymous' has talked with himself on about 200.000 posts!
Can you make Impex to leave 'Guest' users posts intact and not to associate to 'Anonymous'.
Jerry
Tue 9th Nov '04, 10:39am
If there is no userid associated with a post there is no way of linking it to a user.
Unless there is a username, though if its a guest post then isn't it just that ? i.e. not associated with a user ?
fowler
Tue 9th Nov '04, 11:45am
Unless there is a username, though if its a guest post then isn't it just that ? i.e. not associated with a user ?
That's what I would like to be, just a Guest post with Guest nickname showed, without linking to any username, right now, all guests are imported into one user named Anonymous.
Jerry
Tue 9th Nov '04, 12:20pm
Ok, find out what the userid of the Anonymous user is.
Then update all posts with the userid that matches the Anonymous_user_id and set them to 0.
If vBulletin finds a post with userid 0, it treats it as a guest post.
fowler
Wed 10th Nov '04, 4:35am
Ok,
PHPBB sets poster_id '-1', and VB to '0', so I have changed poster_id to '0' in my PHPBB Dbase before running Impex.
After running Impex all that posts are marked as Guest posts, but Impex didn't import their usernames into 'username' (VB) field, from post_username (PHPBB) field.
What to do now?
Jerry
Wed 10th Nov '04, 10:54am
The phpBB importer gets the username from the poster_id for that post, so the username will be set to what ever that is.
fowler
Wed 10th Nov '04, 11:09am
The phpBB importer gets the username from the poster_id for that post, so the username will be set to what ever that is.
I understand, and that's why I'm wondering why didn't he done that.
He just leaved empty 'poster_id'.
Jerry
Wed 10th Nov '04, 11:37am
I understand, and that's why I'm wondering why didn't he done that.
He just leaved empty 'poster_id'.
I'm sorry I don't understand what you have written or mean, can you explain.
fowler
Wed 10th Nov '04, 12:17pm
I can explain, what I was meaning is, that I understand what you are saying, but don't understand why it doesn't work.
I have looked up into Impex, and I didn't saw how Impex gets Guest username from
'post_username'. Actually he collects usernames by user_id's and then associate them to posts by ID's which means 'poster_useraname' isn't simply copied into 'username'.
-----
$try->set_value('nonmandatory', 'username', $user_names[$post['poster_id']]);
-----
You should make here, if poster_id = 0, to simply copy value from 'poster_username' (phpb) and put into 'username' (vb).
Jerry
Wed 10th Nov '04, 2:34pm
I understand what you mean now.
I have added this code which will do what you want I belive :
if($post['poster_id'] <= 0)
{
$try->set_value('nonmandatory', 'username', $post['post_username']);
}
else
{
$try->set_value('nonmandatory', 'username', $user_names["$post[poster_id]"]);
}
I had to use <= 0 due to variations in phpBB boards.
fowler
Wed 10th Nov '04, 6:14pm
That's it Jerry, thank you.
Tomorrow we continue with other problems :)))
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights