News:

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

Main Menu

VBulletin to SM Help

Started by Rattlehead.ie, January 03, 2006, 03:39:13 PM

Previous topic - Next topic

Rattlehead.ie

Ok guys, I need help and a few questions answered if possible.
   1) Is it possible to run both vbulletin and SM Forum off the same Database i.e if someone posts in the SM version it also apears in the VB version.
  2) Is Im having problems converting vb 3.5 to SM (latest). I keep on getting an error message about unable to find the vb install path or the database for it. I will update with exact errors as soon as I try this once more.


Thanks for the help in advance

xenovanis

1: No
2: Probably the converter is not working with SMF 1.1 RC2. Try 1.1 RC1 or 1.0.5. Also, if you are using different databases, make sure the user for the SMF database has access to your vB database and vice versa.
"Insanity: doing the same thing over and over again and expecting different results."

Rattlehead.ie

I have done that! The error I get is!

Notice: Undefined variable: dbname in /home/rattle/public_html/chat/vbulletin3_to_smf.php on line 125

Notice: Undefined variable: tableprefix in /home/rattle/public_html/chat/vbulletin3_to_smf.php on line 125

Converting...
Sorry, the database connection information used in the specified installation of SMF cannot access the installation of vBulletin 3. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.


I have made sure that the user has full access to both VB database and the SM database

xenovanis

#3
Strange. What version of SMF?

Also, see:
http://www.simplemachines.org/community/index.php?topic=50642.msg358880#msg358880

Maybe that helps.
"Insanity: doing the same thing over and over again and expecting different results."

TheMaTrIx

I hardcoded the VB database and tableprefix into the converter files, that worked.

There are some other things that need to be changed to compensate for fieldnames that are named differently between RC1 and 2.

Also, if your VB install has category's and board ID's over 255, you need to alter a few fields in the database to be able to handle ID's larger then 255.

After doing these things I succesfully converted a 5000 member 9000 PM's 5000 threads 50000 posts 3000 attachement test database to SMF 1.1RC2.


Rattlehead.ie

#5
QuoteStrange. What version of SMF?

1-0-5.

Im going to try 1-1 RC2 see if that works.

Ok Ive setup 1-1 RC 2 and get this error

"The installation of SMF in the path you specified is not a version this converter can deal with. If it is older than SMF 1.0, you need to upgrade first. If it is newer, you need to use a different converter."

This is obviously that the converter on the download page isnt for the RC 2 of 1-1 is there a converter out for this version of SM yet?

Aaron

You'll need a different converter for SMF 1.1. You can find that one here.

Please note that these converters convert to SMF 1.1 RC1, and not to RC2 (yet). You might have to run upgrade.php found in the RC2 update package.

Hope this helps,
Aaron.

Rattlehead.ie

#7
Ok what I have decided to do is to go for 1-1 RC1, then convert and then upgrade the forum itself.
I install 1-1 RC1 no problems, all good, when I go to convert the system from vb3.5 to smf 1-1 rc1 I get this error


QuoteNotice: Undefined variable: dbname in /home/rattle/public_html/chat/convert.php(331) : eval()'d code on line 1

Notice: Undefined variable: tableprefix in /home/rattle/public_html/chat/convert.php(331) : eval()'d code on line 1
vBulletin 3 to SMF Converter

Sorry, the database connection information used in the specified installation of SMF cannot access the installation of vBulletin 3. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: Incorrect table name 'user'

This is driving me nuts, I have tried everything that I can think of. Any help guys?Im not so hot with my php coding.
I got the convert.php and the vbulletin3_to_smf.sql file for this.

TheMaTrIx

#8
In the converter sql file vbulletin3_to_smf.sql you have a line:

---~ from_prefix: "`$dbname`.$tableprefix"
---~ table_test: "{$from_prefix}user"

if the VB install doesn't use a table prefix, change the first line to:

---~ from_prefix: "`$dbname`."

It should work then.

If it doesn't (like with me :p) try:

---~ from_prefix: "`fillinyourdatabasesname`."

Fillinyourdatabasesname offcource means you should replace "fillinyourdatabasesname" with the actual name of your database.


Rattlehead.ie

