Change the order of answers in the Forum

Johannes Genberg Posted in Component Development 5 years ago

Hello

For some reason the Forum shows newest answers first and oldest last, which is pretty much the opposite of how every forum works and my users complains about it.

Is there a way to make newest showing last instead?

Replies
se Johannes Genberg Replied 5 years ago

That did the trick. Thanks :)

German Michael Zülsdorff Replied 5 years ago
se Johannes Genberg Replied 5 years ago

Hi. The thing is it already looks like this:

                $vars = array(
                    'type' => 'forum:topic:reply',
                    'order_by' => 'a.id DESC',
                    'subject_guid' => $subject_guid
            );

but it still show from newest to oldest.

se Johannes Genberg Replied 5 years ago

Hi. I can't program. What should I change it into?

se Johannes Genberg Replied 5 years ago

OK, change into what?

Indonesian Arsalan Shah Replied 5 years ago

You may change that in components/Forum/classes/Replies.php
change $vars array with for descending order :

            $vars = array(
                    'type' => 'forum:topic:reply',
                    'order_by' => 'a.id DESC',
                    'subject_guid' => $subject_guid
            );