Index: bp-activity.php
===================================================================
--- bp-activity.php	(revision 3666)
+++ bp-activity.php	(working copy)
@@ -6,13 +6,16 @@
 function bp_activity_setup_globals() {
 	global $bp, $current_blog;
 
-	if ( !defined( 'BP_ACTIVITY_SLUG' ) )
-		define ( 'BP_ACTIVITY_SLUG', $bp->pages->activity->slug );
+        // Define a slug, if necessary
+	if ( !defined( 'BP_ACTIVITY_SLUG' ) ) {
+	        define( 'BP_ACTIVITY_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->activity->slug ) );
+        }
 
 	// For internal identification
 	$bp->activity->id = 'activity';
 	$bp->activity->name = $bp->pages->activity->name;
 	$bp->activity->slug = BP_ACTIVITY_SLUG;
+	$bp->activity->root_slug = $bp->pages->activity->slug;
 
 	$bp->activity->table_name      = $bp->table_prefix . 'bp_activity';
 	$bp->activity->table_name_meta = $bp->table_prefix . 'bp_activity_meta';
Index: bp-core/bp-core-templatetags.php
===================================================================
--- bp-core/bp-core-templatetags.php	(revision 3666)
+++ bp-core/bp-core-templatetags.php	(working copy)
@@ -1695,7 +1695,7 @@
 function bp_is_groups_component() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component )
+	if ( bp_core_is_current_component( 'groups' ) )
 		return true;
 
 	return false;
@@ -1785,7 +1785,7 @@
 function bp_is_group() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && isset( $bp->groups->current_group ) && $bp->groups->current_group )
+	if ( bp_core_is_current_component( 'groups' ) && isset( $bp->groups->current_group ) && $bp->groups->current_group )
 		return true;
 
 	return false;
@@ -1794,7 +1794,7 @@
 function bp_is_group_home() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
 		return true;
 
 	return false;
@@ -1803,7 +1803,7 @@
 function bp_is_group_create() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && 'create' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && 'create' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1813,7 +1813,7 @@
 function bp_is_group_admin_page() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'admin' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'admin' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1822,7 +1822,7 @@
 function bp_is_group_forum() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1831,7 +1831,7 @@
 function bp_is_group_activity() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'activity' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'activity' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1840,7 +1840,7 @@
 function bp_is_group_forum_topic() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
 		return true;
 
 	return false;
@@ -1849,7 +1849,7 @@
 function bp_is_group_forum_topic_edit() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )
 		return true;
 
 	return false;
@@ -1858,7 +1858,7 @@
 function bp_is_group_members() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'members' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'members' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1867,7 +1867,7 @@
 function bp_is_group_invites() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && 'send-invites' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && 'send-invites' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1876,7 +1876,7 @@
 function bp_is_group_membership_request() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && 'request-membership' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && 'request-membership' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1885,7 +1885,7 @@
 function bp_is_group_leave() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'leave-group' == $bp->current_action )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item && 'leave-group' == $bp->current_action )
 		return true;
 
 	return false;
@@ -1894,7 +1894,7 @@
 function bp_is_group_single() {
 	global $bp;
 
-	if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item )
+	if ( bp_core_is_current_component( 'groups' ) && $bp->is_single_item )
 		return true;
 
 	return false;
