changing topic display order (in php code or db)
I have a large number of topics within a forum that are generated externally with all of them having the same topic start, topic and post date (initial post)
The forum also contains other topics (user added) and of course additional posts which have later times.
The normal display shows the freshest post at the top Which is exactly what is wanted however the rest of the list (the as yet unanswered topics) are listed in an order that seems to be driven by the topic_id. This is not what is required for my site.
I want to change the order of these “unanswered topics” to an alphabetical sequence based on the topic_title.
Examining the table bb_topics and drilling the code from forum.php downwards it appeared that the USE INDEX() given to BB_Query was ‘forum_time’ This index is combined on topic_time and topic_id which explains the normal listing.
I changed this index to a combined topic_time and topic_title(20)
The result was unexpected. The replied topics are still listed first (descending time) however, the unanswered topics are now listed in descending/reverse alphabetical order!
Evidently the DESC sql is being added to the entire query – both time and title.
I have been unable to find out where or find an alternative.
Any suggestions welcome – and I’m quite happy moding the code though would prefer to make this minimal as it could make upgrades problematic.
Thanks in advance
- You must be logged in to reply to this topic.