Ok I had to do the fillinyourdatabase bit and it got slightly working Im getting this now :


Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting smileys... Successful.
Converting attachments... Successful.
Converting avatars... Unsuccessful!
This query:

    SELECT ca.userid AS ID_MEMBER, ca.avatardata, ca.filename, u.avatarrevision
    FROM (`rattle_forum`.customavatar AS ca, `rattle_forum`.user AS u)
    WHERE u.userid = ca.userid
    LIMIT 0, 500;

Caused the error:

    Unknown column 'ca.avatardata' in 'field list'



Then try again,keep doing it same response,unfortunatly the SMF forum now has no catagories in it at all as the convert didnt complete

TheMaTrIx

look up avatardata and change it to "filedata"

Next error you'll get is:

Recalculating forum statistics... Unsuccessful!

This query:

    UPDATE `rattle_forum`.boards
    SET ID_LAST_MSG = 391371, lastUpdated = 1135810468
    WHERE ID_BOARD = 19
    LIMIT 1;

Caused the error:

    Unknown column 'lastUpdated' in 'field list'

lastUpdate is now ID_MSG_UPDATED.

Then later run these query's:

UPDATE pm_recipients
SET labels = '-1'


UPDATE members
SET messagelabels = ''

TheMaTrIx

#11
After those fixes, the converter will finish the conversion itself and then go on to "Recallculating blablabla" and go in a loop there.

You can safely exit the convert there and run the recalculate from the admin panel.

After you did a successfull convert with these changes in the script, delete the database, recreate it, install a fresh SMF 1.1 RC2 and do the following:

Since you said something about categories not showing right, do the following:

Goto the categories table, find ID_CAT and do an ALTER on it to be mediumint(8) instead of tinyint(4) like it is now.
Goto the boards table, find ID_CAT and do an ALTER on it to be mediumint(8) instead of tinyint(4) like it is now.

This will alow SMF to set category and board numbers higher then 255. VB never reuses board ID's once they have been used, so if you have a lot of boards and created/deleted quite a few boards since you started the site, the ID can be well over 255.

The change to mediumint will help SMF with that.

Now, if those changes are done, you can run the modified convert script up to the point where it goes into a loop.
When it gets to the loop, your done, you can exit the script, goto your admin area, recallculate statistics manualy and of you go with a nice working SMF board.


ps. its:

mediumint(8)

not that smiley :p

Rattlehead.ie

Matrix thank you so much appreciate it.
All these changes are done in the vb_tosmf.sql file correct? just want to make sure
Ill let u know how I get on at work atm

TheMaTrIx

#13
No, the ID_CAT stuff you should do manualy as query's in phpmyadmin or whatever else you use to access your database.

The rest is done in convert.php and vbulletin3_to_smf.sql

I use MySQL Administrator in windows, just click field and change :p

But in query language I guess it would be something like(as explained in another thread I'm to lazy to dig up :p)


ALTER TABLE smf_categories
DROP PRIMARY KEY,
CHANGE COLUMN ID_CAT ID_CAT mediumint(8) unsigned auto_increment PRIMARY KEY;

ALTER TABLE smf_boards
CHANGE COLUMN ID_CAT ID_CAT mediumint(8) unsigned NOT NULL default 0;


Do that before you do any converting ok. Dropping the primary key will drop the data too, so it has to be done before you put any conversion data in the database.

SCANNA

I get this error help please as im lost now   :(




Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting smileys... Successful.
Converting attachments... Successful.


Converting avatars... Successful.
Recalculating forum statistics... Unsuccessful!
This query:
UPDATE `scanzso_smf`.smf_boards

SET ID_LAST_MSG = 8278, ID_MSG_UPDATED = 8278

WHERE ID_BOARD = 2

LIMIT 1;
Caused the error:
Unknown column 'ID_MSG_UPDATED' in 'field list'

Oldiesmann

That's the last step in the converter, so you should be able to ignore that error. Go to SMF, click on "Admin", then click "Forum Maintenance" and choose "Recount All Totals and Statistics" - that will do the same thing that the converter was attempting to do, and should work without any problems.
Michael Eshom
Christian Metal Fans

SCANNA

It did I had found a post about phbb and smf with the same error and tried it works fine thank for your time. :)

Advertisement: