Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Recent active members widget by group


  • ananwebman
    Participant

    @ananwebman

    Daer Friend,
    I’m new of the Buddypress plugin user, I use widger name Recently Active Member but I want to show only some active member of group that I selected, any one can suggest me the plugin or where where I can hack the code.
    Thank advance.

    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)

  • ananwebman
    Participant

    @ananwebman

    
    
    /*** RECENTLY ACTIVE WIDGET *****************/
    
    class BP_Core_Recently_Active_Widget extends WP_Widget {
    
    	function __construct() {
    		$widget_ops = array(
    			'description' => __( 'Avatars of recently active members', 'buddypress' ),
    			'classname' => 'widget_bp_core_recently_active_widget buddypress widget',
    		);
    		parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops );
    	}
    
    	function widget( $args, $instance ) {
    
    		extract( $args );
    
    		$title = apply_filters( 'widget_title', $instance['title'] );
    
    		echo $before_widget;
    		echo $before_title
    		   . $title
    		   . $after_title; ?>
    
    		<?php if ( bp_has_members( 'user_id=0&type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
    			<div class="avatar-block">
    				<?php while ( bp_members() ) : bp_the_member(); ?>
    					<div class="item-avatar">
    						<a href="<?php bp_member_permalink() ?>" title="<?php bp_member_name() ?>"><?php bp_member_avatar() ?></a>
    					</div>
    				<?php endwhile; ?>
    			</div>
    		<?php else: ?>
    
    			<div class="widget-error">
    				<?php _e( 'There are no recently active members', 'buddypress' ) ?>
    			</div>
    
    		<?php endif; ?>
    

    Can I change from Member Id to group ID around here please?


    ananwebman
    Participant

    @ananwebman

    I’m can fix by myself now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Recent active members widget by group’ is closed to new replies.
Skip to toolbar