Feng Forum

Support => How To's => : Jon July 16, 2009, 11:23:04 AM

: Comment ordering?
: Jon July 16, 2009, 11:23:04 AM
Hi to all,

Can anyone tell me if there is a way to order the comments in Notes please ( I've checked the manual and searched the forums to no avail)? I'd like to be able to set these so that the latest comment appears first when opening a note.

Many thanks,

Jon
: Re: Comment ordering?
: Pet July 21, 2009, 03:55:47 AM
There is no way to set this at the current time.  You could submit it as a feature request.
: Re: Comment ordering?
: Jon July 21, 2009, 07:40:52 AM
Shall do thanks...
: Re: Comment ordering?
: conrado July 25, 2009, 12:39:20 AM
This is something I would like too.  ;)
: Re: Comment ordering?
: webinstinct December 28, 2009, 01:34:04 AM
Alright, I figured this out. It was too critical for me. I submit this solution with the caveat that I am only about a week into OpenGoo (Feng) and do NOT fully understand the architecture etc. Their code is at the same time ridiculously complex and totally inspiring.  :)

Plus,  I just implemented this solution. So for all I know, I solved one problem and created another. But here is what I did:

IN THIS FILE: application/models/comments/Comments.class.php
CHANGE SORT ORDERS to:  `created_on` DESC  (4 of them)

This will display the comments in the correct (reverse) order. But the numbering will still be ascending (1..2..3..etc.). To change the numbering (3..2..1..):

IN THIS FILE: application/views/comment/object_comments.php
AND THIS FILE: application/views/comment/object_comments_for_print.php
CHANGE  $counter=0  TO  $counter=count($comments)+1
AND CHANGE  $counter++  TO  $counter--

: Re: Comment ordering?
: dabrowski June 23, 2011, 09:36:43 AM
Could this be done with time slots, too? Would it be a similar edit?
: Re: Comment ordering?
: dabrowski June 23, 2011, 09:44:01 AM
Answer: Yes, save for no "print" file. :)