Help importing special fields

aharown07 - December 12, 2008 - 20:58
Project:vBulletin to Drupal
Version:5.x-1.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

We have several profile fields in our vB database that I don't think are standard... name (not acct name), location, interests, occupation, etc.
I've got fields set up in profile in Drupal but they're--pretty much as expected--empty after the import. What I'd love to do is edit the module so it will import the vB fields into the Drupal fields I've made. ... or is there something I can do on the vB side before import that will facilitate that?

#1

Liam McDermott - December 13, 2008 - 17:54

You'd have to edit the module, yes. If you create a patch that would automatically detect and import custom fields, I'd be happy to include it in this module. However, I suspect that the vBulletin database schema doesn't lend itself to doing that (I could be wrong).

It should be possible to add a few extra queries when users are being imported ( _vbtodrupal_convusers() ), probably using the SQL for existing profile fields, such as Skype, Location, Occupation, etc.

If you are going to submit a patch, make sure: 1) to get MySQL to do as much of the work as possible 2) that PHP does as little as possible; 3) the queries are as simple as possible, split tasks into multiple queries if necessary. Also, this was my first module, so the coding style isn't great. :)

#2

aharown07 - December 13, 2008 - 17:57

My sql and php skills are quite rudimentary, but I'll see what I can figure out. If this was your first ever module that actually could be a really good thing when it comes to my being able to figure it out. (-:

#3

aharown07 - December 14, 2008 - 19:02

Looking more closely at the import results, I see that just about all of my vB fields imported... the import process apparently added them as user_occ user_gender user_from user_interests, etc.
Looks only maybe two fields didn't import. Am I correct that the user_occ etc. ones I mentioned are standard vB fields? I'm guessing it's just whatever custom ones someone added that don't import. Sound like I'm on the right track so far?

#4

Liam McDermott - December 17, 2008 - 04:31

Am I correct that the user_occ etc. ones I mentioned are standard vB fields?

Yes, I believe they are.

I'm guessing it's just whatever custom ones someone added that don't import. Sound like I'm on the right track so far?

Yep. :)

 
 

Drupal is a registered trademark of Dries Buytaert.