PDA

View Full Version : Importing new posts into vBulletin


07-31-2000, 07:24 PM
Hi everyone!

I posted this a couple weeks ago in the PHP coding section, but really didn't get any suggestions and I have been stumbling trying to do this myself. I was wondering if I could hire anyone that might be interested in writing this for me and that had a couple hours of free time.

Here is the original request:

I need to import a large number of email messages that I have stored in an Access database into vBulletin.

I guess my first step should be taking my Access data and importing it into MySQL. I think I can do this using PHPMyAdmin pretty easily, I see it handles CSV data files which I can dump from Access.

Now comes the 'difficult' part, at least for me. I need to read all of these email records by their normalized subject (the subject without the RE or FW prefixes in it), create a new thread if it doesn't already exist for that subject, then create the post itself.

My import table looks like this (this is the standard table layout created from the Outlook to Access import utility):


Table_Name Data_Type Sample_Contents
ID LongInt(4) 32193
Importance LontInt(4) 1
Icon Text(255) IPM.Note
Priority LongInt(4) 0
Subject Text(255) RE: Question about something
From Text(255) Chris Schreiber
MessageToMe Yes/No 0
MessageCCMe Yes/No 0
SenderName Text(255) owner-list@mydomain.com
CC Text(255)
To Text(255) list@mydomain.com
Received Date/Time 7/7/2000 2:59:32 PM
MessageSize LongInt(4) 3023
Contents Memo This is my question here
Created Date/Time 7/7/2000 2:59:32 PM
Modified Date/Time 7/7/2000 2:59:32 PM
SubjectPrefix Text(255) RE:
HasAttachments Yes/No 0
NormalizedSubject Text(255) Question about something
ObjectType LongInt(4) 5
ContentUnread LongInt(4)


I put the fields I think I need to use in bold. I tried start writing something based on the import.php script, I thought it might be a place to start, but there alot in there I don't think I will need to do.

Thanks,
-Chris

08-02-2000, 02:35 AM
Sure, it could be done.

Question:
How would you determine the order posts would go into on a thread? By date? Sometimes mail lists screw up and send out replies before the inital message, which would be quite confusing when reading a thread.

08-02-2000, 02:54 AM
Yes I was thinking about having them go into the thread by email date & time. I know they aren't always in order, but most of them are in pretty good order, the listserver is pretty fast at getting the messages out. I know there will be some that are missing or out of order though. This is just alot of content I'd love to add to my site.

-Chris

08-02-2000, 02:58 AM
Alright, then it won't be much of a problem. Assuming you get all the data into mysql (I'm very unfamiliar with access :)), I should be able to setup some sort of script to import the data.

08-02-2000, 03:01 AM
That would be great! I know I can export the data from access and import into MySQL pretty easily, the script was just the hard part for me :)

Thanks,
-Chris

12-06-2000, 08:32 PM
I dunno how you're doin' with this, but as a great trick for dealing with databases imports where some fields don't look exactly like you want
stick it in excel,
then use the autosort feature, it will provide a dropdown box for each field,m and you can easily see if data is looking different. So in one shot you can list all records starting with FW: