<!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] [2276] trunk: Better public @
message usability with a button on a user profile page.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2276</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-09 09:31:33 +0000 (Sat, 09 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Better public @ message usability with a button on a user profile page. Made core userdata available for logged in and displayed user.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
<li><a href="#trunkbpcorebpcorewpabstractionphp">trunk/bp-core/bp-core-wpabstraction.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpfriendsbpfriendstemplatetagsphp">trunk/bp-friends/bp-friends-templatetags.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatetagsphp">trunk/bp-messages/bp-messages-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefault_incglobaljs">trunk/bp-themes/bp-default/_inc/global.js</a></li>
<li><a href="#trunkbpthemesbpdefaultactivitypostformphp">trunk/bp-themes/bp-default/activity/post-form.php</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssinglememberheaderphp">trunk/bp-themes/bp-default/members/single/member-header.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -665,7 +665,15 @@
</span><span class="cx">                 return apply_filters( 'bp_get_total_favorite_count_for_user', bp_activity_total_favorites_for_user( $user_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+function bp_send_public_message_link() {
+        echo bp_get_send_public_message_link();
+}
+        function bp_get_send_public_message_link() {
+                global $bp;
</ins><span class="cx">
</span><ins>+                return apply_filters( 'bp_get_send_public_message_link', $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . $bp->displayed_user->userdata->user_login );
+        }
+
</ins><span class="cx"> /* RSS Feed Template Tags ***************************/
</span><span class="cx">
</span><span class="cx"> function bp_sitewide_activity_feed_link() {
</span></span></pre></div>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-core/bp-core-classes.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -357,6 +357,15 @@
</span><span class="cx">
</span><span class="cx">                 return $paged_users;
</span><span class="cx">         }
</span><ins>+
+        function get_core_userdata( $user_id ) {
+                global $wpdb;
+
+                if ( !$user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id ) ) )
+                        return false;
+
+                return $user;
+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcorewpabstractionphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-wpabstraction.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-wpabstraction.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-core/bp-core-wpabstraction.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( !function_exists( 'get_site_option' ) ) {
</span><del>-        function get_site_option( $option_value ) {
-                return get_option( $option_value );
</del><ins>+        function get_site_option( $option_value, $default = false ) {
+                return get_option( $option_value, $default );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( !function_exists( 'get_blog_option' ) ) {
</span><del>-        function get_blog_option( $blog_id, $option_name ) {
-                return get_option( $option_name );
</del><ins>+        function get_blog_option( $blog_id, $option_name, $default = false ) {
+                return get_option( $option_name, $default );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-core.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -102,14 +102,20 @@
</span><span class="cx">         $bp->loggedin_user->id = $current_user->ID;
</span><span class="cx">
</span><span class="cx">         /* The domain for the user currently logged in. eg: http://domain.com/members/andy */
</span><del>-        $bp->loggedin_user->domain = bp_core_get_user_domain($current_user->ID);
</del><ins>+        $bp->loggedin_user->domain = bp_core_get_user_domain( $bp->loggedin_user->id );
</ins><span class="cx">
</span><ins>+        /* The core userdata of the user who is currently logged in. */
+        $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id );
+
</ins><span class="cx">         /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */
</span><span class="cx">         $bp->displayed_user->id = $displayed_user_id;
</span><span class="cx">
</span><span class="cx">         /* The domain for the user currently being displayed */
</span><del>-        $bp->displayed_user->domain = bp_core_get_user_domain($displayed_user_id);
</del><ins>+        $bp->displayed_user->domain = bp_core_get_user_domain( $bp->displayed_user->id );
</ins><span class="cx">
</span><ins>+        /* The core userdata of the user who is currently being displayed */
+        $bp->displayed_user->userdata = bp_core_get_core_userdata( $bp->displayed_user->id );
+
</ins><span class="cx">         /* The component being used eg: http://domain.com/members/andy/ [profile] */
</span><span class="cx">         $bp->current_component = $current_component; // type: string
</span><span class="cx">
</span><span class="lines">@@ -160,10 +166,10 @@
</span><span class="cx">         $bp->displayed_user->fullname = bp_core_get_user_displayname( $bp->displayed_user->id );
</span><span class="cx">
</span><span class="cx">         /* Used to determine if user has admin rights on current content. If the logged in user is viewing
</span><del>-         their own profile and wants to delete a post on their wire, is_item_admin is used. This is a
-         generic variable so it can be used in other components. It can also be modified, so when viewing a group
</del><ins>+         their own profile and wants to delete something, is_item_admin is used. This is a
+         generic variable so it can be used by other components. It can also be modified, so when viewing a group
</ins><span class="cx">          'is_item_admin' would be 1 if they are a group admin, 0 if they are not. */
</span><del>-        $bp->is_item_admin = bp_is_home();
</del><ins>+        $bp->is_item_admin = bp_is_my_profile();
</ins><span class="cx">
</span><span class="cx">         /* Used to determine if the logged in user is a moderator for the current content. */
</span><span class="cx">         $bp->is_item_mod = false;
</span><span class="lines">@@ -184,7 +190,7 @@
</span><span class="cx"> *
</span><span class="cx"> * Adds the core URIs that should run in the root of the installation.
</span><span class="cx"> *
</span><del>- * For example: http://example.org/search or http://example.org/members
</del><ins>+ * For example: http://example.org/search/ or http://example.org/members/
</ins><span class="cx"> *
</span><span class="cx"> * @package BuddyPress Core
</span><span class="cx"> * @uses bp_core_add_root_component() Adds a slug to the root components global variable.
</span><span class="lines">@@ -557,6 +563,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * bp_core_get_core_userdata()
+ *
+ * Fetch everything in the wp_users table for a user, without any usermeta.
+ *
+ * @package BuddyPress Core
+ * @param user_id The ID of the user.
+ * @uses BP_Core_User::get_core_userdata() Performs the query.
+ */
+function bp_core_get_core_userdata( $user_id ) {
+        if ( empty( $user_id ) )
+                return false;
+
+        return apply_filters( 'bp_core_get_core_userdata', BP_Core_User::get_core_userdata( $user_id ) );
+}
+
+/**
</ins><span class="cx"> * bp_core_get_root_domain()
</span><span class="cx"> *
</span><span class="cx"> * Returns the domain for the root blog.
</span><span class="lines">@@ -1021,6 +1043,9 @@
</span><span class="cx">                 $ud = get_userdata($uid);
</span><span class="cx">                 $email = $ud->user_email;
</span><span class="cx">         }
</span><ins>+
+        wp_cache_set( 'bp_user_email_' . $uid, $email, 'bp' );
+
</ins><span class="cx">         return apply_filters( 'bp_core_get_user_email', $email );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1047,23 +1072,12 @@
</span><span class="cx"> * @return str The link text based on passed parameters.
</span><span class="cx"> */
</span><span class="cx"> function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false, $deprecated = false, $with_s = false ) {
</span><del>-        global $userdata;
</del><span class="cx">
</span><del>-        $ud = get_userdata($user_id);
</del><ins>+        $display_name = bp_core_get_user_displayname( $user_id );
</ins><span class="cx">
</span><del>-        if ( !$ud )
-                return false;
</del><ins>+        if ( $with_s )
+                $display_name = sprintf( __( "%s's", 'buddypress' ), $display_name );
</ins><span class="cx">
</span><del>-        if ( function_exists( 'bp_core_get_user_displayname' ) ) {
-                $display_name = bp_core_get_user_displayname( $user_id );
-
-                if ( $with_s )
-                        $display_name = sprintf( __( "%s's", 'buddypress' ), $display_name );
-
-        } else {
-                $display_name = $ud->display_name;
-        }
-
</del><span class="cx">         if ( $no_anchor )
</span><span class="cx">                 return $display_name;
</span><span class="cx">
</span><span class="lines">@@ -1101,8 +1115,8 @@
</span><span class="cx">                 if ( function_exists('xprofile_install') ) {
</span><span class="cx">                         $fullname = xprofile_get_field_data( 1, $user_id );
</span><span class="cx">
</span><del>-                        if ( empty($fullname) || !$fullname ) {
-                                $ud = get_userdata($user_id);
</del><ins>+                        if ( empty($fullname) ) {
+                                $ud = get_userdata( $user_id );
</ins><span class="cx">
</span><span class="cx">                                 if ( !empty( $ud->display_name ) )
</span><span class="cx">                                         $fullname = $ud->display_name;
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-templatetags.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-templatetags.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-friends/bp-friends-templatetags.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -120,30 +120,28 @@
</span><span class="cx">         function bp_get_add_friend_button( $potential_friend_id = false ) {
</span><span class="cx">                 global $bp, $friends_template;
</span><span class="cx">
</span><del>-                $button = false;
</del><ins>+                if ( !is_user_logged_in() )
+                        return false;
</ins><span class="cx">
</span><del>-                if ( is_user_logged_in() ) {
</del><ins>+                if ( !$potential_friend_id && $friends_template->friendship->friend )
+                        $potential_friend_id = $friends_template->friendship->friend->id;
+                else if ( !$potential_friend_id && !$friends_template->friendship->friend )
+                        $potential_friend_id = $bp->displayed_user->id;
</ins><span class="cx">
</span><del>-                        if ( !$potential_friend_id && $friends_template->friendship->friend )
-                                $potential_friend_id = $friends_template->friendship->friend->id;
-                        else if ( !$potential_friend_id && !$friends_template->friendship->friend )
-                                $potential_friend_id = $bp->displayed_user->id;
</del><ins>+                if ( $bp->loggedin_user->id == $potential_friend_id )
+                        return false;
</ins><span class="cx">
</span><del>-                        if ( $bp->loggedin_user->id == $potential_friend_id )
-                                return false;
</del><ins>+                $friend_status = friends_check_friendship_status( $bp->loggedin_user->id, $potential_friend_id );
</ins><span class="cx">
</span><del>-                        $friend_status = BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $potential_friend_id );
-
-                        $button = '<div class="generic-button friendship-button ' . $friend_status . '" id="friendship-button-' . $potential_friend_id . '">';
-                        if ( 'pending' == $friend_status ) {
-                                $button .= '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
-                        } else if ( 'is_friend' == $friend_status ) {
-                                $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id, 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';
-                        } else {
-                                $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id, 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';
-                        }
-                        $button .= '</div>';
</del><ins>+                $button = '<div class="generic-button friendship-button ' . $friend_status . '" id="friendship-button-' . $potential_friend_id . '">';
+                if ( 'pending' == $friend_status ) {
+                        $button .= '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
+                } else if ( 'is_friend' == $friend_status ) {
+                        $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';
+                } else {
+                        $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';
</ins><span class="cx">                 }
</span><ins>+                $button .= '</div>';
</ins><span class="cx">
</span><span class="cx">                 return apply_filters( 'bp_get_add_friend_button', $button );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-friends.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -474,6 +474,11 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function friends_check_friendship_status( $user_id, $possible_friend_id ) {
+        /* Returns - 'is_friend', 'not_friends', 'pending' */
+        return BP_Friends_Friendship::check_is_friend( $user_id, $possible_friend_id );
+}
+
</ins><span class="cx"> function friends_get_total_friend_count( $user_id = false ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-templatetags.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-templatetags.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-messages/bp-messages-templatetags.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -435,6 +435,15 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_send_private_message_link() {
+        echo bp_get_send_private_message_link();
+}
+        function bp_get_send_private_message_link() {
+                global $bp;
+
+                return apply_filters( 'bp_get_send_public_message_link', $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . $bp->displayed_user->userdata->user_login );
+        }
+
</ins><span class="cx"> function bp_send_message_button() {
</span><span class="cx">         echo bp_get_send_message_button();
</span><span class="cx"> }
</span><span class="lines">@@ -444,9 +453,7 @@
</span><span class="cx">                 if ( bp_is_home() || !is_user_logged_in() )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                $ud = get_userdata( $bp->displayed_user->id );
-
-                return apply_filters( 'bp_get_send_message_button', '<div class="generic-button"><a class="send-message" title="' . __( 'Send Message', 'buddypress' ) . '" href="' . $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . $ud->user_login . '">' . __( 'Send Message', 'buddypress' ) . '</a></div>' );
</del><ins>+                return apply_filters( 'bp_get_send_message_button', '<div class="generic-button"><a class="send-message" title="' . __( 'Send Message', 'buddypress' ) . '" href="' . $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . $bp->displayed_user->userdata->user_login . '">' . __( 'Send Message', 'buddypress' ) . '</a></div>' );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_message_loading_image_src() {
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -357,7 +357,7 @@
</span><span class="cx">                         margin: 2px;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-        div#item-header div.generic-button {
</del><ins>+        div#item-header div.generic-button, div#item-header a.button {
</ins><span class="cx">                 float: left;
</span><span class="cx">                 margin: 10px 10px 0 0;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incglobaljs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/global.js (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/global.js        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-themes/bp-default/_inc/global.js        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -27,6 +27,14 @@
</span><span class="cx">                 bp_filter_request( j.cookie('bp-forums-type'), j.cookie('bp-forums-filter'), 'forums', 'div.forums', j.cookie('bp-forums-page'), j.cookie('bp-forums-search-terms') );
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        /* @message Compose Scrolling */
+        if ( j.query.get('r') ) {
+                if ( j('textarea#whats-new').length ) {
+                        j.scrollTo( j('textarea#whats-new'), 500, { offset:-75, easing:'easeout' } );
+                        j('textarea#whats-new').focus();
+                }
+        }
+
</ins><span class="cx">         /**** Activity Posting ********************************************************/
</span><span class="cx">
</span><span class="cx">         /* New posts */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivitypostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/post-form.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/post-form.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-themes/bp-default/activity/post-form.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">
</span><span class="cx">         <div id="whats-new-content">
</span><span class="cx">                 <div id="whats-new-textarea">
</span><del>-                        <textarea name="whats-new" id="whats-new" value="" /></textarea>
</del><ins>+                        <textarea name="whats-new" id="whats-new" value="" /><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ) ?> <?php endif; ?></textarea>
</ins><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <div id="whats-new-options">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-themes/bp-default/functions.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx">
</span><span class="cx"> /* Stop the theme from killing WordPress if BuddyPress is not enabled. */
</span><span class="cx"> if ( !class_exists( 'BP_Core_User' ) )
</span><del>-        return false;
</del><ins>+        return;
</ins><span class="cx">
</span><span class="cx"> /* Register the widget columns */
</span><span class="cx"> register_sidebars( 1,
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssinglememberheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/member-header.php (2275 => 2276)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/member-header.php        2010-01-07 14:11:09 UTC (rev 2275)
+++ trunk/bp-themes/bp-default/members/single/member-header.php        2010-01-09 09:31:33 UTC (rev 2276)
</span><span class="lines">@@ -8,13 +8,21 @@
</span><span class="cx">         </div>
</span><span class="cx">
</span><span class="cx">         <div id="item-buttons">
</span><del>-                <?php if ( function_exists('bp_add_friend_button') ) : ?>
</del><ins>+                <?php if ( function_exists( 'bp_add_friend_button' ) ) : ?>
</ins><span class="cx">                         <?php bp_add_friend_button() ?>
</span><span class="cx">                 <?php endif; ?>
</span><span class="cx">
</span><del>-                <?php if ( function_exists('bp_send_message_button') ) : ?>
-                        <?php bp_send_message_button() ?>
</del><ins>+                <?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_public_message_link' ) ) : ?>
+                        <div class="generic-button" id="send-public-message">
+                                <a href="<?php bp_send_public_message_link() ?>" title="<?php _e( 'Send a public message to this user', 'buddypress' ) ?>"><?php _e( 'Send Public Message', 'buddypress' ) ?></a>
+                        </div>
</ins><span class="cx">                 <?php endif; ?>
</span><ins>+
+                <?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_private_message_link' ) ) : ?>
+                        <div class="generic-button" id="send-private-message">
+                                <a href="<?php bp_send_private_message_link() ?>" title="<?php _e( 'Send a private message to this user', 'buddypress' ) ?>"><?php _e( 'Send Private Message', 'buddypress' ) ?></a>
+                        </div>
+                <?php endif; ?>
</ins><span class="cx">         </div>
</span><span class="cx">
</span><span class="cx">         <?php
</span></span></pre>
</div>
</div>
</body>
</html>