wpForo Integration
5
Posts
2
Users
1
Reactions
3,281
Views
Jul 17, 2018 9:25 am
@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
Jul 19, 2018 7:49 am
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',
Jul 19, 2018 8:09 am
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
);
Jul 19, 2018 2:24 pm
For the replies function please use this:
'userid' => $user_id,
'orderby' => '`created` DESC',