Plain mailbox import with date/time information [message #8664] |
Fri, 14 February 2003 14:54 |
moozg
Messages: 4 Registered: February 2003
Karma: 0
|
Junior Member |
|
|
Hello,
I have a large (over 150MB) archive of a live mailinglist in plain mailbox format that I would like to import it in FUD forum. I tried to run 'formail -s maillist.php 1' and it worked well with one exception - it has replaced original post date with current import date. Is there an easy way to fix maillist.php to use message date/time instead current one?
|
|
|
Re: Plain mailbox import with date/time information [message #8665 is a reply to message #8664] |
Fri, 14 February 2003 15:06 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Hmmm... that should be possible to do relatively easily, but you will need to modify maillist.php import script.
You will need to make it parse the date from the headers and use that instead of the current timestamp.
FUDforum Core Developer
|
|
|
Odp:Re: Plain mailbox import with date/time information [message #8666 is a reply to message #8665] |
Fri, 14 February 2003 15:15 |
moozg
Messages: 4 Registered: February 2003
Karma: 0
|
Junior Member |
|
|
Yeah, sure, that's pretty obvious, but I am new to FUD and don't know where maillist.php inserts the date to DB. I looked for 'date', 'now' etc. in its code and did found nothing, so I expected it in other file (one of many included).
Can you give me more precise directions where may I find part responsible for message date/time settings?
|
|
|
Odp:Re: Plain mailbox import with date/time information [message #8667 is a reply to message #8666] |
Fri, 14 February 2003 16:15 |
moozg
Messages: 4 Registered: February 2003
Karma: 0
|
Junior Member |
|
|
moozg napisał(a) dnia pią, 14 luty 2003 10:15 | Yeah, sure, that's pretty obvious, but I am new to FUD and don't know where maillist.php inserts the date to DB. I looked for 'date', 'now' etc. in its code and did found nothing, so I expected it in other file (one of many included).
Can you give me more precise directions where may I find part responsible for message date/time settings?
|
OK, I already found this, that after line 595:
$msg_post = new fud_msg_edit;
i added:
if( isset($emsg->headers['date']) )
$msg_post->post_stamp = strtotime($emsg->headers['date']);
and it worked. The second problem is user's autoregistration time...
|
|
|
|