Latest Comment at Top of Comments

I have been trying to have it so that when someone leaves a comment, it is added to the top of the comment list instead of at the bottom.  Can anyone offer assistance to me on doing this task?

Geeks, making the world a better place
Quote · 28 Sep 2012

Well i know the sort order is newest first and it appears first after the page is reloaded, but i am asuming you want it added at the top on the fly the moment the post button is clicked.

Open inc/js/classes/BxDolCmts.js

At about line 428 look for this.

                //--- Some number of comments already loaded ---//
                if(oParent.find('li.cmt:last').length)
                    oParent.find('li.cmt:last').after(s);


Change to this.

                //--- Some number of comments already loaded ---//
                if(oParent.find('li.cmt:first').length)
                    oParent.find('li.cmt:first').before(s);

https://www.deanbassett.com
Quote · 28 Sep 2012

Thank you, I was looking in BxDolCmts.js; however, I  was looking down at the section:

// submit comment and show it after posting

The users on the test site kept asking for this so I thought I should add it and see how it works.

 

Again, thanks for your help. 

Geeks, making the world a better place
Quote · 28 Sep 2012

Follow up, works like a dream.  Once again thanks for pointing me in the right direction.

Geeks, making the world a better place
Quote · 28 Sep 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.