importing messages as if they were "old"

The 2.0.x discussion forum has been locked; this will remain read-only. The 3.0.x discussion forum has been renamed phpBB Discussion.
Registered User
Posts: 1
Joined: Fri Jun 13, 2008 1:57 pm

importing messages as if they were "old"

Post by mad77 » Fri Jun 13, 2008 2:05 pm

Hi all,
I've a vanilla phpBB2 up and running since some time, and now I want to import in a forum a huge set of old messages (from a mailing list, but it's not an issue).

I've no problems writing a PHP/Python/whatever script to import the messages in the MySQL database (and separating them into topics), but these imported messages show up on top of the forum and that's the thing I want to avoid: these are old message, and I prefer to leave the newer one on the top.

I set topics.topic_time and posts.post_time to appropriate values (taken from the headers of the messages I'm importing), but looks like that by default phpBB2 uses the topics.topic_last_post_id/posts.post_id fields to sort topics.

Assuming that I have more than 100.000 messages to import on a live forum, can anyone think of an easy way to make them look like "old" messages?

Last edited by Jim_UK on Fri Jun 13, 2008 7:28 pm, edited 1 time in total.
Reason: Moved from Converters forum.

User avatar
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: importing messages as if they were "old"

Post by D¡cky » Sat Jun 14, 2008 2:11 pm

phpBB does sort topics by id. The easy way to sort the topics by time in viewforum, is to apply the changes in this post.
Have you hugged someone today?


Return to “2.0.x Discussion”