Hi
I’m trying to change my members widget to display recently active members on page load rather than the newest members. I think for any new website it is desirable to show recently active as newest users can look a little ‘unused’
I found this post http://buddypress.org/forums/topic.php?id=2244#post-12171
and I’ve made the below change to bp-core-widgets.php. This does display members according to how recently active they were but unfortunately it shows ALL users as being ‘not recently active’, no matter if they were active 10 secs ago.
if ( !$users = wp_cache_get( ‘active_users’, ‘bp’ ) ) {
$users = BP_Core_User::get_active_users( $options[‘max_members’] );
wp_cache_set( ‘active_users’, $users, ‘bp’ );
}
?>
<?php if ( $users[‘users’] ) : ?>
<div class=”item-options” id=”members-list-options”>
<img id=”ajax-loader-members” src=”<?php echo $bp->core->image_base ?>/ajax-loader.gif” height=”7″ alt=”<?php _e( ‘Loading’, ‘buddypress’ ) ?>” style=”display: none;” />
” id=”newest-members”><?php _e( ‘Newest’, ‘buddypress’ ) ?> |
” id=”recently-active-members” class=”selected”><?php _e( ‘Active’, ‘buddypress’ ) ?> |
” id=”popular-members”><?php _e( ‘Popular’, ‘buddypress’ ) ?>
</div>
I’ve looked at templatetags.php and widget-members.js as Burt suggested but can’t figure out what change to make.
can anyone help?
Thanks
I’m using I’m using WPMU 2.7.1 BP 1.0.1 and BBPress 1.0-alpha-6 and BP default theme