Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add follow button to activity stream ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of anindyaray
    anindyaray
    Member

    @anindyaray

    any help ?

    i think this forum is dead…no one wants to reply no one wants to code..

    Every tub must stand on its own bottom.

    Avatar of tasimastlio
    tasimastlio
    Member

    @tasimastlio

    The possession of unlimited power will make a despot of almost any man. There is a possible Nero in the gentlest human creature that walks.

    Avatar of enliniweeb
    enliniweeb
    Member

    @enliniweeb

    How do you tell a communist? Well, it’s someone who reads Marx and Lenin. And how do you tell an anti-communist? It’s someone who understands Marx and Lenin

    Avatar of stoi2m1
    stoi2m1
    Participant

    @stoi2m1

    damn the spammers.

    Use the following function
    `bp_follow_add_follow_button(array(‘leader_id’=>$displayed_userID, ‘follower_id’=>$current_userID))`

    Here is how i added the follow link to the activity stream.

    you have to add two lines of code to two template files. /your_theme/activity/entry.php and /your_theme/activity/comment.php

    This is the first line of code needed in both files, place it towards the top of the file, this is to make the buddypress object available in the file

    This line of code is used in the entry.php file
    `bp_get_activity_user_id(),’follower_id’=>$bp->loggedin_user->id)) ?>`

    This line of code is used in the comment.php file
    `bp_get_activity_comment_user_id(),’follower_id’=>$bp->loggedin_user->id)) ?>`

    Let me know if you need any more info, good luck,
    Jesse

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Thanks for providing support, Jesse!

    To get rid of the `global $bp` declaration, you can use `bp_loggedin_user_id()` in place of `$bp->loggedin_user->id`.

    Avatar of trofesbatrev
    trofesbatrev
    Member

    @trofesbatrev

    Abortion is advocated only by persons who have themselves been born

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

You must be logged in to reply to this topic.