Support Forum
I am in the middle of a tedious process of migrating 12 years worth of posts from a Bravenet forum. Because there is no access to the database I have to add all posts and replies by hand and set the post date and author.
I started doing this with no problems, the topics would appear in the correct forum group, in the correct order based on the amended topic date.
Since the last update ( the one prior to yesterdays) when I add a new topic it now appears at the top of the list instead of in it's correct postion as if it is now being sorted by the real date posted instead of the amended date..
Any ideas on how to fix this so that the forum is listed by the published date instead.
Simon
Hey Simon,
Sounds like a big job.. What update are you referring to - 5.6.3? I don't think there was anything in there to do with ordering topics / posts.
How exactly are you adding topics and posts? Are you doing this within the forum itself and then changing the post timestamp? Or are you doing it in the database?
Off the top of my head I'm pretty sure the only way things are organised is by post / topic date not ID although I could be wrong. I think I will probably need Andy or Steve to put some input in to this one..
Hi Ike
Yes, I am adding topics via the forum and changing the post date and author before posting. Then adding the replies using the same method.
One at a time...........monotonous or what!
Not sure what the revision number was, I updated to the latest today so it would have happened when I applied the previous update. It does seem that they are currently being ordered by topic ID at the moment rather than topic date though.
Yes sounds very tedious. Just out of interest why can't you access the original database? I know people have had success with gConverter (gconverters.com) but I can't find any reference to Bravenet.
I apologise, after some digging posts are actually ordered by ID which makes sense generally speaking - The ID is created as the post is created so ID / date go hand in hand.
You can change the post ID's in the database but you would have to be very careful as you'd have to make sure all references to the ID's match up. Again will have to wait for Andy or Steve to offer any further advice.
Hi Ike
Bravenet is a hosted solution my customer was using, along with half a dozen other services just to build a single site. I am merging everything into a single platform. The issue is that there is absolutely no way to export anything from Bravenet (they do not like you to leave).
Is there any way I can use sph_forumview_query in a theme filter to change the sort order. Have been reading through the forums for clues but there is nothing in the codex about what arguments should be used for sorting by post date.
Simon
Ike is correct that topics are - by default - sorted by the post ID. This is the same as sorting by the post date of course.
But he is also correct that there were no changes made to anything that could effect sort ordering of posts or topics - actually for many, many releases. I really do not see what the update could have done to upset anything like that.
So... if you are adding posts as they should be entered - or as they would naturally be entered - i.e., letting the post ID increment by one for each new post then things should be fine.
If what you are saying is that you want to sort your forums with the oldest topics first - which is an unusual way to do it but I know some users do - then you just need to change the sort settings in the forum admin > options > general display settings.
YELLOW
SWORDFISH
|
I'd just figured that, The earlier ones were in the correct order because I had started from the earliest posts. The problem now is that some people have added new posts which are appearing below the posts I have since been entering.
Is there any way I can force the forum to display based on the post date shown on the topic rather than by ID.
I have seen in the forum that I may be able to use sph_forumview_query as a filter in my theme functions but as the codex is incomplete I am at a loss for what variable to sort by.
The post you linked to is a perfect example actually. Leave out the 'if' conditional of course. And change the 'orderby' property to 'post_date'- use ASC or DESC as preferred.
For the record we use post_id for the sort - which in the normal run of things equates to post_date - simply because being an integer and the primary key column it is going to be faster. No other reason.
YELLOW
SWORDFISH
|