Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Reversed sorting

tmilovantmilovan New
edited November 2010 in Vanilla 2.0 - 2.8
Right now, newest participated discussions are displayed last. It seems to me that it would make much more sense if sorting would be reversed.

Comments

  • I disagree. :) To me, the point is to see easily if one of those discussions has new comments. Am I wrong?
  • But this way (on my forum I have partcipated in 572 discussions) freshest comments are coming out on 12th page. Shouldn't they be on first page instead?
  • remoukremouk New
    edited November 2010
    Oh you're right! Sorry I misunderstood and didn't check properly...

    Those discussions should be ordered by the date of the latest comment, newest first.
  • Line 64 of class.participated.plugin.php. Change:
          return $Sender->SQL->Select('d.*')
    ->Join('Comment c','d.DiscussionID = c.DiscussionID')
    ->Where('c.InsertUserID', $UserID)
    ->GroupBy('c.DiscussionID')
    ->Limit($Limit, $Offset)
    ->Get();
    to
          return $Sender->SQL->Select('d.*')
    ->Join('Comment c','d.DiscussionID = c.DiscussionID')
    ->Where('c.InsertUserID', $UserID)
    ->GroupBy('c.DiscussionID')
    ->OrderBy('d.DateUpdated', 'DESC')
    ->Limit($Limit, $Offset)
    ->Get();
  • I've found that I've had to use:
    ->OrderBy('d.DateLastComment', 'DESC')
    Rather than:
    ->OrderBy('d.DateUpdated', 'DESC')
    to get the sorting order to show the latest activity in the discussion at the top. Just incase anyone else is interested in this.

    Allan
  • @theallan - thanks... without that amendment it shows them in the order that ANY change was last made (even an edit), not the same as the behaviour on the All Discussions tab.

Sign In or Register to comment.