Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Reversed sorting

tmilovantmilovan New
edited November 2010 in Questions
This discussion is related to the Participated Discussions addon.
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.