1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"Oldest First" Report comments

Discussion in 'Styling and Customization Questions' started by Nudaii, Feb 10, 2012.

  1. Nudaii

    Nudaii Well-Known Member

    Howdy is there a way to make the report comments show chronologically (Oldest First)?

    As the staff at the forums i tech admin may find it alittle confusing with newest first
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Change the DESC to ASC. That should do it:

    	public function getActiveReports()
    		return $this->fetchAllKeyed('
    			SELECT report.*,
    				assigned.username AS assigned_username
    			FROM xf_report AS report
    			LEFT JOIN xf_user AS assigned ON (assigned.user_id = report.assigned_user_id)
    			LEFT JOIN xf_user AS user ON (user.user_id = report.content_user_id)
    			WHERE report.report_state IN (\'open\', \'assigned\')
    			ORDER BY report.last_modified_date DESC
    		', 'report_id');
    For a more permanent solution you can create an addon that extends XenForo_Model_Report::getActiveReports.
    Nudaii likes this.
  3. Nudaii

    Nudaii Well-Known Member

    thanks jake!

Share This Page