Feng Forum
Support => How To's => : 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
-
There is no way to set this at the current time. You could submit it as a feature request.
-
Shall do thanks...
-
This is something I would like too. ;)
-
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--
-
Could this be done with time slots, too? Would it be a similar edit?
-
Answer: Yes, save for no "print" file. :)