<!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] [2573] trunk:
  Replace hard coded paths with component constant slugs</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2573</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-02-03 19:53:15 +0000 (Wed, 03 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Replace hard coded paths with component constant slugs</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (2572 => 2573)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2010-02-03 17:28:38 UTC (rev 2572)
+++ trunk/bp-activity.php        2010-02-03 19:53:15 UTC (rev 2573)
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx"> 
</span><span class="cx">         /* Add the subnav items to the activity nav item if we are using a theme that supports this */
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'Personal', 'buddypress' ), 'slug' =&gt; 'just-me', 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_my_activity', 'position' =&gt; 10 ) );
</span><del>-        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Friends', 'buddypress' ), 'slug' =&gt; 'friends', 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_friends', 'position' =&gt; 20, 'item_css_id' =&gt; 'activity-friends' ) );
-        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Groups', 'buddypress' ), 'slug' =&gt; 'groups', 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_groups', 'position' =&gt; 30, 'item_css_id' =&gt; 'activity-groups' ) );
</del><ins>+        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Friends', 'buddypress' ), 'slug' =&gt; BP_FRIENDS_SLUG, 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_friends', 'position' =&gt; 20, 'item_css_id' =&gt; 'activity-friends' ) );
+        bp_core_new_subnav_item( array( 'name' =&gt; __( 'Groups', 'buddypress' ), 'slug' =&gt; BP_GROUPS_SLUG, 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_groups', 'position' =&gt; 30, 'item_css_id' =&gt; 'activity-groups' ) );
</ins><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'Favorites', 'buddypress' ), 'slug' =&gt; 'favorites', 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_favorites', 'position' =&gt; 40, 'item_css_id' =&gt; 'activity-favs' ) );
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; sprintf( __( '@%s Mentions', 'buddypress' ), $user_login ), 'slug' =&gt; 'mentions', 'parent_url' =&gt; $activity_link, 'parent_slug' =&gt; $bp-&gt;activity-&gt;slug, 'screen_function' =&gt; 'bp_activity_screen_mentions', 'position' =&gt; 50, 'item_css_id' =&gt; 'activity-mentions' ) );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (2572 => 2573)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2010-02-03 17:28:38 UTC (rev 2572)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2010-02-03 19:53:15 UTC (rev 2573)
</span><span class="lines">@@ -190,16 +190,16 @@
</span><span class="cx">                 $feed_url = site_url( BP_ACTIVITY_SLUG . '/feed/' );
</span><span class="cx"> 
</span><span class="cx">                 switch ( $scope ) {
</span><del>-                        case 'friends':
</del><ins>+                        case BP_FRIENDS_SLUG:
</ins><span class="cx">                                 $friend_ids = implode( ',', friends_get_friend_user_ids( $bp-&gt;loggedin_user-&gt;id ) );
</span><span class="cx">                                 $query_string = 'user_id=' . $friend_ids;
</span><del>-                                $feed_url = $bp-&gt;loggedin_user-&gt;domain . BP_ACTIVITY_SLUG . '/friends/feed/';
</del><ins>+                                $feed_url = $bp-&gt;loggedin_user-&gt;domain . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/feed/';
</ins><span class="cx">                                 break;
</span><del>-                        case 'groups':
</del><ins>+                        case BP_GROUPS_SLUG:
</ins><span class="cx">                                 $groups = groups_get_user_groups( $bp-&gt;loggedin_user-&gt;id );
</span><span class="cx">                                 $group_ids = implode( ',', $groups['groups'] );
</span><span class="cx">                                 $query_string = 'object=groups&amp;primary_id=' . $group_ids . '&amp;show_hidden=1';
</span><del>-                                $feed_url = $bp-&gt;loggedin_user-&gt;domain . BP_ACTIVITY_SLUG . '/groups/feed/';
</del><ins>+                                $feed_url = $bp-&gt;loggedin_user-&gt;domain . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/feed/';
</ins><span class="cx">                                 break;
</span><span class="cx">                         case 'favorites':
</span><span class="cx">                                 $favs = bp_activity_get_user_favorites( $bp-&gt;loggedin_user-&gt;id );
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2572 => 2573)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-02-03 17:28:38 UTC (rev 2572)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-02-03 19:53:15 UTC (rev 2573)
</span><span class="lines">@@ -23,13 +23,13 @@
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?&gt;
</span><span class="cx">                                                         &lt;?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?&gt;
</span><del>-                                                                &lt;li id=&quot;activity-friends&quot;&gt;&lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/friends/' ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of my friends only.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                                &lt;li id=&quot;activity-friends&quot;&gt;&lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of my friends only.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">                                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?&gt;
</span><span class="cx">                                                         &lt;?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?&gt;
</span><del>-                                                                &lt;li id=&quot;activity-groups&quot;&gt;&lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/groups/' ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                                &lt;li id=&quot;activity-groups&quot;&gt;&lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">                                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>