asinshesq wrote: If statement I quoted in my last post above compares the post_id of the last elelment in $postrow['post_id'] to the last_post_id of the topic. If the post_id of the last element in $postrow['post_id'] (i.e. that post_id of the latest post in the topic as measured by post_time) is not the same as last+_post_id of the topic, viewtopic calls sync (which is where the trouble comes from).
Correct, and the problem arises because sync uses the post_id ordering, and not the time. That is (as far as I can tell) a left-over from an older version of phpBB that used the post_id for topic ordering, and it should be changed. On my board it is already changed, but I have no info anymore on whether I did that or if it was part of an update. I just noticed that 2.0.20 code of sync has the old ordering. The problem really is with sync, not with any mod that changes the post time, since the sync function is already "out of sync" compared to the standard viewtopic.php - they use different ways to sort posts in a topic.