Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress Followers for Just Blog Stuff


  • Nahum
    Participant

    @nahummadrid

    I started a thread a long time ago about this http://buddypress.org/community/groups/buddypress-followers/forum/topic/ms-buddypress-followers/ but never got close to achieving that goal.

    I’m feeling like 2011 is the time to tackle this and maybe it might help some other folks.

    Basically I want to use the BP followers plugin to only follow blog activity….since all other activity can be tracked using the friends component. I want to set the blog activity apart and have the following/followers component serve only for members with blogs, Bloggers Following/My Blogs Followers.

    So revisiting activation of this plugin I’m seeing that here are the things that need to be done.

    ** Remove all filters save the Blog Posts/Blog Comments/Follow/ on the Activity and My Activity streams.
    ** Remove the Follow/Unfollow button from Member Header and Members Directory
    ** Add Follow/Unfollow button to the Blogs Directory and…(Members Blogs Sidebar*)
    ** Check first if Member has blog and add Follow/Unfollow button back to the Member Header

    Anyway that’s where I’m starting…
    So far while writing this post I figured out at least how to remove the buttons from header and directory.

    Any one else interested in something like this. Please feel free to drop hints.

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

  • Nahum
    Participant

    @nahummadrid

    `function bp_follow_add_listing_follow_button_blogs() {
    global $bp, $members_template;

    if ( $members_template->member->id == $bp->loggedin_user->id || !is_user_logged_in() )
    return false;

    if ( !$members_template->member->is_following ) { ?>

    <a href="member->id,

    $members_template->member->user_nicename, $members_template->member->user_login ) . $bp->follow->followers->slug . ‘/start/’,

    ‘start_following’ ) ?>” class=”follow” id=”follow-member->id ?>”><?php printf( __( 'Follow %s' ),

    bp_get_user_firstname( $members_template->member->fullname ) ) ?>

    <?php
    } else { ?>

    <a href="member->id,

    $members_template->member->user_nicename, $members_template->member->user_login ) . $bp->follow->followers->slug . ‘/stop/’,

    ‘stop_following’ ) ?>” class=”unfollow” id=”unfollow-member->id ?>”><?php printf( __( 'Stop Following %s'

    ), bp_get_user_firstname( $members_template->member->fullname ) ) ?>

    <?php
    }
    }
    add_action( ‘bp_directory_blogs_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );
    add_action( ‘bp_followers_list_item_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );
    add_action( ‘bp_following_list_item_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );

    `
    I tried this but it didn’t work now I’m trying to figure out how to fix the Following count. It stores the follow action as part of your followers count. but that’s not a problem.

    How would I weave in the Member Follow button into the Blogs Directory Listing.

    Beyond that, how can I take that Follow button and insert it into the sub blogs sidebar.


    Nahum
    Participant

    @nahummadrid

    Quick Note: Filter doesn’t work on BP Followers when you make selection in the activity from the Following tab.

    So…that’s that. If I can cut into a hook and only return Blog Posts, Blog Comments…that would work.


    Nahum
    Participant

    @nahummadrid

    I got stuck on removing the filters and adding the Follow Buttons on the Blog Directory listings. I was able to add the Follow Button only if the user has a Blog, i did it in a way that is not ideal.

    It did get tricky trying to remove filters just for the Following tab. So any help on that would be cool….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Buddypress Followers for Just Blog Stuff’ is closed to new replies.
Skip to toolbar