Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

[Closed] UM Integration - ordering of topics / replies / subscriptions

5 Posts
2 Users
1 Reactions
3,898 Views
Posts: 392
Topic starter
(@anonymous3542)
Honorable Member
Joined: 8 years ago

@robert is there any way we can change the ordering of the above so they are in date order ? There doesn't seem to be a way of doing this via the GUI, so I expect it's a code alteration for the MySQL query that returns the data... ?

 

Thanks


4 Replies
Robert
Posts: 10600
Admin
(@robert)
Support Team
Joined: 10 years ago

Try adding one more attribute in get_topics() and get_posts() functions. Open this file:

/wpforo/wpf-includes/integration/ultimate-member.php

Find all this rows:

'userid' => $user_id,

Add one more row below for all of them:

'userid' => $user_id,
'orderby' => 'modified',

Posts: 392
Topic starter
(@anonymous3542)
Honorable Member
Joined: 8 years ago

Thanks @robert,

Seems to work for the most part, but this function (replies) seems to have little effect

 function um_user_replies( $args ) {
$user_id = um_user('ID');
if(isset($_GET['wpfpaged']) && intval($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
$paged = (isset($paged) && $paged) ? $paged : 1;
$args = array(
'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
'row_count' => WPF()->post->options['posts_per_page'],
'userid' => $user_id,
'orderby' => 'modified',
'check_private' => true
);

Robert
Posts: 10600
Admin
(@robert)
Support Team
Joined: 10 years ago

For the replies function please use this:

'userid' => $user_id,
'orderby' => '`created` DESC',

Posts: 392
Topic starter
(@anonymous3542)
Honorable Member
Joined: 8 years ago

Works great @robert. Thanks