Hide Ajax chat link

<?php

function bigm_chat_switch(){
global $bp;
$the_component_name = $bp->current_component;
$the_action_name = $bp->current_action;
if($the_component_name != 'groups' && bp_displayed_user_id() != get_current_user_id()){
?>
<style>
<!--
#user-chat {display:none;}
-->
</style>
<?php
}
if($the_action_name == 'my-groups'){
?>
<style>
<!--
#user-chat {display:none;}
-->
</style>
<?php
}
}
add_action('bp_after_footer','bigm_chat_switch');
?>

Style admin bar dropdown

#wp-admin-bar ul.main-nav li:hover,#wp-admin-bar ul.main-nav ul li {background-color:#666!important;}
#wp-admin-bar ul li ul { border:1px solid #666!important;}

Conditional Reference

bp_is_my_profile()
bp_is_home() - same as bp_is_my_profile()

bp_is_blog_page() - catch all for a WP blog page in BP

bp_is_directory()

bp_is_serialized($data) - checks to see if $data is serialized

bp_is_front_page()
bp_is_activity_front_page()

bp_is_page($page) - checks if $bp->current_component matches $page

bp_is_active( $component ) - checks if a BP $component is active

bp_is_profile_component()
bp_is_activity_component()
bp_is_blogs_component()
bp_is_messages_component()
bp_is_friends_component()
bp_is_groups_component()
bp_is_settings_component()

bp_is_member()

bp_is_user_activity()
bp_is_user_friends_activity()

bp_is_activity_permalink()

bp_is_user_profile()
bp_is_profile_edit()
bp_is_change_avatar()

bp_is_user_groups()
bp_is_group()
bp_is_group_home()
bp_is_group_create()
bp_is_group_admin_page()
bp_is_group_forum()
bp_is_group_activity()
bp_is_group_forum_topic()
bp_is_group_forum_topic_edit()
bp_is_group_members()
bp_is_group_invites()
bp_is_group_membership_request()
bp_is_group_leave()
bp_is_group_single()

bp_is_user_blogs()
bp_is_user_recent_posts()
bp_is_user_recent_commments()
bp_is_create_blog()

bp_is_user_friends()

bp_is_friend_requests()

bp_is_user_messages()
bp_is_messages_inbox()
bp_is_messages_sentbox()
bp_is_notices()
bp_is_messages_compose_screen()

bp_is_single_item()

bp_is_activation_page()
bp_is_register_page()

Is user online

<?php
function omega_is_displayed_user_online(){
$member_id = bp_displayed_user_id();
if (bp_has_members('user_id=0&type=online')) :
while (bp_members()) : bp_the_member();
if($member_id == bp_get_member_user_id()) return true;
endwhile;
endif;
}

function omega_is_user_online($user_id){
if (bp_has_members('user_id=0&type=online')) :
while (bp_members()) : bp_the_member();
if($user_id == bp_get_member_user_id()) return true;
endwhile;
endif;
}
?>

Welcome User Msg in Admin Nav Bar

function add_welcome() {
global $current_user;
get_currentuserinfo();
$author = $current_user->display_name;
if ( is_user_logged_in() ) {
echo "<li class="welcome">" . bp_author_avatar() . "Welcome <strong>" . $author . "</strong></li>";
} else {
echo "<li class="welcome">Welcome <strong>Guest</strong></li>";
}
}

add_action( 'bp_adminbar_menus', 'add_welcome', 15 );

Favorite link for individual posts

<?php

//For the functions.php file

function my_bp_activity_is_favorite($activity_id) {
global $bp, $activities_template;
return apply_filters( 'bp_get_activity_is_favorite', in_array( $activity_id, (array)$activities_template->my_favs ) );
}

function my_bp_activity_favorite_link($activity_id) {
global $activities_template;
echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/favorite/' . $activity_id . '/' ), 'mark_favorite' ) );
}

function my_bp_activity_unfavorite_link($activity_id) {
global $activities_template;
echo apply_filters( 'bp_get_activity_unfavorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/unfavorite/' . $activity_id . '/' ), 'unmark_favorite' ) );
}
?>

<?

//For single.php - put within the WP loop

global $bp;
$activity_id = bp_activity_get_activity_id( array(
'user_id' => $post->author_id,
'type' => 'new_blog_post',
'component' => 'blogs',
'item_id' => 1,
'secondary_item_id' => $post->ID
) );
?>

<?php if ( is_user_logged_in() ) : ?>
<?php bp_has_activities();
if ( !my_bp_activity_is_favorite($activity_id) ) : ?>
<a href="<?php my_bp_activity_favorite_link($activity_id) ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
<?php else : ?>
<a href="<?php my_bp_activity_unfavorite_link($activity_id) ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Un-favorite', 'buddypress' ) ?></a><br>
<a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/favorites/' ?>" style="font-size: 12px;">View Your Favorites</a>
<?php endif; ?>
<?php endif;?>