Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get Friend Connections working

  • Hello,

    Does anyone know where the ‘add friend’, ‘private message’ and ‘mention’ features are on my website? When visiting another members’ profile you can can do everything but those three key features. I have everything setup and running properly. I even tried changing the roles of the user from Subscriber to Member to no avail. Any ideas?

    The link to the website is: 2ezclan.net/w

    Feel free to create an account to investigate further. Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of @ChrisClayton
    @ChrisClayton
    Participant

    @chrisclayton

    @Memfis – I notice your using a custom theme (rather than a childtheme of bp-default)

    Have you registered the buttons in your functions.php file?
    Have a peek through the bp-default functions.php file for the code and copy it into yours.

    It’ll be something like
    `add_action( ‘bp_member_header_actions’, ‘bp_add_friend_button’ );`

    Hey Chris thank you for the prompt response. So I found this code:

    if ( !is_admin() ) {
    // Register buttons for the relevant component templates
    // Friends button
    if ( bp_is_active( ‘friends’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_add_friend_button’ );

    // Activity button
    if ( bp_is_active( ‘activity’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_send_public_message_button’ );

    // Messages button
    if ( bp_is_active( ‘messages’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_send_private_message_button’ );

    // Group buttons
    if ( bp_is_active( ‘groups’ ) ) {
    add_action( ‘bp_group_header_actions’, ‘bp_group_join_button’ );
    add_action( ‘bp_group_header_actions’, ‘bp_group_new_topic_button’ );
    add_action( ‘bp_directory_groups_actions’, ‘bp_group_join_button’ );
    }

    // Blog button
    if ( bp_is_active( ‘blogs’ ) )
    add_action( ‘bp_directory_blogs_actions’, ‘bp_blogs_visit_blog_button’ );
    }
    }

    and added it to the bottom of my themes functions.php. I had to remove the code though because it crashed the website :

    Hey Chris,

    my mistake. You were right. All I had to do was paste the following into the functions.php (does not matter where):

    add_action( ‘bp_member_header_actions’, ‘bp_add_friend_button’ );
    add_action( ‘bp_member_header_actions’, ‘bp_send_public_message_button’ );
    add_action( ‘bp_member_header_actions’, ‘bp_send_private_message_button’ );

    Thank you again.

    Avatar of @ChrisClayton
    @ChrisClayton
    Participant

    @chrisclayton

    Anytime.
    The original code you tried may have crashed because you might already have some of the component’s buttons already registered and you where trying to repeat them, you may want to double check that the button’s are working inside groups and inside all of the directories (such as the blog directory, members directory ect.)

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

You must be logged in to reply to this topic.