News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Converting YaBB 1.3.2 to SMF

Started by ChestateeWx, January 29, 2005, 10:06:45 PM

Previous topic - Next topic

ChestateeWx

Everything seemed to go well with the conversion except the date of the posts. They were all marked as being posted Today @ the same time.

Suggestions?

[Unknown]

What sort of time format are the posts using?  Would you be against sending me one of the data files?

It parses dates like "mm/dd/yy at hh:mm:ss" and "hh:mm:ss on mm/dd/yy"... or should.

-[Unknown]

ChestateeWx

The format is mm/dd/yyyy hh/mm

Jan 29th, 2005, 9:53pm
&
Today at 9:49am

Heck no I don't mind sending you some data files. Whatchya need?

[Unknown]

Any file with a date in it would work.  A member data file, a message.. they both should have dates in them.  Even "instant messages" should.

The strtotime function (which is used to handle unknown dates) seems to handle mm/dd/yyyy hh:mm just fine:
D:\Documents and Settings\Unknown>php -r "echo strtotime('01/01/2005 01:01');"
1104570060
D:\Documents and Settings\Unknown>php -r "echo strtotime('01/01/2005 01:01:01');"
1104570061


-[Unknown]

ChestateeWx

Just started from scratch and tried it again. Worked fine. Only things we have noticed so far are... the attachments didn't make it and everyones outbox had been cleared.

I uploaded all the attachments to the "Attachment" dir. But I still do not see the attachments nor the reference to them.

[Unknown]

I'm afraid the converter does not, currently, do attachments.  This is one of the things I plan to add later.

-[Unknown]

bogo

We use the YaBB in Romanian language.
In the YaBB language file there is a line which translate 'at' string in our language.
$txt{'107'} = "la";

In Romanian "la" = "at" so all the messages contains date in this format "date=mm/dd/yy la hh:mm:ss".

All we have to do to import correct dates in SMF is to make a little change in the import script (yabb_to_smf.php).
At the line number 2173 (CTRL-G in Notepad) we have this code which replace the 'at' translated in French and Deutsch:
$field = trim(str_replace(array(' um ', ' de ', ' en '), ' at ', $field));

We must add in the array the translation of 'at' in our language.
For us this mean that we changed the code as follows:
$field = trim(str_replace(array(' um ', ' de ', ' en ', ' la '), ' at ', $field));

I just tested this and works great!!

ChestateeWx

Quote from: [Unknown] on February 01, 2005, 02:38:24 AM
I'm afraid the converter does not, currently, do attachments.  This is one of the things I plan to add later.

-[Unknown]
I'm just glad that I was able to convert what we had  ;D
I suppose that I could leave the old board intact, then at a later time (when you have a converter that will do attachments) port all the attachments over.

Or, will that wipe every thing clean from the date that we start using the SMF format... hummmm??

[Unknown]

I'm afraid that the converter, as current, would do just that.  However, it may be possible to write a converter for just the attachments.

-[Unknown]

ChestateeWx

Quote from: [Unknown] on February 05, 2005, 05:14:42 PM
I'm afraid that the converter, as current, would do just that.  However, it may be possible to write a converter for just the attachments.

-[Unknown]
If you can make one just for attachments, I am sure you will get a raise in pay  ;)

Advertisement: