Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m still struggling with this one – and it seems everyone is flummoxed as well.

    The problem has evolved a bit.

    I’m looking to change the default topic list view not only as described above but also to give the user the option by clicking a image button in each header to change the display order. Also taking the view count out and into a column. So a user can view the most viewed as well as most posted as well as the freshest – all sub listed by ascending alphabetical order.

    Although i can change the image buttons and the raw sql for ordering the data – I still cannot get my head round how it is currently working (or should that be not working) :(


    Cathy Tibbles
    Member

    @multitalentedmommy

    I am also trying to change the order of the topics on the front page


    canada87
    Participant

    @canada87

    Any updates on this? It’s tricky sorting topics.


    marksedgwick
    Participant

    @marksedgwick

    Bump!

    I know this would create another DB call, but surely this option should be a no brainer for the users. this appears to be a un-popular issue for users..

    is bbpress not listening or addressing this request?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.