• Home
  • Features
  • Screenshots
  • Installation / Setup
  • Localization
  • FAQ
  • Support
  • ForumPress
  • Guest  

    Welcome Guest, posting in this forum requires registration.

    Pages: [1]
    Topic: sorting problem
    quercus
    Member
    Posts: 1

    Reputation: 0
    sorting problem
    on: November 19, 2011, 19:16

    Hi,


    For some reason since our last update to 1.7 the forum hasn't been sorting it's topics properly.


    We run WP 3.2.1 and ForumPress 1.7


    Usually the topics would sort on date last posted (ascending) but now it looks random.


    If you need the URL, let me know. Not sure if posting an URL is allowed.


    WebNinja
    Member
    Posts: 1

    Reputation: 0
    Re: sorting problem
    on: January 27, 2012, 17:03

    I don't know if you are still looking for a solution to this but I figured out what it is. It was driving me nuts!


    It is caused by the plugin not updating the 'last_post' timestamp right in the threads table. If you go to line 155 in the wpf-insert.php and change the line to:


    $wpdb->query("UPDATE $vasthtml->t_threads SET last_post = NOW() WHERE id = ".(int)$thread);


    This will fix your problem on future post. As a fix to your previous threads you will need to make a script that will take all your threads then look at the last post and take that timestamp and update the thread table with that timestamp.


    It should be noted too, that when a post is deleted it does not go back and change the "last_post" timestamp for the thread…to me this is a flaw that needs to be looked at too since the new post that you just deleted could be days from the one previous it will throw the thread in a weird non-sorted spot in the list.


    Pages: [1]
    WP Forum Server by ForumPress | LucidCrew
    Version: 1.7.4; Page loaded in: 0.017 seconds.