<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [1718] trunk: Fixes #723</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1718</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-08-27 21:18:10 +0000 (Thu, 27 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes #723</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpcorebpcorecatchuriphp">trunk/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#trunkbpcorebpcoresettingsphp">trunk/bp-core/bp-core-settings.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpcoredeprecatedbpcoredeprecatedphp">trunk/bp-core/deprecated/bp-core-deprecated.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpforumsphp">trunk/bp-forums.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpmessagesphp">trunk/bp-messages.php</a></li>
<li><a href="#trunkbpstatusphp">trunk/bp-status.php</a></li>
<li><a href="#trunkbpwirebpwiretemplatetagsphp">trunk/bp-wire/bp-wire-templatetags.php</a></li>
<li><a href="#trunkbpwirephp">trunk/bp-wire.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-activity.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -59,6 +59,9 @@
</span><span class="cx">         
</span><span class="cx">         $bp-&gt;activity-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_activity_user_activity_cached';
</span><span class="cx">         $bp-&gt;activity-&gt;slug = BP_ACTIVITY_SLUG;
</span><ins>+        
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;activity-&gt;slug] = $bp-&gt;activity-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'bp_activity_setup_globals', 5 );
</span><span class="cx"> add_action( 'admin_menu', 'bp_activity_setup_globals', 2 );
</span><span class="lines">@@ -81,7 +84,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         /* Add 'Activity' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __( 'Activity', 'buddypress' ), 'slug' =&gt; $bp-&gt;activity-&gt;slug, 'position' =&gt; 10, 'screen_function' =&gt; 'bp_activity_screen_my_activity', 'default_subnav_slug' =&gt; 'just-me' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __( 'Activity', 'buddypress' ), 'slug' =&gt; $bp-&gt;activity-&gt;slug, 'position' =&gt; 10, 'screen_function' =&gt; 'bp_activity_screen_my_activity', 'default_subnav_slug' =&gt; 'just-me', 'item_css_id' =&gt; $bp-&gt;activity-&gt;id ) );
</ins><span class="cx"> 
</span><span class="cx">         $activity_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;activity-&gt;slug . '/';
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-blogs.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -116,6 +116,9 @@
</span><span class="cx">         $bp-&gt;blogs-&gt;table_name_blogmeta = $wpdb-&gt;base_prefix . 'bp_user_blogs_blogmeta';
</span><span class="cx">         $bp-&gt;blogs-&gt;format_notification_function = 'bp_blogs_format_notifications';
</span><span class="cx">         $bp-&gt;blogs-&gt;slug = BP_BLOGS_SLUG;
</span><ins>+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;blogs-&gt;slug] = $bp-&gt;blogs-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'bp_blogs_setup_globals', 5 );        
</span><span class="cx"> add_action( 'admin_menu', 'bp_blogs_setup_globals', 1 );
</span><span class="lines">@@ -139,7 +142,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="cx">         /* Add 'Blogs' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __( 'Blogs', 'buddypress' ), 'slug' =&gt; $bp-&gt;blogs-&gt;slug, 'position' =&gt; 30, 'screen_function' =&gt; 'bp_blogs_screen_my_blogs', 'default_subnav_slug' =&gt; 'my-blogs' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __( 'Blogs', 'buddypress' ), 'slug' =&gt; $bp-&gt;blogs-&gt;slug, 'position' =&gt; 30, 'screen_function' =&gt; 'bp_blogs_screen_my_blogs', 'default_subnav_slug' =&gt; 'my-blogs', 'item_css_id' =&gt; $bp-&gt;blogs-&gt;id ) );
</ins><span class="cx">         
</span><span class="cx">         $blogs_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;blogs-&gt;slug . '/';
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-catchuri.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-catchuri.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-core/bp-core-catchuri.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -114,9 +114,10 @@
</span><span class="cx">                         $is_new_friend = 1;
</span><span class="cx">                         unset($bp_uri[2]);
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 /* Reset the keys by merging with an empty array */
</span><span class="cx">                 $bp_uri = array_merge( array(), $bp_uri );
</span><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( !isset($is_root_component) )
</span></span></pre></div>
<a id="trunkbpcorebpcoresettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-settings.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-settings.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-core/bp-core-settings.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -1,17 +1,28 @@
</span><span class="cx"> &lt;?php
</span><ins>+
+if ( !defined( 'BP_SETTINGS_SLUG' ) )
+        define( 'BP_SETTINGS_SLUG', 'settings' );
+        
</ins><span class="cx"> function bp_core_add_settings_nav() {
</span><span class="cx">         global $bp;
</span><ins>+        
+        /* Set up settings as a sudo-component for identification and nav selection */
+        $bp-&gt;settings-&gt;id = 'settings';
+        $bp-&gt;settings-&gt;slug = BP_SETTINGS_SLUG;
+        
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;settings-&gt;slug] = $bp-&gt;settings-&gt;id;
</ins><span class="cx"> 
</span><span class="cx">         /* Add the settings navigation item */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Settings', 'buddypress'), 'slug' =&gt; 'settings', 'position' =&gt; 100, 'show_for_displayed_user' =&gt; false, 'screen_function' =&gt; 'bp_core_screen_general_settings', 'default_subnav_slug' =&gt; 'general' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Settings', 'buddypress'), 'slug' =&gt; $bp-&gt;settings-&gt;slug, 'position' =&gt; 100, 'show_for_displayed_user' =&gt; false, 'screen_function' =&gt; 'bp_core_screen_general_settings', 'default_subnav_slug' =&gt; 'general' ) );
</ins><span class="cx"> 
</span><span class="cx">         $settings_link = $bp-&gt;loggedin_user-&gt;domain . 'settings/';
</span><span class="cx">         
</span><del>-        bp_core_new_subnav_item( array( 'name' =&gt; __( 'General', 'buddypress' ), 'slug' =&gt; 'general', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; 'settings', 'screen_function' =&gt; 'bp_core_screen_general_settings', 'position' =&gt; 10, 'user_has_access' =&gt; bp_is_home() ) );
-        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Notifications', 'buddypress' ), 'slug' =&gt; 'notifications', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; 'settings', 'screen_function' =&gt; 'bp_core_screen_notification_settings', 'position' =&gt; 20, 'user_has_access' =&gt; bp_is_home() ) );
</del><ins>+        bp_core_new_subnav_item( array( 'name' =&gt; __( 'General', 'buddypress' ), 'slug' =&gt; 'general', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_general_settings', 'position' =&gt; 10, 'user_has_access' =&gt; bp_is_home() ) );
+        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Notifications', 'buddypress' ), 'slug' =&gt; 'notifications', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_notification_settings', 'position' =&gt; 20, 'user_has_access' =&gt; bp_is_home() ) );
</ins><span class="cx">         
</span><span class="cx">         if ( !is_site_admin() )
</span><del>-                bp_core_new_subnav_item( array( 'name' =&gt; __( 'Delete Account', 'buddypress' ), 'slug' =&gt; 'delete-account', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; 'settings', 'screen_function' =&gt; 'bp_core_screen_delete_account', 'position' =&gt; 90, 'user_has_access' =&gt; bp_is_home() ) );
</del><ins>+                bp_core_new_subnav_item( array( 'name' =&gt; __( 'Delete Account', 'buddypress' ), 'slug' =&gt; 'delete-account', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_delete_account', 'position' =&gt; 90, 'user_has_access' =&gt; bp_is_home() ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'wp', 'bp_core_add_settings_nav', 2 );
</span><span class="cx"> add_action( 'admin_menu', 'bp_core_add_settings_nav', 2 );
</span><span class="lines">@@ -29,16 +40,14 @@
</span><span class="cx">                 
</span><span class="cx">                 // Form has been submitted and nonce checks out, lets do it.
</span><span class="cx">                 
</span><del>-                if ( $_POST['email'] != '' ) {
-                        $current_user-&gt;user_email = wp_specialchars( trim( $_POST['email'] ));
-                }
</del><ins>+                if ( $_POST['email'] != '' )
+                        $current_user-&gt;user_email = wp_specialchars( trim( $_POST['email'] ) );
</ins><span class="cx"> 
</span><span class="cx">                 if ( $_POST['pass1'] != '' &amp;&amp; $_POST['pass2'] != '' ) {
</span><del>-                        if ( $_POST['pass1'] == $_POST['pass2'] &amp;&amp; !strpos( &quot; &quot; . $_POST['pass1'], &quot;\\&quot; ) ) {
</del><ins>+                        if ( $_POST['pass1'] == $_POST['pass2'] &amp;&amp; !strpos( &quot; &quot; . $_POST['pass1'], &quot;\\&quot; ) )
</ins><span class="cx">                                 $current_user-&gt;user_pass = $_POST['pass1'];
</span><del>-                        } else {
</del><ins>+                        else
</ins><span class="cx">                                 $pass_error = true;
</span><del>-                        }
</del><span class="cx">                 } else if ( empty( $_POST['pass1'] ) &amp;&amp; !empty( $_POST['pass2'] ) || !empty( $_POST['pass1'] ) &amp;&amp; empty( $_POST['pass2'] ) ) {
</span><span class="cx">                         $pass_error = true;
</span><span class="cx">                 } else {
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-core/bp-core-templatetags.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">         /* Loop through each navigation item */
</span><span class="cx">         foreach( (array) $bp-&gt;bp_nav as $nav_item ) {
</span><span class="cx">                 /* If the current component matches the nav item id, then add a highlight CSS class. */
</span><del>-                if ( $bp-&gt;current_component == $nav_item['css_id'] ) {
</del><ins>+                if ( $bp-&gt;active_components[$bp-&gt;current_component] == $nav_item['css_id'] ) {
</ins><span class="cx">                         $selected = ' class=&quot;current&quot;';
</span><span class="cx">                 } else {
</span><span class="cx">                         $selected = '';
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                         $selected = '';
</span><span class="cx">                         
</span><span class="cx">                         if ( function_exists('friends_install') ) {
</span><del>-                                if ( $nav_item['css_id'] == $bp-&gt;friends-&gt;slug ) {
</del><ins>+                                if ( $nav_item['css_id'] == $bp-&gt;friends-&gt;id ) {
</ins><span class="cx">                                         if ( friends_check_friendship( $bp-&gt;loggedin_user-&gt;id, $bp-&gt;displayed_user-&gt;id ) )
</span><span class="cx">                                                 $selected = ' class=&quot;current&quot;';
</span><span class="cx">                                 }
</span></span></pre></div>
<a id="trunkbpcoredeprecatedbpcoredeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/deprecated/bp-core-deprecated.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/deprecated/bp-core-deprecated.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-core/deprecated/bp-core-deprecated.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -939,3 +939,23 @@
</span><span class="cx">         &lt;?php endif;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* DEPRECATED - use the param 'default_subnav_slug' in bp_core_new_nav_item() */
+function bp_core_add_nav_default( $parent_id, $function, $slug = false, $user_has_access = true, $admin_only = false ) {
+        global $bp;
+        
+        if ( !$user_has_access &amp;&amp; !bp_is_home() )
+                return false;
+                
+        if ( $admin_only &amp;&amp; !is_site_admin() )
+                return false;
+
+        if ( $bp-&gt;current_component == $parent_id &amp;&amp; !$bp-&gt;current_action ) {
+                if ( function_exists($function) ) {
+                        add_action( 'wp', $function, 3 );
+                }
+                
+                if ( $slug )
+                        $bp-&gt;current_action = $slug;
+        }
+}
+
</ins></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-core.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -136,6 +136,9 @@
</span><span class="cx">         /* Sets up container used for the avatar of the current component being viewed. Rendered by bp_get_options_avatar() */
</span><span class="cx">         $bp-&gt;bp_options_avatar = '';
</span><span class="cx">         
</span><ins>+        /* Contains an array of all the active components. The key is the slug, value the internal ID of the component */
+        $bp-&gt;active_components = array();
+        
</ins><span class="cx">         /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */
</span><span class="cx">         $bp-&gt;grav_default-&gt;user = apply_filters( 'bp_user_gravatar_default', get_site_option( 'user-avatar-default' ) );
</span><span class="cx">         $bp-&gt;grav_default-&gt;group = apply_filters( 'bp_group_gravatar_default', 'identicon' );
</span><span class="lines">@@ -552,9 +555,9 @@
</span><span class="cx">                 'parent_slug' =&gt; false, // URL slug of the parent nav item
</span><span class="cx">                 'parent_url' =&gt; false, // URL of the parent item
</span><span class="cx">                 'item_css_id' =&gt; false, // The CSS ID to apply to the HTML of the nav item
</span><del>-                'user_has_access' =&gt; true, // Can the user see this nav item?
</del><ins>+                'user_has_access' =&gt; true, // Can the logged in user see this nav item?
</ins><span class="cx">                 'site_admin_only' =&gt; false, // Can only site admins see this nav item?
</span><del>-                'position' =&gt; 90, // Index of where should this nav item be positioned
</del><ins>+                'position' =&gt; 90, // Index of where this nav item should be positioned
</ins><span class="cx">                 'screen_function' =&gt; false // The name of the function to run when clicked
</span><span class="cx">         );
</span><span class="cx">         
</span><span class="lines">@@ -578,7 +581,7 @@
</span><span class="cx">                 'slug' =&gt; $slug,
</span><span class="cx">                 'css_id' =&gt; $item_css_id,
</span><span class="cx">                 'position' =&gt; $position
</span><del>-        );         
</del><ins>+        );
</ins><span class="cx">                 
</span><span class="cx">         if ( $bp-&gt;current_action == $slug &amp;&amp; $bp-&gt;current_component == $parent_slug &amp;&amp; $user_has_access ) {
</span><span class="cx">                 if ( !is_object($screen_function[0]) )
</span><span class="lines">@@ -648,38 +651,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * bp_core_add_nav_default()
- *
- * Set a default action for a nav item, when a sub nav item has not yet been selected.
- * 
- * @package BuddyPress Core
- * @param $parent_id The id of the parent navigation item.
- * @param $function The function to run when this sub nav item is selected.
- * @param $slug The slug of the sub nav item to highlight.
- * @uses is_site_admin() returns true if the current user is a site admin, false if not
- * @uses bp_is_home() Returns true if the current user being viewed is equal the logged in user
- * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
- */
-function bp_core_add_nav_default( $parent_id, $function, $slug = false, $user_has_access = true, $admin_only = false ) {
-        global $bp;
-        
-        if ( !$user_has_access &amp;&amp; !bp_is_home() )
-                return false;
-                
-        if ( $admin_only &amp;&amp; !is_site_admin() )
-                return false;
-
-        if ( $bp-&gt;current_component == $parent_id &amp;&amp; !$bp-&gt;current_action ) {
-                if ( function_exists($function) ) {
-                        add_action( 'wp', $function, 3 );
-                }
-                
-                if ( $slug )
-                        $bp-&gt;current_action = $slug;
-        }
-}
-
-/**
</del><span class="cx">  * bp_core_load_template()
</span><span class="cx">  *
</span><span class="cx">  * Uses the bp_catch_uri function to load a specific template file with fallback support.
</span></span></pre></div>
<a id="trunkbpforumsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-forums.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -2,7 +2,10 @@
</span><span class="cx"> 
</span><span class="cx"> /* Define the parent forum ID */
</span><span class="cx"> if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) )
</span><del>-        define ( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
</del><ins>+        define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
+        
+if ( !defined( 'BP_FORUMS_SLUG' ) )
+        define( 'BP_FORUMS_SLUG', 'forums' );
</ins><span class="cx"> 
</span><span class="cx"> require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-bbpress.php' );
</span><span class="cx"> require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-classes.php' );
</span><span class="lines">@@ -17,6 +20,10 @@
</span><span class="cx">                 
</span><span class="cx">         $bp-&gt;forums-&gt;image_base = BP_PLUGIN_URL . '/bp-forums/images';
</span><span class="cx">         $bp-&gt;forums-&gt;bbconfig = get_site_option( 'bb-config-location' );
</span><ins>+        $bp-&gt;forums-&gt;slug = BP_FORUMS_SLUG;
+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;forums-&gt;slug] = $bp-&gt;forums-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'bp_forums_setup', 5 );
</span><span class="cx"> add_action( 'admin_head', 'bp_forums_setup', 3 );
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-friends.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -47,6 +47,8 @@
</span><span class="cx">         $bp-&gt;friends-&gt;format_notification_function = 'friends_format_notifications';
</span><span class="cx">         $bp-&gt;friends-&gt;slug = BP_FRIENDS_SLUG;
</span><span class="cx"> 
</span><ins>+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;friends-&gt;slug] = $bp-&gt;friends-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'friends_setup_globals', 5 );        
</span><span class="cx"> add_action( 'admin_menu', 'friends_setup_globals', 1 );
</span><span class="lines">@@ -67,7 +69,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="cx">         /* Add 'Friends' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Friends', 'buddypress'), 'slug' =&gt; $bp-&gt;friends-&gt;slug, 'position' =&gt; 60, 'screen_function' =&gt; 'friends_screen_my_friends', 'default_subnav_slug' =&gt; 'my-friends' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Friends', 'buddypress'), 'slug' =&gt; $bp-&gt;friends-&gt;slug, 'position' =&gt; 60, 'screen_function' =&gt; 'friends_screen_my_friends', 'default_subnav_slug' =&gt; 'my-friends', 'item_css_id' =&gt; $bp-&gt;friends-&gt;id ) );
</ins><span class="cx">         
</span><span class="cx">         $friends_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;friends-&gt;slug . '/';
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-groups/bp-groups-classes.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -11,10 +11,7 @@
</span><span class="cx">         var $enable_wire;
</span><span class="cx">         var $enable_forum;
</span><span class="cx">         var $date_created;
</span><del>-        
-        var $avatar_thumb;
-        var $avatar_full;
-        
</del><ins>+
</ins><span class="cx">         var $user_dataset;
</span><span class="cx">         
</span><span class="cx">         var $admins;
</span><span class="lines">@@ -51,19 +48,7 @@
</span><span class="cx">                         $this-&gt;enable_forum = $group-&gt;enable_forum;
</span><span class="cx">                         $this-&gt;date_created = strtotime($group-&gt;date_created);
</span><span class="cx">                         $this-&gt;total_member_count = groups_get_groupmeta( $this-&gt;id, 'total_member_count' );
</span><del>-
-                        $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
</del><span class="cx">                         
</span><del>-                        if ( !$group-&gt;avatar_thumb || strpos( $group-&gt;avatar_thumb, 'none-thumbnail' ) )
-                                $this-&gt;avatar_thumb =  $gravatar_url . md5( $this-&gt;id . '@' . $bp-&gt;root_domain ) . '?d=identicon&amp;amp;s=50';
-                        else
-                                $this-&gt;avatar_thumb = $group-&gt;avatar_thumb;
-                        
-                        if ( !$group-&gt;avatar_full || strpos( $group-&gt;avatar_thumb, 'none-' ) )
-                                $this-&gt;avatar_full = $gravatar_url . md5( $this-&gt;id . '@' . $bp-&gt;root_domain ) . '?d=identicon&amp;amp;s=150';
-                        else
-                                $this-&gt;avatar_full = $group-&gt;avatar_full;
-                        
</del><span class="cx">                         if ( $get_user_dataset ) {
</span><span class="cx">                                 $this-&gt;user_dataset = $this-&gt;get_user_dataset();
</span><span class="cx">                                 
</span><span class="lines">@@ -94,8 +79,6 @@
</span><span class="cx">                 $this-&gt;enable_wire = apply_filters( 'groups_group_enable_wire_before_save', $this-&gt;enable_wire, $this-&gt;id );
</span><span class="cx">                 $this-&gt;enable_forum = apply_filters( 'groups_group_enable_forum_before_save', $this-&gt;enable_forum, $this-&gt;id );
</span><span class="cx">                 $this-&gt;date_created = apply_filters( 'groups_group_date_created_before_save', $this-&gt;date_created, $this-&gt;id );
</span><del>-                $this-&gt;avatar_thumb = apply_filters( 'groups_group_avatar_thumb_before_save', $this-&gt;avatar_thumb, $this-&gt;id );
-                $this-&gt;avatar_full = apply_filters( 'groups_group_avatar_full_before_save', $this-&gt;avatar_full, $this-&gt;id );
</del><span class="cx"> 
</span><span class="cx">                 do_action( 'groups_group_before_save', $this );
</span><span class="cx">                 
</span><span class="lines">@@ -110,9 +93,7 @@
</span><span class="cx">                                         status = %s, 
</span><span class="cx">                                         enable_wire = %d, 
</span><span class="cx">                                         enable_forum = %d, 
</span><del>-                                        date_created = FROM_UNIXTIME(%d), 
-                                        avatar_thumb = %s, 
-                                        avatar_full = %s
</del><ins>+                                        date_created = FROM_UNIXTIME(%d)
</ins><span class="cx">                                 WHERE
</span><span class="cx">                                         id = %d
</span><span class="cx">                                 &quot;,
</span><span class="lines">@@ -124,9 +105,7 @@
</span><span class="cx">                                         $this-&gt;status, 
</span><span class="cx">                                         $this-&gt;enable_wire, 
</span><span class="cx">                                         $this-&gt;enable_forum, 
</span><del>-                                        $this-&gt;date_created, 
-                                        $this-&gt;avatar_thumb, 
-                                        $this-&gt;avatar_full,
</del><ins>+                                        $this-&gt;date_created,
</ins><span class="cx">                                         $this-&gt;id
</span><span class="cx">                         );
</span><span class="cx">                 } else {
</span><span class="lines">@@ -140,11 +119,9 @@
</span><span class="cx">                                         status,
</span><span class="cx">                                         enable_wire,
</span><span class="cx">                                         enable_forum,
</span><del>-                                        date_created,
-                                        avatar_thumb,
-                                        avatar_full
</del><ins>+                                        date_created
</ins><span class="cx">                                 ) VALUES (
</span><del>-                                        %d, %s, %s, %s, %s, %s, %d, %d, FROM_UNIXTIME(%d), %s, %s
</del><ins>+                                        %d, %s, %s, %s, %s, %s, %d, %d, FROM_UNIXTIME(%d)
</ins><span class="cx">                                 )&quot;,
</span><span class="cx">                                         $this-&gt;creator_id, 
</span><span class="cx">                                         $this-&gt;name, 
</span><span class="lines">@@ -154,9 +131,7 @@
</span><span class="cx">                                         $this-&gt;status, 
</span><span class="cx">                                         $this-&gt;enable_wire, 
</span><span class="cx">                                         $this-&gt;enable_forum,
</span><del>-                                        $this-&gt;date_created, 
-                                        $this-&gt;avatar_thumb, 
-                                        $this-&gt;avatar_full 
</del><ins>+                                        $this-&gt;date_created
</ins><span class="cx">                         );
</span><span class="cx">                 }
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-groups.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -130,7 +130,10 @@
</span><span class="cx">         $bp-&gt;groups-&gt;table_name_groupmeta = $wpdb-&gt;base_prefix . 'bp_groups_groupmeta';
</span><span class="cx">         $bp-&gt;groups-&gt;format_notification_function = 'groups_format_notifications';
</span><span class="cx">         $bp-&gt;groups-&gt;slug = BP_GROUPS_SLUG;
</span><del>-        
</del><ins>+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;groups-&gt;slug] = $bp-&gt;groups-&gt;id;
+                
</ins><span class="cx">         if ( function_exists('bp_wire_install') )
</span><span class="cx">                 $bp-&gt;groups-&gt;table_name_wire = $wpdb-&gt;base_prefix . 'bp_groups_wire';
</span><span class="cx">         
</span><span class="lines">@@ -208,7 +211,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Add 'Groups' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Groups', 'buddypress'), 'slug' =&gt; $bp-&gt;groups-&gt;slug, 'position' =&gt; 70, 'screen_function' =&gt; 'groups_screen_my_groups', 'default_subnav_slug' =&gt; 'my-groups' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Groups', 'buddypress'), 'slug' =&gt; $bp-&gt;groups-&gt;slug, 'position' =&gt; 70, 'screen_function' =&gt; 'groups_screen_my_groups', 'default_subnav_slug' =&gt; 'my-groups', 'item_css_id' =&gt; $bp-&gt;groups-&gt;id ) );
</ins><span class="cx">         
</span><span class="cx">         $groups_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;groups-&gt;slug . '/';
</span><span class="cx">         
</span><span class="lines">@@ -276,7 +279,7 @@
</span><span class="cx">                                 bp_core_new_subnav_item( array( 'name' =&gt; __( 'Forum', 'buddypress' ), 'slug' =&gt; 'forum', 'parent_url' =&gt; $group_link, 'parent_slug' =&gt; $bp-&gt;groups-&gt;slug, 'screen_function' =&gt; 'groups_screen_group_forum', 'position' =&gt; 40, 'user_has_access' =&gt; $bp-&gt;groups-&gt;current_group-&gt;user_has_access, 'item_css_id' =&gt; 'group-forum' ) );
</span><span class="cx"> 
</span><span class="cx">                         if ( $bp-&gt;groups-&gt;current_group-&gt;enable_wire &amp;&amp; function_exists('bp_wire_install') )
</span><del>-                                bp_core_new_subnav_item( array( 'name' =&gt; __( 'Wire', 'buddypress' ), 'slug' =&gt; 'wire', 'parent_url' =&gt; $group_link, 'parent_slug' =&gt; $bp-&gt;groups-&gt;slug, 'screen_function' =&gt; 'groups_screen_group_wire', 'position' =&gt; 50, 'user_has_access' =&gt; $bp-&gt;groups-&gt;current_group-&gt;user_has_access, 'item_css_id' =&gt; 'group-wire'  ) );
</del><ins>+                                bp_core_new_subnav_item( array( 'name' =&gt; __( 'Wire', 'buddypress' ), 'slug' =&gt; BP_WIRE_SLUG, 'parent_url' =&gt; $group_link, 'parent_slug' =&gt; $bp-&gt;groups-&gt;slug, 'screen_function' =&gt; 'groups_screen_group_wire', 'position' =&gt; 50, 'user_has_access' =&gt; $bp-&gt;groups-&gt;current_group-&gt;user_has_access, 'item_css_id' =&gt; 'group-wire'  ) );
</ins><span class="cx"> 
</span><span class="cx">                         bp_core_new_subnav_item( array( 'name' =&gt; __( 'Members', 'buddypress' ), 'slug' =&gt; 'members', 'parent_url' =&gt; $group_link, 'parent_slug' =&gt; $bp-&gt;groups-&gt;slug, 'screen_function' =&gt; 'groups_screen_group_members', 'position' =&gt; 60, 'user_has_access' =&gt; $bp-&gt;groups-&gt;current_group-&gt;user_has_access, 'item_css_id' =&gt; 'group-members'  ) );
</span><span class="cx">                         
</span></span></pre></div>
<a id="trunkbpmessagesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-messages.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -84,6 +84,9 @@
</span><span class="cx">         $bp-&gt;messages-&gt;format_activity_function = 'messages_format_activity';
</span><span class="cx">         $bp-&gt;messages-&gt;format_notification_function = 'messages_format_notifications';
</span><span class="cx">         $bp-&gt;messages-&gt;slug = BP_MESSAGES_SLUG;
</span><ins>+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;messages-&gt;slug] = $bp-&gt;messages-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'messages_setup_globals', 5 );        
</span><span class="cx"> add_action( 'admin_menu', 'messages_setup_globals', 1 );
</span><span class="lines">@@ -110,7 +113,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* Add 'Messages' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Messages', 'buddypress'), 'slug' =&gt; $bp-&gt;messages-&gt;slug, 'position' =&gt; 50, 'show_for_displayed_user' =&gt; false, 'screen_function' =&gt; 'messages_screen_inbox', 'default_subnav_slug' =&gt; 'inbox'  ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Messages', 'buddypress'), 'slug' =&gt; $bp-&gt;messages-&gt;slug, 'position' =&gt; 50, 'show_for_displayed_user' =&gt; false, 'screen_function' =&gt; 'messages_screen_inbox', 'default_subnav_slug' =&gt; 'inbox', 'item_css_id' =&gt; $bp-&gt;messages-&gt;id ) );
</ins><span class="cx">         
</span><span class="cx">         $messages_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;messages-&gt;slug . '/';
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpstatusphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-status.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-status.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-status.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -5,6 +5,19 @@
</span><span class="cx"> require ( BP_PLUGIN_DIR . '/bp-status/bp-status-templatetags.php' );
</span><span class="cx"> require ( BP_PLUGIN_DIR . '/bp-status/bp-status-filters.php' );
</span><span class="cx"> 
</span><ins>+function bp_status_setup_globals() {
+        global $bp, $wpdb;
+
+        /* For internal identification */
+        $bp-&gt;status-&gt;id = 'status';
+        $bp-&gt;status-&gt;slug = BP_STATUS_SLUG;
+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;status-&gt;slug] = $bp-&gt;status-&gt;id;
+}
+add_action( 'plugins_loaded', 'bp_status_setup_globals', 5 );        
+add_action( 'admin_menu', 'bp_status_setup_globals', 1 );
+
</ins><span class="cx"> function bp_status_record_activity( $user_id, $content, $primary_link ) {
</span><span class="cx">         if ( !function_exists( 'bp_activity_add' ) )
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="trunkbpwirebpwiretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-wire/bp-wire-templatetags.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-wire/bp-wire-templatetags.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-wire/bp-wire-templatetags.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">                                 bp_core_delete_notifications_for_user_by_type( $bp-&gt;loggedin_user-&gt;id, 'xprofile', 'new_wire_post' );
</span><span class="cx">                         
</span><span class="cx">                 } else {
</span><del>-                        $this-&gt;table_name = $bp-&gt;{$component_slug}-&gt;table_name_wire;
</del><ins>+                        $this-&gt;table_name = $bp-&gt;{$bp-&gt;active_components[$component_slug]}-&gt;table_name_wire;
</ins><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 $this-&gt;pag_page = isset( $_REQUEST['wpage'] ) ? intval( $_REQUEST['wpage'] ) : 1;
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                 if ( $this-&gt;current_wire_post + 1 &lt; $this-&gt;wire_post_count ) {
</span><span class="cx">                         return true;
</span><span class="cx">                 } elseif ( $this-&gt;current_wire_post + 1 == $this-&gt;wire_post_count ) {
</span><del>-                        do_action('loop_end');
</del><ins>+                        do_action('bp_wire_loop_end');
</ins><span class="cx">                         // Do some cleaning up after the loop
</span><span class="cx">                         $this-&gt;rewind_wire_posts();
</span><span class="cx">                 }
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">                 $this-&gt;wire_post = $this-&gt;next_wire_post();
</span><span class="cx"> 
</span><span class="cx">                 if ( 0 == $this-&gt;current_wire_post ) // loop has just started
</span><del>-                        do_action('loop_start');
</del><ins>+                        do_action('bp_wire_loop_start');
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">                 if ( $bp-&gt;current_component == $bp-&gt;wire-&gt;slug || $bp-&gt;current_component == $bp-&gt;profile-&gt;slug ) {
</span><span class="cx">                         return apply_filters( 'bp_get_wire_get_action', $bp-&gt;displayed_user-&gt;domain . $bp-&gt;wire-&gt;slug . '/post/' );
</span><span class="cx">                 } else {
</span><del>-                        return apply_filters( 'bp_get_wire_get_action', site_url() . '/' . $bp-&gt;{$bp-&gt;current_component}-&gt;slug . '/' . $uri . '/' . $bp-&gt;wire-&gt;slug . '/post/' );
</del><ins>+                        return apply_filters( 'bp_get_wire_get_action', site_url() . '/' . $bp-&gt;{$bp-&gt;active_components[$bp-&gt;current_component]}-&gt;slug . '/' . $uri . '/' . $bp-&gt;wire-&gt;slug . '/post/' );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpwirephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-wire.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-wire.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-wire.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx">         $bp-&gt;wire-&gt;id = 'wire';
</span><span class="cx">         
</span><span class="cx">         $bp-&gt;wire-&gt;slug = BP_WIRE_SLUG;
</span><ins>+        
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;wire-&gt;slug] = $bp-&gt;wire-&gt;id;
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'bp_wire_setup_globals', 5 );        
</span><span class="cx"> add_action( 'admin_menu', 'bp_wire_setup_globals', 1 );
</span><span class="lines">@@ -31,7 +34,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         /* Add 'Wire' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Wire', 'buddypress'), 'slug' =&gt; $bp-&gt;wire-&gt;slug, 'position' =&gt; 40, 'screen_function' =&gt; 'bp_wire_screen_latest', 'default_subnav_slug' =&gt; 'all-posts', '' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Wire', 'buddypress'), 'slug' =&gt; $bp-&gt;wire-&gt;slug, 'position' =&gt; 40, 'screen_function' =&gt; 'bp_wire_screen_latest', 'default_subnav_slug' =&gt; 'all-posts', 'item_css_id' =&gt; $bp-&gt;wire-&gt;id ) );
</ins><span class="cx"> 
</span><span class="cx">         $wire_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;wire-&gt;slug . '/';
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (1717 => 1718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2009-08-27 20:40:07 UTC (rev 1717)
+++ trunk/bp-xprofile.php        2009-08-27 21:18:10 UTC (rev 1718)
</span><span class="lines">@@ -140,7 +140,10 @@
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;profile-&gt;format_notification_function = 'xprofile_format_notifications';
</span><span class="cx">         $bp-&gt;profile-&gt;slug = BP_XPROFILE_SLUG;
</span><del>-        
</del><ins>+
+        /* Register this in the active components array */
+        $bp-&gt;active_components[$bp-&gt;profile-&gt;slug] = $bp-&gt;profile-&gt;id;
+                
</ins><span class="cx">         $bp-&gt;profile-&gt;field_types = apply_filters( 'xprofile_field_types', array( 'textbox', 'textarea', 'radio', 'checkbox', 'selectbox', 'multiselectbox', 'datebox' ) );
</span><span class="cx"> 
</span><span class="cx">         if ( function_exists('bp_wire_install') )
</span><span class="lines">@@ -199,7 +202,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="cx">         /* Add 'Profile' to the main navigation */
</span><del>-        bp_core_new_nav_item( array( 'name' =&gt; __('Profile', 'buddypress'), 'slug' =&gt; $bp-&gt;profile-&gt;slug, 'position' =&gt; 20, 'screen_function' =&gt; 'xprofile_screen_display_profile', 'default_subnav_slug' =&gt; 'public' ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; __('Profile', 'buddypress'), 'slug' =&gt; $bp-&gt;profile-&gt;slug, 'position' =&gt; 20, 'screen_function' =&gt; 'xprofile_screen_display_profile', 'default_subnav_slug' =&gt; 'public', 'item_css_id' =&gt; $bp-&gt;profile-&gt;id ) );
</ins><span class="cx"> 
</span><span class="cx">         $profile_link = $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;profile-&gt;slug . '/';
</span><span class="cx">         
</span></span></pre>
</div>
</div>

</body>
</html>