PDA

View Full Version : Ezboard Conversion



lazserus
Wed 21st Apr '04, 2:16am
My board was converted from Ezboard a long while back. A lot of members still user the same username, but of course the old Ezboard posts show up as guest posts and don't count for member original post count.

If the username is the exact same, isn't there a way to tell vBulletin that the previous posts are part of a member's post count?

It's not detrimental, but sure would be nice.

Jerry
Wed 21st Apr '04, 9:27am
I can think of a way of doing it but it would take some SQL and a script to get it to work I think. i.e.



select count(*) from post where username='Jerry';


Would get it for one user.

Personally I'd do it in a while loop for each user and update that user in sequence. i.e.



$user_names = $db->query('SELECT username FROM user');

while ($one_name= $db->fetch_array($user_names))
{
$sql = "select count(*) as post_total from post where username='" . $one_name['username']. "';
$post_total = $db->query_first($sql);
$db->query('UPDATE user SET posts=' . $post_total['post_total'] . ' WHERE username ='" . $one_name['username']. "';
}


or something like that :)

Disclaimer : Off the top of my head and un tested.

lazserus
Wed 21st Apr '04, 12:34pm
Thanks. It's a little bit out of my league, so I'll just leave it for now.

Jerry
Wed 21st Apr '04, 12:52pm
Ok, though I'll write a script to do it if you like :)

lazserus
Wed 21st Apr '04, 1:01pm
Man, that would rock beyond anything. If it's no trouble I'd be more than delighted to be able to do this quickly and painlessly. :D

Jerry
Wed 21st Apr '04, 1:05pm
Ok, I'm going out now to a bass lesson, I'll be back in 3 hours or so, so I'll get it done then.

sean289855
Wed 21st Apr '04, 2:47pm
Does anyone know if the ezboard conversation would work for a proboards since they are both Internet based boards

Jerry
Wed 21st Apr '04, 3:23pm
Man, that would rock beyond anything. If it's no trouble I'd be more than delighted to be able to do this quickly and painlessly. :D

Give this a go, you'll have to put it some where you can browse to and there is a bit of config at the top of the file also it will take a while as its not very efficient but it should get the job done.

Also BACK UP YOUR DATABASE BEFORE USING IT..

Jerry
Wed 21st Apr '04, 3:25pm
Does anyone know if the ezboard conversation would work for a proboards since they are both Internet based boards

Freddie, wrote and looks after the ezboard importer, I can't answer that one.

Freddie Bingham
Wed 21st Apr '04, 7:01pm
It won't work, without modifications, on anything other than Ezboard.

Also there are scripts at vb.org that will hook guest posts up to registered users of the same name.

lazserus
Wed 21st Apr '04, 9:29pm
Give this a go, you'll have to put it some where you can browse to and there is a bit of config at the top of the file also it will take a while as its not very efficient but it should get the job done.

Also BACK UP YOUR DATABASE BEFORE USING IT..
Well, I ran your script and it gave me a "Users Done" immediately after running it. I checked everything and the post counts aren't any different than before, but at least there aren't any db problems. :P

So, it didn't take more than 5 seconds to run and I filled in the config info at the top. :D Should I run it in a certain dir?

Jerry
Wed 21st Apr '04, 10:10pm
Ah well :) worked for me, check you PM's.

lazserus
Sun 12th Sep '04, 3:54pm
I'm firing this one back up. I've raped vb.org for everything it has and nothing seems to work the way I want it to. I've probably got about 50+ members (maybe more) that I'd need to convert. I just need a way to link the Guest posts with the same registered username.

Jerry
Mon 13th Sep '04, 7:50am
I'm firing this one back up. I've raped vb.org for everything it has and nothing seems to work the way I want it to. I've probably got about 50+ members (maybe more) that I'd need to convert. I just need a way to link the Guest posts with the same registered username.

Just to recap, the posts have the correct user name, though are showing as guest posts (so an userid of 0). So the posts can be matched to the correct user via the username ?

lazserus
Thu 23rd Sep '04, 4:25pm
EXACTLY! The usernames match up but apparently the userid is 0, thus not matching the database of posts. Therefore they are not being counted as posts and are being labeled as guests. I'm trying to get a friend to write me a script that will change this, but it's taking forever.

squall14716
Thu 23rd Sep '04, 5:00pm
If you have MySQL 4, I believe you can run a multi-table update query.


UPDATE post, user SET post.userid=user.userid WHERE post.username=user.username;
UPDATE thread, user SET thread.postuserid=user.userid WHERE post.postusername=user.userid;

Something like that should work.

Jerry
Fri 24th Sep '04, 8:01am
Impex could do that very eaisly, as it can match on email, username or userid.

PM me when you read this and I'll explain so you script writer can have a go if you like.