BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: Caching admin-ajax.php and buddypress #35973

    Thanks for the feedback what do you think about this plugin https://wordpress.org/plugins/docket-cache/ with buddypress.

  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35904

    Hello Ravi,

    Problem solved using the priority number 20

     function bpfollow_add_followers_tab() {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$count = bp_follow_get_the_followers_count();
    
    	if ( empty( $count ) ) {
    		return;
    	}
    ?>
    
    	<li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li>
    
    <?php
    }
    add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab', 20 ); 
  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35871

    I am using legacy template

  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35864

    It did not work

     function bpfollow_add_followers_tab() {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$count = bp_follow_get_the_followers_count();
    
    	if ( empty( $count ) ) {
    		return;
    	}
    ?>
    
    	<li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li>
    
    <?php
    }
    add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab', 999 ); 
  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35860

    But now how can I change the menu position for this code, My total menu items is 7, I want the (My Followers) tab to be positioned last

    • This reply was modified 3 years, 2 months ago by Tosin.
  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35859

    Yeah I finally got it, thanks for making me brainstrom

     /**
     * Add a "Followers (X)" tab to the members directory.
     *
     * This is so the logged-in user can filter the members directory to only
     * users that the current user is following.
     *
     * @uses bp_follow_total_follow_counts() Get the following/followers counts for a user.
     */
    function bpfollow_add_followers_tab() {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$count = bp_follow_get_the_followers_count();
    
    	if ( empty( $count ) ) {
    		return;
    	}
    ?>
    
    	<li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li>
    
    <?php
    }
    add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab' ); 
  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: [Resolved] Display followers tab in members directory #35857

    I added the code below to my bp-custom.php file but my site crashed

     /**
     * Add a "Following (X)" tab to the members directory.
     *
     * This is so the logged-in user can filter the members directory to only
     * users that the current user is following.
     *
     * @uses bp_follow_total_follow_counts() Get the following/followers counts for a user.
     */
    function bp_follow_add_following_tab() {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$count = bp_follow_get_the_following_count();
    
    	if ( empty( $count ) ) {
    		return;
    	}
    ?>
    
    	<li id="members-following"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWING_SLUG ?>"><?php printf( __( 'Following <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li>
    
    <?php
    }
    add_action( 'bp_members_directory_member_types', 'bp_follow_add_following_tab' ); 
  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: Buddyblog pro suggestions #35575

    Hello,

    1. Will the pay per post feature also work with the standalone version with shortcodes or will it be an addon?

  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: Buddyblog pro suggestions #35435

    Any feed back on this

  • Participant
    Level: Guru
    Posts: 885
    Tosin on in reply to: Buddyblog pro suggestions #35397

    BUDDYBLOG PRO AND BUDDYPRESS ACTIVITY PRIVACY PLUGIN PRIVACY SYNCHRONIZATION

    Hello,

    I was thinking if its possible to make buddyblog pro have the same privacy options as the BUDDYPRESS ACTIVITY PRIVACY PLUGIN with support for follow plugin.

    Users can select if they want only their friends or followers to read their blog post.

    For Example

    – User A sets his recent blog post privacy option to (my followers)
    – User B, C and D who do not follow User A try to read User A’s blog post but they are redirected to a custom restriction page.
    – The custom restriction pages contains a message telling the user that he needs to follow the blog post author in order read his post.

    I think a custom page redirection is better to prevent google picking up lots of 404 errors on restricted posts.

    Also when the buddyblog privacy is set to (my followers) The corresponding activity of the post using the ACTIVITY PRIVACY PLUGIN should automatically change to (my followers). Both plugin privacy options should be synchronized.

    What are your thoughts on this?