|
Author |
Message |
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 12:08 pm (20 years, 11 months ago) |
|
I am trying to back date a few posts on a phpBB - I'm working out what the timestamp should be and then manually changing it in the database using phpmyadmin. I'm updating both the topic-time and post_time fields in the tables phpbb_topics and phpbb_posts respectively.
Sure enough the dates are changing to what I want in both the viewforum and viewtopic pages however for some reason the sort order in viewforum is totally wrong - instead of sorting by the post_time they are remaining in the order they were posted. So I'm basically getting an order like this:
15 May 2003 10:24 am
12 Feb 2003 08:01 am
30 Jan 2003 08:01 am
18 Feb 2003 08:00 am
15 May 2003 10:14 am
15 May 2003 10:14 am
etc.
They were all originally posted May 15.
I have done this before on another phpBB installation on a different host and it worked perfectly can anyone think of any reason why a different host would make any difference. or any other reason why this is happening.
thanks |
|
|
|
|
Riker
Junior WebHelper
Joined: 01 Mar 2003
Posts: 14
Location: AR, USA
|
Posted:
Thu May 15, 2003 12:15 pm (20 years, 11 months ago) |
|
Cannot think of a reason...did you try resyncing the tables? |
|
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 12:23 pm (20 years, 11 months ago) |
|
I did try resyncing the forum concerned |
|
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 12:33 pm (20 years, 11 months ago) |
|
I've just put the DB details of the phpBB i'm having trouble with in to the config of the phpBB I had no trouble with.
I still get the same problem of the posts I've altered not sorting correctly. so I think that proves theres no problem with the phpBB installtion. It must be something to do with what I'm changing. but what? |
|
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 1:37 pm (20 years, 11 months ago) |
|
Just been looking at the code for viewforum and it would appear (to me anyway) that the topics aren't sorted by post_time but rather by the t.topic_last_post_id.
Probably the reason it worked last time was that I posted them in order e.g. oldest first and then changed the dates. Where as this time I posted in a random order thinking that changing the dates would sort them correctly!
What a complete waste of time that was! |
|
|
|
|
drathbun
WebHelper
Joined: 01 Mar 2003
Posts: 69
Location: Texas
|
Posted:
Thu May 15, 2003 2:39 pm (20 years, 11 months ago) |
|
Yes, phpBB sorts by post_id not by time. I found this out the hard way too.
Our forum was a replacement for a listserv mailing list. We launched the forum, but were still working on converting the archives from the mailing list into phpBB format. Once that was done, I expected to simply load the archives into the db.
Not to be. When the archives were loaded, they got the correct date, but the post id values were all later than the current activity. Talk about a strange looking forum...
Anyway, I took the forum offline, and updated every topic_id to topic_id + 10000 and every post_id to post_id + 40000 and then had to go back and reset every topic or post id in every possible table, plus update links where folks had posted a link to a particular topic (or post) inside the post text... <sigh>
It makes sense, however, when you realize that post_id is a unique key, and therefore sorts faster.
Dave |
________________________________ Dave
Photography Site :: Query Tools Forum :: Weekend Fun |
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Thu May 15, 2003 2:58 pm (20 years, 11 months ago) |
|
Thankfully I've only just started so I simply deleted them and reposted them in the correct order before changing the dates. Sounds like you weren't quite so lucky, that must have been a total nightmare!
You're right though it does make perfect sense that its sorted by id its just I had my self convinced it was by post time |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.177257 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |