How to change the display of comments in a publication

Carloni Franck Posted in General Discussion 3 years ago

Hello, I don't know if this question has already been asked but is it possible to change the way discussions are displayed in a publication? I would like the most recent comments to come first.

Replies
us Undu Jangi Replied 5 months ago

snake io right now, it works for me. Later, I'll see about moving the block to the top of the comment. If you wanted to modify the inserting portion, you would also need to make some further changes to the Javascript code.

vn Drew Binsky Replied 11 months ago

Yes, The way discussions are presented in a publication can be changed. Usually, the content management system (CMS) or discussion platform of the publication ovo game determines the order in which comments are shown.

Byelorussian Carloni Franck Replied 3 years ago

Thank you very much, it works quite well. For the moment it suits me, later I'll see to move the block to comment up.
Thank you for your help

German Michael Zülsdorff Replied 3 years ago

Well,
a first idea would be to reverse the order of found comments in
components\OssnComments\plugins\default\comments\post\comments.php
and the other 2 files in the same directory by changing
foreach ($comments as $comment) {
to
foreach (array_reverse($comments) as $comment) {
which results in a view like
enter image description here
The irritating part starts when adding the next comment c3
which wouldn't be inserted on top but at the bottom like
enter image description here
Refreshing the page would show the correct order of course
enter image description here

but all in all this solution isn't really satisfying to my opinion and appears as only half-done.
So it would also need some more changes in the Javascript code if you want to change the inserting part.