BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hi Alayna,

    Thank You for posting, Yes you can achieve this functionality using one our free plugin named “BuddyPress Live Notification”. It works exactly like your requirement. Please refer the following Link

    https://buddydev.com/plugins/buddypress-live-notification/

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BP Simple Front End Post Form #3426

    Hi Leo

    Please download form this repositery.

    https://github.com/sbrajesh/buddyblog

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BP Simple Front End Post Form #3425

    Hi Leo

    Please clone the latest code for buddyblog form the following link ‘https://github.com/sbrajesh/buddyblog’ and after cloning the latest code then try the following code in your bp-custom.php file

    
    add_filter( 'buddyblog_visible_posts_count', 'buddyblog_visible_count', 10, 2 );
    function buddyblog_visible_count( $total_posts, $user_id ) {
       
        $query_args = array(
    	'author'        => $user_id,
    	'post_type'     => buddyblog_get_posttype(),
    	'post_status'   => $status,
            'category__in'  => array(65), //category ids
    	'fields'         => 'ids',
            'suppress_filters' => false
        );
        $posts = new WP_Query( $query_args );
        
        $total_posts = $posts->found_posts;
        
        return intval( $total_posts );
        
    }
    

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BP Simple Front End Post Form #3423

    Hi Leo

    Yes it can be done. Please override the posts list template. You can override template by copy “buddyblog/template/buddyblog/posts.php” file to your theme folder “buddyblog/posts.php” after copying, modify the following section

    
    $query_args = array(
    		'author'        => bp_displayed_user_id(),
    		'post_type'     => buddyblog_get_posttype(),
    		'post_status'   => $status,
    		'paged'         => intval( $paged )
     );
    
    

    to

    
    $query_args = array(
    		'author'        => bp_displayed_user_id(),
    		'post_type'     => buddyblog_get_posttype(),
    		'post_status'   => $status,
                    'category__in' => array(65), //category ids of the selected post-types
    		'paged'         => intval( $paged )
    );
    
    

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: BuddyPress Live Notification Pop Up Issue #3422

    Hi Kade

    Yes it can be done. Just modify your theme style.css and put the following code at the bottom of file.

    
    #achtung-overlay  {
        left:auto;
        right: 20px;
    }
    

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BP Simple Front End Post Form #3420

    Hi Leo,

    Are you using WPML plugin?. If yes I am sorry. I may not be help you with this plugin.

    Thank you
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BP Simple Front End Post Form #3419

    Hi Leo,

    Are you using WPML plugin. If yes I am sorry. I may not be help you with this plugin.

    Thank you
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hi Alayna

    Thank You for confirming. I am glad that i could help.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hi Alayna,
    Welcome to BuddyDev.

    The code snippet is old and from the time when bp_activity_add_meta was not part of BuddyPress. You most probably put that code in bp-custom.php and that’s why you are getting the error. if it was put in functions.php, It would not have generated the error.

    Please remove the cold code and use the following code in your bp-custom.php

    
    
    function bpdev_track_user_favorite( $activity_id, $user_id ) {
    
        bp_activity_add_meta( $activity_id, 'favorited_by_user', $user_id );
    }
    add_action( 'bp_activity_add_user_favorite', 'bpdev_track_user_favorite', 10, 2 );
    
    function bpdev_track_user_unfavorite( $activity_id, $user_id ){
    
        bp_activity_delete_meta( $activity_id, 'favorited_by_user', $user_id );
    }
    add_action( 'bp_activity_remove_user_favorite', 'bpdev_track_user_unfavorite', 10, 2 );
    //show faces, yay!
    
    function bpdev_show_who_favorited_activities() {
        $output = '';
        $favorited_users = bp_activity_get_meta( bp_get_activity_id(), 'favorited_by_user' );
        //print_r($favorited_users);
        if ( ! empty( $favorited_users ) ) {
    
            foreach ( (array) $favorited_users as $user_id ) {
                $output .= "<a href='" . bp_core_get_user_domain ( $user_id ) . "'>". bp_core_fetch_avatar ( array( 'type'=> 'thumb', 'height'=> 25, 'width'=>25, 'item_id'=> $user_id ) ) . "</a>";
            }
                
    
        }
        if ( $output ) {
            echo "<div class='clearfix activity-favorited-by'>{$output}</div>";
        }
            
    }
    add_action( 'bp_activity_entry_content', 'bpdev_show_who_favorited_activities' );
    
    

    After putting this code try favoriting an activity and reloading the page to see it works or not. It should work.

    Please do let me know if it is working for you or not?

    Thank you
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Force Profile Photo Plugin Message #3401

    Hi Travis,

    My apologies for the inconvenience .

    Brajesh sir is away right now. He will get back to you soon.

    Thank You
    Ravi