Skip to:
Content

Opened 4 years ago

Closed 4 years ago

#2354 closed enhancement (fixed)

[patch] Add ordering to forum post replies

Reported by: DJPaul Owned by:
Milestone: 1.2.6 Priority: normal
Severity: Version:
Component: Groups Keywords: has-patch, tested
Cc:

Description

This patch allows the bp_has_forum_topic_posts() templatetag to order the replies in ascending or descending order (on timestamp).

By default, the default behaviour is "ascending"; that is, oldest post first. I've just extended this through up into the templatetag function to allow child themes to pass a new 'order' parameter to bp_has_forum_topic_posts().

Milestone set to 1.2.4 as I've provided a patch which is a minor enhancement which doesn't change or break the default behaviour.

Attachments (1)

patch-2354.patch (1.7 KB) - added by DJPaul 4 years ago.
v1

Download all attachments as: .zip

Change History (9)

DJPaul4 years ago

v1

comment:1 johnjamesjacoby4 years ago

  • Milestone changed from 1.2.4 to 1.3

Good patch, but I gotta bump it to 1.3 since this will add functionality that could also use an interface and template changes to match.

It has my blessing for 1.3 though.

comment:2 DJPaul4 years ago

Just a note: bp_get_the_topic_post_admin_links() will need updating for such a setting.

comment:3 pisanojm4 years ago

Any way this can make it into 1.2.5.6? Can we use the patch now in 1.2.5.2?

comment:4 johnjamesjacoby4 years ago

  • Milestone changed from 1.3 to 1.2.6

comment:5 pisanojm4 years ago

What is the term to make this "descending" by default? IE. newest post first? ASC- I assume is ascending... DESC?

Adding this change doesn't seem to break anything...

comment:6 pisanojm4 years ago

Ok got this... DESC reverses the order... This is exactly what I was hoping for. This works for me.

comment:7 paulhastings04 years ago

  • Summary changed from Add ordering to forum post replies to [patch] Add ordering to forum post replies

comment:8 johnjamesjacoby4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3216]) Fixes #2354 props Paul Gibbs

Note: See TracTickets for help on using tickets.