<!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' => __( 'Personal', 'buddypress' ), 'slug' => 'just-me', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 10 ) );
</span><del>-        bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => 'friends', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) );
-        bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => 'groups', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) );
</del><ins>+        bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => BP_FRIENDS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) );
+        bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => BP_GROUPS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) );
</ins><span class="cx">         bp_core_new_subnav_item( array( 'name' => __( 'Favorites', 'buddypress' ), 'slug' => 'favorites', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_favorites', 'position' => 40, 'item_css_id' => 'activity-favs' ) );
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' => sprintf( __( '@%s Mentions', 'buddypress' ), $user_login ), 'slug' => 'mentions', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_mentions', 'position' => 50, 'item_css_id' => '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->loggedin_user->id ) );
</span><span class="cx">                                 $query_string = 'user_id=' . $friend_ids;
</span><del>-                                $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/friends/feed/';
</del><ins>+                                $feed_url = $bp->loggedin_user->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->loggedin_user->id );
</span><span class="cx">                                 $group_ids = implode( ',', $groups['groups'] );
</span><span class="cx">                                 $query_string = 'object=groups&primary_id=' . $group_ids . '&show_hidden=1';
</span><del>-                                $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/groups/feed/';
</del><ins>+                                $feed_url = $bp->loggedin_user->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->loggedin_user->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">                                                 <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
</span><span class="cx">                                                         <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</span><del>-                                                                <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/friends/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
</del><ins>+                                                                <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
</ins><span class="cx">                                                         <?php endif; ?>
</span><span class="cx">                                                 <?php endif; ?>
</span><span class="cx">
</span><span class="cx">                                                 <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
</span><span class="cx">                                                         <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
</span><del>-                                                                <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/groups/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
</del><ins>+                                                                <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
</ins><span class="cx">                                                         <?php endif; ?>
</span><span class="cx">                                                 <?php endif; ?>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>