21310 Posts in 5739 Topics by 2604 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 709 Views |
-
comment order

26 March 2009 at 8:15am
Is there a way to reverse the order of the comments without editing the core code so that the newest comments are at the bottom?
-
Re: comment order

26 March 2009 at 9:54am
Not that I'm aware, but it would be a nice simple feature for managing from the cms.
\sapphire\core\model\SiteTree.php
Line 288public function Comments() {
$spamfilter = isset($_GET['showspam']) ? '' : 'AND IsSpam=0';
$unmoderatedfilter = Permission::check('ADMIN') ? '' : 'AND NeedsModeration = 0';
$comments = DataObject::get("PageComment", "ParentID = '" . Convert::raw2sql($this->ID) . "' $spamfilter $unmoderatedfilter", "Created DESC");
return $comments ? $comments : new DataObjectSet();
}I think changing "Created DESC" to "Created ASC" will do what you want.
Cheers
Aaron -
Re: comment order

26 March 2009 at 10:13am
I agree. I think it would be a nice simple feature for the cms.
That was the code I didn't want to edit, but looks like I don't have a choice. Oh well. Thanks for the response.
Chris
| 709 Views | ||
|
Page:
1
|
Go to Top |


