Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add follow button to activity stream ?


  • anindyaray
    Member

    @anindyaray

    Like in bp-tricks.com , how to add a “Follow” button on the activity stream ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • any help ?


    imwarrior
    Member

    @imwarrior

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


    Anonymous

    Every tub must stand on its own bottom.


    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.

    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


    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


    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`.


    trofesbatrev
    Member

    @trofesbatrev

    Abortion is advocated only by persons who have themselves been born

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to add follow button to activity stream ?’ is closed to new replies.
Skip to toolbar