Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • @mohammad-mursaleen

    Participant

    OK finally done with the function to get what I was looking for;

    /* to get total update counts by group id*/
    
    function get_total_updates_count($group_id){
    
    	global $wpdb;
     
    	$total_updates = $wpdb->get_var( "SELECT COUNT(*) FROM wp_bp_activity 
    					  WHERE component = 'groups' 
    					  AND   type = 'activity_update'
    					  AND   item_id = '$group_id' 
                                             ");
    									  
    	return $total_updates;
    }

    And to use in groups loop you can do as following;

    <?php echo get_total_updates_count(bp_get_group_id()); ?>

    Hope this would help someone in community.

    @mohammad-mursaleen

    Participant

    Good to know that your issue is resolved.

    @mohammad-mursaleen

    Participant

    Sure you can change that link as well as content of confirmation email by adding the following code in you function.php;

    add_filter( 'bp_core_signup_send_validation_email_message', 'custom_buddypress_activation_message', 10, 3 );
     
    function custom_buddypress_activation_message( $message, $user_id, $activate_url ) {
        $user = get_userdata( $user_id );
        $activate_url = 'http://www.domain.de'; // change this link to what ever you want.
        return "Hi $user->user_login,
    Thanks for registering! To complete the activation of your account please click the following link:
    $activate_url 
    Thanks,
    Jesin";
    }

    For more details you can visit the following link;
    http://jesin.tk/custom-buddypress-activation-email/

    @mohammad-mursaleen

    Participant

    Try deactivating all plugins and then check if this issue still continues.

    Explanation:
    Mostly it happens if some plugin is interfering in registration process because the way BuddyPress registers a user is a bit different then what happens in WordPress by default for which usually plugins are designed.

    @mohammad-mursaleen

    Participant

    This might help someone. Have made the following simple script to get online status within members loop.

    $user_id = bp_get_member_user_id();
    $status = 'offline' ;
    
    $last_activity = bp_get_user_last_activity( $user_id );
    
    $exact_time = time();
    
    $time_ago = date("Y-m-d h:i:s",$exact_time – 3 * 60); // time 3 minutes ago
    
    if( $last_activity > $time_ago ){ // check if user activity for last few minutes
    $status = 'online' ;
    } 

    You can use it within while loop of members-loop.php.

    Hope this would help.
    Thanks!

    @mohammad-mursaleen

    Participant

    Thanks Trinzia!

    $user_id = bp_loggedin_user_id();
    $bp_city = bp_get_profile_field_data('field=City&user_id='.$user_id);

    This worked for me.

    @mohammad-mursaleen

    Participant

    I think to avoid conflict you can add

    add_theme_support( 'buddypress' );

    in your child theme function.php file.

    For more info visit the following link.

    BP Theme Authors: make sure your theme registers 'buddypress' support

    Hope this would help others in the community.

Viewing 7 replies - 1 through 7 (of 7 total)
Skip to toolbar