Changing the order of topics [message #38695] |
Wed, 22 August 2007 20:48 |
nickimachler
Messages: 17 Registered: June 2007
Karma: 0
|
Junior Member |
|
|
I'm wondering if there is a way to make the topics within the forum appear from newest to oldest. Currently, the forums are listed from newest (at the top) to oldest (at the bottom) and I think it woudl be nice to be consistent among the topics as well. Please advise. Thanks!
|
|
|
|
|
|
|
|
|
Re: Changing the order of topics [message #38959 is a reply to message #38956] |
Mon, 10 September 2007 23:35 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
In order for the topic order to be changed the forum's code inside th_adm.inc.t needs to be modified. Instead of sorting topics based on the time of the last posted message, but rather based on topic creation the following functions need to be modified:
th_reply_rebuild() this function can be made into NOOP
rebuild_forum_view_ttl() this needs to use the post_stamp of the root topic message to sort topics rather then the last message as it does now.
FUDforum Core Developer
|
|
|
|
|
Re: Changing the order of topics [message #38988 is a reply to message #38987] |
Wed, 12 September 2007 18:28 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The file is located inside the src/ directory of the forum, which itself is located inside the data root directory.
FUDforum Core Developer
|
|
|
Re: Changing the order of topics [message #38993 is a reply to message #38695] |
Wed, 12 September 2007 18:42 |
nickimachler
Messages: 17 Registered: June 2007
Karma: 0
|
Junior Member |
|
|
I have found the files, but which one exactly do I need to modify? I just want to order the posts from NEWEST to OLDEST within a Topic. You mention 2 different files, th.inc.t and th_adm.inc.t. Do I need to modify BOTH of these files or just one of them? Can you just provide me with the new code that is needed to make this change? Or can you please tell me exactly what piece of code needs to change within what function?
Also, in looking at both of those files, all functions within them ARE ALREADY SORTED in DESC order. Nowhere do I see anything being sorted in ASC order. Which SELECT statement are you talking about and which one specifically needs to be altered?
Thanks,
Nicki
[Updated on: Wed, 12 September 2007 18:47] Report message to a moderator
|
|
|