users and post converted from vbulletin 5.1.4 to phpbb3.1.3

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Locked
danny19811981
Registered User
Posts: 7
Joined: Wed Feb 25, 2015 4:27 pm

users and post converted from vbulletin 5.1.4 to phpbb3.1.3

Post by danny19811981 » Wed Feb 25, 2015 5:49 pm

Hello

Since there is no converter for 5.1.4 to phpBB3.1.3 (or any other version).
I have converted all users from a vbulletin 5.1.4 board by importing the user tables

Code: Select all

$connection = mysqli_connect(DB_HOST, DB_LOGIN, DB_PASSWORD, DB_NAME);
//mysqli_select_db(DB_NAME) or die('Could not select database');

//vbulletin user table
$r = mysqli_query($connection,"SELECT userid,username, LCASE(username) as userclean, email, joindate, posts, birthday, ipaddress FROM user");
while ($t = mysqli_fetch_array($r))
{

phpbb user table
$y = mysqli_query($connection,"INSERT INTO phpbb_users (user_id, username, username_clean, user_email, user_regdate, user_posts, user_birthday, user_ip) 
VALUES ('".$t['userid']."','".$t['username']."','".$t['userclean']."','".$t['email']."','".$t['joindate']."' ,'".$t['posts']."' ,'".$t['birthday']."' ,'".$t['ipaddress']."' )");

I also imported all the topics (manually) and the posts like this:.

Code: Select all

$connection = mysqli_connect(DB_HOST, DB_LOGIN, DB_PASSWORD, DB_NAME);
//mysqli_select_db(DB_NAME) or die('Could not select database');
function getField($table,$comparefield,$field,$value,$spatie='') 
	 {     
	 $connection = mysqli_connect(DB_HOST, DB_LOGIN, DB_PASSWORD, DB_NAME);    
	 $query = "select ".$field." from ".$table." where ".$comparefield." = '".$value."' ";    
//echo $query;
	 $result = mysqli_query($connection,$query);
	 if ($q = mysqli_fetch_array($result))
		 if ($spatie == 1)
		 {
		 return $q[''.$field.''];
		 } else {
		 return str_replace(' ','',$q[''.$field.'']); 
		 }
	 }	
	 
// nodes from vbulleting	 
$r = mysqli_query($connection,"SELECT nodeid as topic_id,rawtext FROM text")or die (mysqli_error($connection));
while ($t = mysqli_fetch_array($r))
{
	$forum_id = getField('phpbb_topics','topic_id','forum_id',$t['topic_id']);
	$poster_id = getField('node','nodeid','userid',$t['topic_id']);
	$subject = getField('node','nodeid','title',$t['topic_id']);

//echo "INSERT INTO phpbb_posts (topic_id, forum_id,poster_id, poster_ip,post_approved,enable_bbcode,enable_smilies,enable_sig,post_subject,post_text) 
//VALUES ('".$t['topic_id']."','".$forum_id."','".$poster_id."','127.0.0.1','1' ,'1' ,'1' ,'1','".$subject."','".$t['rawtext']."' )<p>";
$poster_id = $poster_id + 1000;
$created = getField('node','nodeid','created',$t['topic_id']);

// insert in phpbb_posts
$y = mysqli_query($connection,"INSERT INTO phpbb_posts (post_time,topic_id, forum_id,poster_id, poster_ip,post_approved,enable_bbcode,enable_smilies,enable_sig,post_subject,post_text) 
VALUES ('".$created."','".$t['topic_id']."','".$forum_id."','".$poster_id."','127.0.0.1','1' ,'1' ,'1' ,'1','".$subject."','".mysqli_real_escape_string($connection,$t['rawtext'])."' )");

}
Now i have set the right permission, but still see guests?? So the topics and posts are shown, but not the reply's? What am i doing wrong??

Another question, is it possible to edit the password file from phpbb, so i can use the same hashcode from vbulletin? that way the users do not have to renew their passwords.

wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: users and post converted from vbulletin 5.1.4 to phpbb3.1.3

Post by wired076 » Mon Mar 02, 2015 7:23 am

Hi danny19811981 ,

Sorry for the late reply.

Not sure if you are still trying to work this one out but I have been able to find the following information that may be able to help you:

viewtopic.php?f=65&t=573355 -> Pentapenguin suggests converting from vBulletin to phpBB2 and then upgrade to 3. This was back in 2007 so not sure how much of a help that would be.

There is a vBulletin to phpBB converter thread here - viewtopic.php?p=13252438#p13252438 . it is for vbulletin 4.0 but perhaps it is still relevant. THere is an updated version in this particular post - viewtopic.php?f=65&t=1968375&start=150#p13252438

Have a look at this threads as a starting point and have a search in the forums to see if there is anything else that can assist.

I haven't been able to find anything relating to a vbulletin 5.x converter to phpBB as yet. Not sure whether the 4 one will work but you could give it a try just make sure before starting anything like this that you take a backup of your database and keep it in a safe spot in case its needed.

Please let us know how you go.

Locked

Return to “[3.1.x] Convertors”