Index: bp-blogs.php
===================================================================
--- bp-blogs.php	(revision 3664)
+++ bp-blogs.php	(working copy)
@@ -9,13 +9,16 @@
 function bp_blogs_setup_globals() {
 	global $bp, $wpdb;
 
-	if ( !defined( 'BP_BLOGS_SLUG' ) )
-		define ( 'BP_BLOGS_SLUG', $bp->pages->blogs->slug );
+        // Define a slug, if necessary
+	if ( !defined( 'BP_BLOGS_SLUG' ) ) {
+	        define( 'BP_BLOGS_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->blogs->slug ) );
+        }
 
 	// For internal identification
 	$bp->blogs->id = 'blogs';
 
 	$bp->blogs->slug = BP_BLOGS_SLUG;
+	$bp->blogs->root_slug = $bp->pages->blogs->slug;
 
 	$bp->blogs->table_name          = $bp->table_prefix . 'bp_user_blogs';
 	$bp->blogs->table_name_blogmeta = $bp->table_prefix . 'bp_user_blogs_blogmeta';
Index: bp-forums.php
===================================================================
--- bp-forums.php	(revision 3664)
+++ bp-forums.php	(working copy)
@@ -19,14 +19,17 @@
 function bp_forums_setup() {
 	global $bp;
         
-        if ( !defined( 'BP_FORUMS_SLUG' ) )
-                define ( 'BP_FORUMS_SLUG', $bp->pages->forums->slug );
+        // Define a slug, if necessary
+	if ( !defined( 'BP_FORUMS_SLUG' ) ) {
+	        define( 'BP_FORUMS_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->forums->slug ) );
+        }
 
 	// For internal identification
 	$bp->forums->id = 'forums';
 
 	$bp->forums->image_base = BP_PLUGIN_URL . '/bp-forums/images';
 	$bp->forums->slug = BP_FORUMS_SLUG;
+	$bp->forums->root_slug = $bp->pages->forums->slug;
 
 	if ( isset( $bp->site_options['bb-config-location'] ) )
 		$bp->forums->bbconfig = $bp->site_options['bb-config-location'];
Index: bp-groups.php
===================================================================
--- bp-groups.php	(revision 3664)
+++ bp-groups.php	(working copy)
@@ -13,13 +13,16 @@
 function groups_setup_globals() {
 	global $bp;
 
-	if ( !defined( 'BP_GROUPS_SLUG' ) )
-		define ( 'BP_GROUPS_SLUG', $bp->pages->groups->slug );
-
+       // Define a slug, if necessary
+       if ( !defined( 'BP_GROUPS_SLUG' ) ) {
+	        define( 'BP_GROUPS_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->groups->slug ) );
+        }
+        
 	/* For internal identification */
 	$bp->groups->id = 'groups';
 	$bp->groups->name = $bp->pages->groups->name;
 	$bp->groups->slug = BP_GROUPS_SLUG;
+	$bp->groups->root_slug = $bp->pages->groups->slug;
 
 	$bp->groups->table_name           = $bp->table_prefix . 'bp_groups';
 	$bp->groups->table_name_members   = $bp->table_prefix . 'bp_groups_members';
@@ -56,7 +59,7 @@
 function groups_setup_nav() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && $group_id = BP_Groups_Group::group_exists($bp->current_action) ) {
+	if ( bp_core_is_current_component( 'groups' ) && $group_id = BP_Groups_Group::group_exists($bp->current_action) ) {
 
 		/* This is a single group page. */
 		$bp->is_single_item = true;
@@ -80,15 +83,15 @@
 	}
 
 	/* Add 'Groups' to the main navigation */
-	bp_core_new_nav_item( array( 'name' => sprintf( __( 'Groups <span>(%d)</span>', 'buddypress' ), groups_total_groups_for_user() ), 'slug' => $bp->groups->name, 'position' => 70, 'screen_function' => 'groups_screen_my_groups', 'default_subnav_slug' => 'my-groups', 'item_css_id' => $bp->groups->id ) );
+	bp_core_new_nav_item( array( 'name' => sprintf( __( 'Groups <span>(%d)</span>', 'buddypress' ), groups_total_groups_for_user() ), 'slug' => $bp->groups->slug, 'position' => 70, 'screen_function' => 'groups_screen_my_groups', 'default_subnav_slug' => 'my-groups', 'item_css_id' => $bp->groups->id ) );
 
-	$groups_link = $bp->loggedin_user->domain . $bp->groups->name . '/';
+	$groups_link = $bp->loggedin_user->domain . $bp->groups->root_slug . '/';
 
 	/* Add the subnav items to the groups nav item */
-	bp_core_new_subnav_item( array( 'name' => __( 'My Groups', 'buddypress' ), 'slug' => 'my-groups', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->name, 'screen_function' => 'groups_screen_my_groups', 'position' => 10, 'item_css_id' => 'groups-my-groups' ) );
-	bp_core_new_subnav_item( array( 'name' => __( 'Invites', 'buddypress' ), 'slug' => 'invites', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->name, 'screen_function' => 'groups_screen_group_invites', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
+	bp_core_new_subnav_item( array( 'name' => __( 'My Groups', 'buddypress' ), 'slug' => 'my-groups', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_my_groups', 'position' => 10, 'item_css_id' => 'groups-my-groups' ) );
+	bp_core_new_subnav_item( array( 'name' => __( 'Invites', 'buddypress' ), 'slug' => 'invites', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_invites', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
 
-	if ( $bp->current_component == $bp->groups->slug ) {
+	if ( bp_core_is_current_component( 'groups' ) ) {
 
 		if ( bp_is_my_profile() && !$bp->is_single_item ) {
 
@@ -114,7 +117,7 @@
 			if ( !$bp->bp_options_avatar = bp_core_fetch_avatar( array( 'item_id' => $bp->groups->current_group->id, 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => __( 'Group Avatar', 'buddypress' ) ) ) )
 				$bp->bp_options_avatar = '<img src="' . esc_attr( $group->avatar_full ) . '" class="avatar" alt="' . esc_attr( $group->name ) . '" />';
 
-			$group_link = $bp->root_domain . '/' . $bp->groups->slug . '/' . $bp->groups->current_group->slug . '/';
+			$group_link = $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $bp->groups->current_group->slug . '/';
 
 			// If this is a private or hidden group, does the user have access?
 			if ( 'private' == $bp->groups->current_group->status || 'hidden' == $bp->groups->current_group->status ) {
@@ -127,30 +130,30 @@
 			}
 
 			/* Reset the existing subnav items */
-			bp_core_reset_subnav_items($bp->groups->slug);
+			bp_core_reset_subnav_items($bp->groups->root_slug);
 
 			/* Add a new default subnav item for when the groups nav is selected. */
-			bp_core_new_nav_default( array( 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_home', 'subnav_slug' => 'home' ) );
+			bp_core_new_nav_default( array( 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_home', 'subnav_slug' => 'home' ) );
 
 			/* Add the "Home" subnav item, as this will always be present */
-			bp_core_new_subnav_item( array( 'name' => __( 'Home', 'buddypress' ), 'slug' => 'home', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_home', 'position' => 10, 'item_css_id' => 'home' ) );
+			bp_core_new_subnav_item( array( 'name' => __( 'Home', 'buddypress' ), 'slug' => 'home', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_home', 'position' => 10, 'item_css_id' => 'home' ) );
 
 			/* If the user is a group mod or more, then show the group admin nav item */
 			if ( $bp->is_item_mod || $bp->is_item_admin )
-				bp_core_new_subnav_item( array( 'name' => __( 'Admin', 'buddypress' ), 'slug' => 'admin', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_admin', 'position' => 20, 'user_has_access' => ( $bp->is_item_admin + (int)$bp->is_item_mod ), 'item_css_id' => 'admin' ) );
+				bp_core_new_subnav_item( array( 'name' => __( 'Admin', 'buddypress' ), 'slug' => 'admin', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_admin', 'position' => 20, 'user_has_access' => ( $bp->is_item_admin + (int)$bp->is_item_mod ), 'item_css_id' => 'admin' ) );
 
 			// If this is a private group, and the user is not a member, show a "Request Membership" nav item.
 			if ( !is_super_admin() && is_user_logged_in() && !$bp->groups->current_group->is_user_member && !groups_check_for_membership_request( $bp->loggedin_user->id, $bp->groups->current_group->id ) && $bp->groups->current_group->status == 'private' )
-				bp_core_new_subnav_item( array( 'name' => __( 'Request Membership', 'buddypress' ), 'slug' => 'request-membership', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_request_membership', 'position' => 30 ) );
+				bp_core_new_subnav_item( array( 'name' => __( 'Request Membership', 'buddypress' ), 'slug' => 'request-membership', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_request_membership', 'position' => 30 ) );
 
 			if ( $bp->groups->current_group->enable_forum && function_exists('bp_forums_setup') )
-				bp_core_new_subnav_item( array( 'name' => __( 'Forum', 'buddypress' ), 'slug' => 'forum', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_forum', 'position' => 40, 'user_has_access' => $bp->groups->current_group->user_has_access, 'item_css_id' => 'forums' ) );
+				bp_core_new_subnav_item( array( 'name' => __( 'Forum', 'buddypress' ), 'slug' => 'forum', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_forum', 'position' => 40, 'user_has_access' => $bp->groups->current_group->user_has_access, 'item_css_id' => 'forums' ) );
 
-			bp_core_new_subnav_item( array( 'name' => sprintf( __( 'Members (%s)', 'buddypress' ), number_format( $bp->groups->current_group->total_member_count ) ), 'slug' => 'members', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_members', 'position' => 60, 'user_has_access' => $bp->groups->current_group->user_has_access, 'item_css_id' => 'members'  ) );
+			bp_core_new_subnav_item( array( 'name' => sprintf( __( 'Members (%s)', 'buddypress' ), number_format( $bp->groups->current_group->total_member_count ) ), 'slug' => 'members', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_members', 'position' => 60, 'user_has_access' => $bp->groups->current_group->user_has_access, 'item_css_id' => 'members'  ) );
 
 			if ( is_user_logged_in() && groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) {
 				if ( bp_is_active('friends') )
-					bp_core_new_subnav_item( array( 'name' => __( 'Send Invites', 'buddypress' ), 'slug' => 'send-invites', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_invite', 'item_css_id' => 'invite', 'position' => 70, 'user_has_access' => $bp->groups->current_group->user_has_access ) );
+					bp_core_new_subnav_item( array( 'name' => __( 'Send Invites', 'buddypress' ), 'slug' => 'send-invites', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->root_slug, 'screen_function' => 'groups_screen_group_invite', 'item_css_id' => 'invite', 'position' => 70, 'user_has_access' => $bp->groups->current_group->user_has_access ) );
 			}
 		}
 	}
@@ -165,7 +168,7 @@
 function groups_directory_groups_setup() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && empty( $bp->current_action ) && empty( $bp->current_item ) ) {
+	if ( bp_core_is_current_component( 'groups' ) && empty( $bp->current_action ) && empty( $bp->current_item ) ) {
 		$bp->is_directory = true;
 
 		do_action( 'groups_directory_groups_setup' );
@@ -598,7 +601,7 @@
 function groups_screen_group_activity_permalink() {
 	global $bp;
 
-	if ( $bp->current_component != $bp->groups->slug || $bp->current_action != $bp->activity->slug || empty( $bp->action_variables[0] ) )
+	if ( !bp_core_is_current_component( 'groups' ) || $bp->current_action != $bp->activity->slug || empty( $bp->action_variables[0] ) )
 		return false;
 
 	$bp->is_single_item = true;
@@ -609,8 +612,8 @@
 
 function groups_screen_group_admin() {
 	global $bp;
-
-	if ( $bp->current_component != BP_GROUPS_SLUG || 'admin' != $bp->current_action )
+	
+	if ( !bp_core_is_current_component( 'groups' ) || 'admin' != $bp->current_action )
 		return false;
 
 	if ( !empty( $bp->action_variables[0] ) )
@@ -622,7 +625,7 @@
 function groups_screen_group_admin_edit_details() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'edit-details' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'edit-details' == $bp->action_variables[0] ) {
 
 		if ( $bp->is_item_admin || $bp->is_item_mod  ) {
 
@@ -654,7 +657,7 @@
 function groups_screen_group_admin_settings() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'group-settings' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'group-settings' == $bp->action_variables[0] ) {
 
 		if ( !$bp->is_item_admin )
 			return false;
@@ -691,7 +694,7 @@
 function groups_screen_group_admin_avatar() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'group-avatar' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'group-avatar' == $bp->action_variables[0] ) {
 
 		if ( !$bp->is_item_admin )
 			return false;
@@ -749,7 +752,7 @@
 function groups_screen_group_admin_manage_members() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'manage-members' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'manage-members' == $bp->action_variables[0] ) {
 
 		if ( !$bp->is_item_admin )
 			return false;
@@ -855,7 +858,7 @@
 function groups_screen_group_admin_requests() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'membership-requests' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'membership-requests' == $bp->action_variables[0] ) {
 
 		/* Ask for a login if the user is coming here via an email notification */
 		if ( !is_user_logged_in() )
@@ -913,7 +916,7 @@
 function groups_screen_group_admin_delete_group() {
 	global $bp;
 
-	if ( $bp->current_component == $bp->groups->slug && 'delete-group' == $bp->action_variables[0] ) {
+	if ( bp_core_is_current_component( 'groups' ) && !empty( $bp->action_variables[0] ) && 'delete-group' == $bp->action_variables[0] ) {
 
 		if ( !$bp->is_item_admin && !is_super_admin() )
 			return false;
@@ -1021,7 +1024,7 @@
 	global $bp;
 
 	/* If we're not at domain.org/groups/create/ then return false */
-	if ( $bp->current_component != $bp->groups->slug || 'create' != $bp->current_action )
+	if ( !bp_core_is_current_component( 'groups' ) || 'create' != $bp->current_action )
 		return false;
 
 	if ( !is_user_logged_in() )
@@ -1040,13 +1043,13 @@
 		setcookie( 'bp_completed_create_steps', false, time() - 1000, COOKIEPATH );
 
 		$reset_steps = true;
-		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
+		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
 	}
 
 	/* If this is a creation step that is not recognized, just redirect them back to the first screen */
 	if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) {
 		bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' );
-		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/' );
+		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/' );
 	}
 
 	/* Fetch the currently completed steps variable */
@@ -1068,14 +1071,14 @@
 		if ( 'group-details' == $bp->groups->current_create_step ) {
 			if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) {
 				bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' );
-				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
+				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
 			}
 
 			$new_group_id = isset( $bp->groups->new_group_id ) ? $bp->groups->new_group_id : 0;
 
 			if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) {
 				bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
-				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
+				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
 			}
 
 			groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 );
@@ -1102,7 +1105,7 @@
 
 			if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) {
 				bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
-				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
+				bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
 			}
 		}
 
@@ -1158,7 +1161,7 @@
 				}
 			}
 
-			bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $next_step . '/' );
+			bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $next_step . '/' );
 		}
 	}
 
@@ -1194,7 +1197,7 @@
 function groups_action_join_group() {
 	global $bp;
 
-	if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != 'join' )
+	if ( !$bp->is_single_item || !bp_core_is_current_component( 'groups' ) || $bp->current_action != 'join' )
 		return false;
 
 	// Nonce check
@@ -1229,7 +1232,7 @@
 function groups_action_leave_group() {
 	global $bp;
 
-	if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != 'leave-group' )
+	if ( !$bp->is_single_item || !bp_core_is_current_component( 'groups' ) || $bp->current_action != 'leave-group' )
 		return false;
 
 	// Nonce check
@@ -1254,7 +1257,7 @@
 function groups_action_sort_creation_steps() {
 	global $bp;
 
-	if ( $bp->current_component != BP_GROUPS_SLUG && $bp->current_action != 'create' )
+	if ( !bp_core_is_current_component( 'groups' ) && $bp->current_action != 'create' )
 		return false;
 
 	if ( !is_array( $bp->groups->group_creation_steps ) )
@@ -1278,10 +1281,10 @@
 function groups_action_redirect_to_random_group() {
 	global $bp, $wpdb;
 
-	if ( $bp->current_component == $bp->groups->slug && isset( $_GET['random-group'] ) ) {
+	if ( bp_core_is_current_component( 'groups' ) && isset( $_GET['random-group'] ) ) {
 		$group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ) );
 
-		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/' . $group['groups'][0]->slug . '/' );
+		bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group['groups'][0]->slug . '/' );
 	}
 }
 add_action( 'wp', 'groups_action_redirect_to_random_group', 6 );
@@ -1289,7 +1292,7 @@
 function groups_action_group_feed() {
 	global $bp, $wp_query;
 
-	if ( !bp_is_active( 'activity' ) || $bp->current_component != $bp->groups->slug || !isset( $bp->groups->current_group ) || $bp->current_action != 'feed' )
+	if ( !bp_is_active( 'activity' ) || !bp_core_is_current_component( 'groups' ) || !isset( $bp->groups->current_group ) || $bp->current_action != 'feed' )
 		return false;
 
 	$wp_query->is_404 = false;
Index: bp-core.php
===================================================================
--- bp-core.php	(revision 3666)
+++ bp-core.php	(working copy)
@@ -83,7 +83,13 @@
 	// Set up the members id and active components entry
 	$bp->members->id = 'members';
 
-	$bp->members->slug = $bp->pages->members->slug;
+        // Define a slug, if necessary
+        if ( !defined( 'BP_MEMBERS_SLUG' ) ) {
+	        define( 'BP_MEMBERS_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->members->slug ) );
+	}
+
+        $bp->members->slug = BP_MEMBERS_SLUG;
+	$bp->members->root_slug = $bp->pages->members->slug;
 	$bp->active_components[$bp->members->slug] = $bp->members->id;
 
 	// The user ID of the user who is currently logged in.
@@ -201,9 +207,6 @@
 function bp_core_define_slugs() {
 	global $bp;
 
-	if ( !defined( 'BP_MEMBERS_SLUG' ) )
-		define( 'BP_MEMBERS_SLUG', $bp->pages->members->slug );
-
 	if ( !defined( 'BP_REGISTER_SLUG' ) )
 		define( 'BP_REGISTER_SLUG', $bp->pages->register->slug );
 
@@ -285,6 +288,33 @@
 }
 
 /**
+ * Creates a default component slug from a WP page root_slug
+ *
+ * Since 1.3, BP components get their root_slug (the slug used immediately following the root
+ * domain) from the slug of a corresponding WP page. E.g. if your BP installation at example.com
+ * has its members page at example.com/community/people, $bp->members->root_slug will be
+ * 'community/people'. By default, this function creates a shorter version of the root_slug for
+ * use elsewhere in the URL, by returning the content after the final '/' in the root_slug
+ * ('people' in the example above).
+ *
+ * Filter on 'bp_core_component_slug_from_root_slug' to override this method in general, or define a
+ * specific component slug constant (e.g. BP_MEMBERS_SLUG) to override specific component slugs.
+ * 
+ * @package BuddyPress Core
+ * @since 1.3
+ *
+ * @param str $root_slug The root slug, which comes from $bp->pages->[component]->slug
+ * @return str $slug The short slug for use in the middle of URLs
+ */
+function bp_core_component_slug_from_root_slug( $root_slug ) {
+        $slug_chunks = explode( '/', $root_slug );
+        $slug = array_pop( $slug_chunks );
+        
+        return apply_filters( 'bp_core_component_slug_from_root_slug', $slug, $root_slug );
+}
+
+
+/**
  * bp_core_admin_menu_init()
  *
  * Initializes the wp-admin area "BuddyPress" menus and sub menus.
@@ -351,7 +381,58 @@
 	return false;
 }
 
+
 /**
+ * Checks to see whether the current page belongs to the specified component
+ *
+ * This function is designed to be generous, accepting several different kinds of value for
+ * the $component_name parameter. It checks $component_name against:
+ *      - the component's root_slug, which matches the page slug in $bp->pages
+ *      - the component's regular slug
+ *      - the component's id, or 'canonical' name
+ *
+ * @package BuddyPress Core
+ * @since 1.3
+ * @return true if root component, else false.
+ */
+function bp_core_is_current_component( $component_name ) {
+	global $bp;
+	
+        $is_current_component = false;
+
+	if ( !empty( $bp->current_component ) ) {
+	        foreach ( $bp->active_components as $key => $id ) {
+                        if ( !empty( $bp->{$id}->root_slug ) && $bp->{$id}->root_slug == $component_name ) {
+                                // First, check to see whether $component_name matches the root_slug
+                                // This covers the case where the component name immediately follows
+                                // the root domain, as 'members' in example.com/members/boonebgorges
+                                // or 'groups' in example.com/groups/my-cool-group. Note: Only
+                                // components that have corresponding WP pages will have root_slug
+
+                                $is_current_component = true;
+                                break;
+                        } else if ( $bp->{$id}->slug == $component_name ) {
+                                // Then, check to see whether $component_name matches the regular 
+                                // component slug. This accounts for instances when the component 
+                                // name appears further down the URL, as on profile tabs: e.g.
+                                // 'friends' in example.com/members/boonebgorges/friends
+
+                                $is_current_component = true;
+                                break;
+                        } else if ( $bp->{$id}->id == $component_name ) {
+                                // Finally, check to see whether $component_name matches the
+                                // unique, non-translatable component id
+                                
+                                $is_current_component = true;
+                                break;
+                        }
+                }
+	}
+	
+        return apply_filters( 'bp_core_is_current_component', $is_current_component, $component_name );
+}
+
+/**
  * bp_core_setup_nav()
  *
  * Sets up the profile navigation item if the Xprofile component is not installed.
@@ -865,7 +946,7 @@
 		'screen_function' => &$screen_function
 	);
 
-	if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) {
+	if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) { 
 		if ( !is_object( $screen_function[0] ) )
 			add_action( 'wp', $screen_function, 3 );
 		else
Index: bp-groups/bp-groups-templatetags.php
===================================================================
--- bp-groups/bp-groups-templatetags.php	(revision 3664)
+++ bp-groups/bp-groups-templatetags.php	(working copy)
@@ -148,7 +148,7 @@
 		$user_id = $bp->displayed_user->id;
 
 	/* Type */
-	if ( 'my-groups' == $bp->current_action ) {
+	if ( 'my-groups' == $bp->current_action && !empty( $order ) ) {
 		if ( 'most-popular' == $order ) {
 			$type = 'popular';
 		} elseif ( 'alphabetically' == $order ) {
@@ -350,7 +350,7 @@
 		if ( !$group )
 			$group =& $groups_template->group;
 
-		return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/' );
+		return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/' );
 	}
 
 function bp_group_admin_permalink() {
@@ -362,7 +362,7 @@
 		if ( !$group )
 			$group =& $groups_template->group;
 
-		return apply_filters( 'bp_get_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/admin' );
+		return apply_filters( 'bp_get_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/admin' );
 	}
 
 function bp_group_slug() {
@@ -547,7 +547,7 @@
 function bp_group_is_activity_permalink() {
 	global $bp;
 
-	if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != $bp->activity->slug )
+	if ( !$bp->is_single_item || $bp->current_component != $bp->groups->root_slug || $bp->current_action != $bp->activity->slug )
 		return false;
 
 	return true;
@@ -929,24 +929,24 @@
 	$current_tab = $bp->action_variables[0];
 ?>
 	<?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?>
-		<li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
+		<li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
 	<?php } ?>
 
 	<?php
 		if ( !$bp->is_item_admin )
 			return false;
 	?>
-	<li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
-	<li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
-	<li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
+	<li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
+	<li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
+	<li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
 
 	<?php if ( $groups_template->group->status == 'private' ) : ?>
-		<li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
+		<li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
 	<?php endif; ?>
 
 	<?php do_action( 'groups_admin_tabs', $current_tab, $group->slug ) ?>
 
-	<li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
+	<li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
 <?php
 }
 
@@ -1929,7 +1929,7 @@
 function bp_is_group_admin_screen( $slug ) {
 	global $bp;
 
-	if ( $bp->current_component != BP_GROUPS_SLUG || 'admin' != $bp->current_action )
+	if ( !bp_core_is_current_component( 'groups' ) || 'admin' != $bp->current_action )
 		return false;
 
 	if ( $bp->action_variables[0] == $slug )
