Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How to invert the sort of comments ?
Hello,
It’s in the Subject !
I haven’t found the way to invert the way that TXP sort the display of comments.
Even if I look in the source (comment.php), I’m not abble to find where TXP put the “asc” or “desc” that sort comment.
françois.
françois
Offline
#2 2005-12-10 19:29:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: How to invert the sort of comments ?
There’s no way to change the sort order of comments, so you haven’t missed anything.
848 of taghandlers.php is the line to change. Alternatively, you can try using CSS, by wrapping the contents of the “comments” form in a div, and setting it to float: right
.
Offline
Re: How to invert the sort of comments ?
Cool Mary !
You can look HERE at what I was thinking of : the request of my “customer” was to : 1) display the comments form at the top of the article and before comments 2) add a field for peoples “country” 3) to sort all comments from newer to lastest. This is done.
Many thanks,
françois.
françois
Offline
#4 2005-12-12 07:35:51
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: How to invert the sort of comments ?
low_discuss (Justin Low) :
An alternative to Textpattern’s built-in comments functions
Not developped anymore… but still working ! ;)
Ther is a sortdir:asc/desc
function
Last edited by Niconemo (2005-12-12 07:36:56)
Nico
Offline
Re: How to invert the sort of comments ?
I’ve found this thread because I also wanted to have the comments sorted in descending order. If anybody else is interested as well, this is only to update Mary’s answer for the current version.
In publish/taghandlers.php, line 906, I’ve changed
from: “parentid=’$id’ and visible=”.VISIBLE.” order by posted asc”);
to: “parentid=’$id’ and visible=”.VISIBLE.” order by posted desc”);
and it works.
Offline
Pages: 1