Sort order comments displayed

Hi,

I have see that all comments in topics of Groups, etc have sort order from oldest. Is it possible change this ? to latests . It will be useful because the large number of comments to read latest comments always we are must scroll down screen or slecet bigest number of page to read. I thnik in most case we want to read latest comment and if we want to read all story we can scroll or change pages to go oldest comment.

How to change sort order displayed comments ? I must go to search php code to find ORDER BY date ASC / DESC ?

 

 

  • Comments are annotations, and so are retrieved via get_annotations() and listed via list_annotations(), both of which support changing the ORDER BY clause.  If you want to change it, look in the groups plugin for calls to those functions.

  • Thank you for info. Did you know name this group plugin ?

  • Groups is just called "groups" and lives in elgg/mod/groups

  • Hi Brett do you know of any tutorials or documentations on reversing comments for newbies?

    Thanks

  • If I would know how to do it, I'd write a plugin for the community. If I'd do it anyway, this would only produce the white page of death ;)

    I tried Advanced Comments, which is a good plugin, but causes doubleposts in tidypics. And it only changes the order of comments in event_manager etc., but not in groups. So I deactivated it again. It does not make sense to me to have some comments ordered newest first and some oldest first.

    Maybe I find a way to write the plugin. I will share then. But better don't put too much hope on me there.

  • i am using advanced comments - it works ok for me on all the object types i have tested.
    see here with a tidypics image:

    https://www.infiniteeureka.com/photos/image/4220/cats-in-a-laboratory

    no double posts either.
    sounds like you need to either change the order of the plugins in some way, or you have two or more plugins that are conflicting.

    i am going to add the ability to filter and sort all the main entity lists by available data types in my upcoming plugin 'supajax'. i won't be adding comments features to it for a while though, since commenting is going to change in 1.9 version of elgg to be entities and i would just be making more work for myself.

  • Thanks ura soul, but you could have chosen a nicer picture. Shocking! 

    I will give it a try with reordering my plugins. I'm also looking forward to supajax and fully understand that you won't make unnecessary extra work to yourself. I just hope that I can upgrade to 1.9 without having too many plugins not running....

  • i would look to ensure that advanced_comments is after any other comment based plugin in the list (such as galli comments and comment_tracker).

    re: cats ->better to know true reality, than live a lie. 'nice' is its own form of denial based illness.

  • Yep, is almost last plugin, but I still have double posts. It most likely has problems with some other plugin.