Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-10 17:08:18

Alex007
Member
Registered: 2007-10-24
Posts: 57

comments sortby latest date / time

Hi All

I am trying to list comments in latest date order but they dont seem to be doing what i want ;(

<txp:comments sortby="posted" />

its showing the oldest at the top like so

Your Comments

  1. Message: Posted by: xxxx · Jul 3, 03:17 pm
  2. Message: Posted by: xxxxx · Jul 7, 08:41 am
  3. Message: Posted by: xxxx · Jul 7, 09:43 am
Can anyone see what i have done wrong? Thanks Alex

Last edited by Alex007 (2008-07-10 18:25:33)

Offline

#2 2008-07-10 17:56:30

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: comments sortby latest date / time

Try this:

<txp:comments sort="posted DESC" />

The default is to sort ASCending, I think.

Last edited by ruud (2008-07-10 19:07:49)

Offline

#3 2008-07-10 18:23:50

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: comments sortby latest date / time

Thanks Rudd

I tried that but no luck – i also tried

<txp:comments sortby="posted ASC" />

and that didnt work either ;(

I am using Textpattern · 4.0.5 could this be why?

Last edited by Alex007 (2008-07-10 18:25:20)

Offline

#4 2008-07-10 18:32:41

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: comments sortby latest date / time

You would need sortby="posted" sortdir="asc", but you should use sort:

<txp:comments sort="posted asc"/> 

(Upgrade to 4.0.6 anyways.)

Last edited by jm (2008-07-10 18:32:52)

Offline

#5 2008-07-10 18:47:07

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: comments sortby latest date / time

i tried

<txp:comments sortby="posted" sortdir="ASC />

and

<txp:comments sortby="posted" sortdir="DESC />

and still no luck ;-((

Offline

#6 2008-07-10 18:58:02

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: comments sortby latest date / time

You have that in your comments_display form, right?

jm wrote:

<txp:comments sort="posted asc"/>

Offline

#7 2008-07-10 19:01:48

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: comments sortby latest date / time

yes its in my form

comments_display

type=“article” thats correct isn’t it?

Offline

#8 2008-07-10 19:03:49

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: comments sortby latest date / time

Yes. Did you try the sort attribute (see post #4)?

Offline

#9 2008-07-10 19:13:28

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: comments sortby latest date / time

Yes i did try it and it wasnt working but now i tried it again it works!

with

<txp:comments sort="posted desc"/>

Thanks for your help.

Offline

#10 2008-07-10 19:14:53

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: comments sortby latest date / time

No problem. Just be sure to update to 4.0.6 (and 4.0.7 in a month or so).

Offline

#11 2008-07-10 19:15:52

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: comments sortby latest date / time

Ok will do – thanks again.

Offline

Board footer

Powered by FluxBB