News:

Wondering if this will always be free?  See why free is better.

Main Menu

Converting Database ONLY

Started by BassHunter, May 02, 2005, 07:00:09 PM

Previous topic - Next topic

BassHunter

Hello,
I am currently re-installing a forum that no longer is live. It was running vBulletin 3 and I am looking to change it over to SMF. I have the database.

However, when I pull up the converter, it is asking for the location of the vB installation. I simply want to update the database to run with SMF.

How can this be done?

Thanks in advance,
Erich

BassHunter

Is this possible? Or do I have to buy another vBulletin license and just run that again?

Thanks,
Erich

BigMoneyJim

I may not know what I'm talking about, but....

I'm guessing the converter wants some of vBulletin's config files to get the database host, name and maybe password, and possibly some other items. Do you have a backup of the old software? Maybe you can get away with restoring just the config/settings file. Or you might try looking into faking it out by setting up a fake config file.

Oldiesmann

You simply need to have the old vBulletin config file someplace on the server, and point SMF to that location. Once this is done, SMF should be able to convert everything from there.

jaijaymama

Would this work in the case that coversion from phpBB to SMF via conversion tool doesn't work? At this point I am looking for any option! Thanks!

Oldiesmann

The phpBB converter uses the same method - just pulls the appropriate info from the config file and converts stuff from the database.

jaijaymama

I finally got this to work!  :D

I switched hosts as my previous host did not allow access to my databases, among other things. I have a fairly large database, so I asked my new host to import it for me. I was able to convert to SMF in less than ten minutes - and my datbase is 313MB!!

I'm a very happy chick right now - and my members are ecstatic that we got to keep our user names, post count, and posts! Thanks!

BassHunter

OK, I do not have the vB3 config file. The database was saved, but I have no previous config files. Is there a way or a converter that I can use to update/import this database to run SMF?

If I need the vB3 file, does anyone have an 'extra' copy that they can send along that I can use?

Thanks again,
Erich


Grudge

BassHunter,

Download the converter, and open it up and find the whole function called loadSettings(). Replace it with the code below:


// Load and verify the include files for SMF and the convertee.
function loadSettings($step)
{
global $from_prefix, $to_prefix, $boardurl, $converting_name, $current_step;

$current_step = $step;

if (isset($to_prefix, $from_prefix))
return;

// Check for the password...
if (isset($_POST['db_pass']))
$_SESSION['convert_db_pass'] = $_POST['db_pass'];
else
$_POST['db_pass'] = $_SESSION['convert_db_pass'];

$_POST['path_from'] = substr($_POST['path_from'], -1) == '/' ? substr($_POST['path_from'], 0, -1) : $_POST['path_from'];
$_POST['path_to'] = substr($_POST['path_to'], -1) == '/' ? substr($_POST['path_to'], 0, -1) : $_POST['path_to'];

// Cannot find Settings.php?
if (!file_exists($_POST['path_to'] . '/Settings.php'))
return doStep0('This installer was unable to find SMF in the path you specified.<br /><br />Please double check the path, and that it is already installed there.');


// Everything should be alright now... no cross server includes, we hope...
require_once($_POST['path_to'] . '/Settings.php');

if ($_SESSION['convert_db_pass'] != $db_passwd)
doStep0('The database password you entered was incorrect.  Please make sure you are using the right password (for the SMF user!) and try it again.');

// Persist?
if (empty($db_persist))
mysql_connect($db_server, $db_user, $db_passwd);
else
mysql_pconnect($db_server, $db_user, $db_passwd);

$to_prefix = '`' . $db_name . '`.' . $db_prefix;

// *** Figure out the prefix... ***********************************************
$from_prefix = 'OLD_VB_PREFIX';
// ****************************************************************************

echo '
<div class="panel">
<h2>Converting...</h2>';
}

Replacing OLD_VB_PREFIX with the database name and prefix where your VB database entries currently sit. For example, if your vb files are in a database called 'vBullet' and all begin with the words 'vb3_' it would be:
$from_prefix = 'vBullet.vb3_';

Hope you can make that work :)
I'm only a half geek really...

redlabour

http://www.politikstube.de - die christliche Politikcommunity

Advertisement: