Comment Fields on the bottom of pages

Robert Pineres
Contributor
November 8, 2023

Hello Everyone,

 

First of all, thank you for your time to review and comment as well.

 

In the comment field on all pages. I am trying to see if there is a way to change the chronological order from oldest to newest. Instead, be the newest on top and scroll down to the oldest. Is there a way to make this change?

1 answer

0 votes
Nicolai Sibler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2023

Hi @Robert Pineres ,

as an Admin, go to General Configuration → Look and Feel → Custom HTML and paste this in the "At end of the HEAD" section:

<script>
function reverseCommentOrder(){
$comments = AJS.$('#page-comments');
$comments.children().each(function(i,li){$comments.prepend(li)});
}

AJS.toInit(function(){
reverseCommentOrder();
AJS.$('#comments-section-title').append('<a id="page-comments-reverse" href="#">(Change order)</a>');
AJS.$('#page-comments-reverse').css({ 'color':'#999','font-size':'0.65em'}).click(function(e){
reverseCommentOrder();
e.preventDefault();
});
});
</script>

This will display comments in the reverse chronological order and provide a clickable link (Change order next to the comment counter) to change back this order.

Hope that helps!

Regards,

Nicolai

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events