<!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] [2558] trunk: Fixes #1755</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2558</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-03 11:32:07 +0000 (Wed, 03 Feb 2010)</dd>
</dl>

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpmessagesbpmessagesclassesphp">trunk/bp-messages/bp-messages-classes.php</a></li>
<li><a href="#trunkbpmessagesphp">trunk/bp-messages.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="#trunkbpthemesbpdefaultmemberssingleprofilechangeavatarphp">trunk/bp-themes/bp-default/members/single/profile/change-avatar.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleprofileeditphp">trunk/bp-themes/bp-default/members/single/profile/edit.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleprofileprofileloopphp">trunk/bp-themes/bp-default/members/single/profile/profile-loop.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpmessagesbpmessagesclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-classes.php (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-classes.php        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-messages/bp-messages-classes.php        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">         function get_inbox_count() {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx"> 
</span><del>-                $sql = $wpdb-&gt;prepare( &quot;SELECT unread_count FROM {$bp-&gt;messages-&gt;table_name_recipients} WHERE user_id = %d AND is_deleted = 0&quot;, $bp-&gt;loggedin_user-&gt;id );
</del><ins>+                $sql = $wpdb-&gt;prepare( &quot;SELECT unread_count FROM {$bp-&gt;messages-&gt;table_name_recipients} WHERE user_id = %d AND is_deleted = 0 AND sender_only = 0&quot;, $bp-&gt;loggedin_user-&gt;id );
</ins><span class="cx"> 
</span><span class="cx">                 if ( !$unread_counts = $wpdb-&gt;get_results($sql) )
</span><span class="cx">                         return false;
</span></span></pre></div>
<a id="trunkbpmessagesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages.php (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages.php        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-messages.php        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -100,14 +100,13 @@
</span><span class="cx"> function messages_setup_nav() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( $bp-&gt;current_component == $bp-&gt;messages-&gt;slug ) {
-                $inbox_count = messages_get_unread_count();
-                $inbox_display = ( $inbox_count ) ? ' style=&quot;display:inline;&quot;' : ' style=&quot;display:none;&quot;';
-                $count_indicator = '&amp;nbsp; &lt;span' . $inbox_display . ' class=&quot;unread-count inbox-count&quot;&gt;' . $inbox_count . '&lt;/span&gt;';
-        }
</del><ins>+        if ( $count = messages_get_unread_count() )
+                $name = sprintf( __('Messages &lt;strong&gt;(%s)&lt;/strong&gt;', 'buddypress'), $count );
+        else
+                $name = __('Messages &lt;strong&gt;&lt;/strong&gt;', 'buddypress');
</ins><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', 'item_css_id' =&gt; $bp-&gt;messages-&gt;id ) );
</del><ins>+        bp_core_new_nav_item( array( 'name' =&gt; $name, '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="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -846,6 +846,8 @@
</span><span class="cx">                 width: auto;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        table.profile-fields { margin-bottom: 20px;}
+
</ins><span class="cx">         div#sidebar table {
</span><span class="cx">                 margin: 0 -16px;
</span><span class="cx">                 width: 117%;
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incglobaljs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/global.js (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/global.js        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-themes/bp-default/_inc/global.js        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -878,16 +878,19 @@
</span><span class="cx"> 
</span><span class="cx">                                         j('tr#m-' + j(this).attr('value') + ' td span.unread-count').html(unreadCount);
</span><span class="cx">                                         j('tr#m-' + j(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
</span><del>-                                        var inboxcount = j('.inbox-count').html();
</del><ins>+                                        var inboxcount = j('a#user-messages strong').html().substr( 1, j('a#user-messages strong').html().length );
+                                        var inboxcount = inboxcount.substr( 0, inboxcount.length - 1 );
</ins><span class="cx"> 
</span><ins>+                                        if ( !inboxcount.length )
+                                                inboxcount = 0;
</ins><span class="cx">                                         if ( parseInt(inboxcount) == inboxCount ) {
</span><del>-                                                j('.inbox-count').css('display', unreadCountDisplay);
-                                                j('.inbox-count').html(unreadCount);
</del><ins>+                                                j('a#user-messages strong').css('display', unreadCountDisplay);
+                                                j('a#user-messages strong').html( '(' + unreadCount + ')' );
</ins><span class="cx">                                         } else {
</span><span class="cx">                                                 if ( 'read' == currentClass )
</span><del>-                                                        j('.inbox-count').html(parseInt(inboxcount) + 1);
</del><ins>+                                                        j('a#user-messages strong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');
</ins><span class="cx">                                                 else
</span><del>-                                                        j('.inbox-count').html(parseInt(inboxcount) - thread_count);
</del><ins>+                                                        j('a#user-messages strong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');
</ins><span class="cx">                                         }
</span><span class="cx"> 
</span><span class="cx">                                         if ( i != checkboxes.length - 1 ) {
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleprofilechangeavatarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/change-avatar.php (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/change-avatar.php        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-themes/bp-default/members/single/profile/change-avatar.php        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-&lt;h3&gt;&lt;?php _e( 'Change Avatar', 'buddypress' ) ?&gt;&lt;/h3&gt;
</del><ins>+&lt;h4&gt;&lt;?php _e( 'Change Avatar', 'buddypress' ) ?&gt;&lt;/h4&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;?php do_action( 'bp_before_profile_avatar_upload_content' ) ?&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx">                 &lt;?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?&gt;
</span><span class="cx"> 
</span><del>-                        &lt;h3&gt;&lt;?php _e( 'Crop Your New Avatar', 'buddypress' ) ?&gt;&lt;/h3&gt;
</del><ins>+                        &lt;h5&gt;&lt;?php _e( 'Crop Your New Avatar', 'buddypress' ) ?&gt;&lt;/h5&gt;
</ins><span class="cx"> 
</span><span class="cx">                         &lt;img src=&quot;&lt;?php bp_avatar_to_crop() ?&gt;&quot; id=&quot;avatar-to-crop&quot; class=&quot;avatar&quot; alt=&quot;&lt;?php _e( 'Avatar to crop', 'buddypress' ) ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleprofileeditphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/edit.php (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/edit.php        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-themes/bp-default/members/single/profile/edit.php        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> 
</span><span class="cx">         &lt;?php do_action( 'bp_before_profile_field_content' ) ?&gt;
</span><span class="cx"> 
</span><del>-                &lt;h3&gt;&lt;?php printf( __( &quot;Editing '%s' Profile Group&quot;, &quot;buddypress&quot; ), bp_get_the_profile_group_name() ); ?&gt;&lt;/h3&gt;
</del><ins>+                &lt;h4&gt;&lt;?php printf( __( &quot;Editing '%s' Profile Group&quot;, &quot;buddypress&quot; ), bp_get_the_profile_group_name() ); ?&gt;&lt;/h4&gt;
</ins><span class="cx"> 
</span><span class="cx">                 &lt;ul class=&quot;button-nav&quot;&gt;
</span><span class="cx">                         &lt;?php bp_profile_group_tabs(); ?&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleprofileprofileloopphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/profile-loop.php (2557 => 2558)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/profile-loop.php        2010-02-03 10:48:09 UTC (rev 2557)
+++ trunk/bp-themes/bp-default/members/single/profile/profile-loop.php        2010-02-03 11:32:07 UTC (rev 2558)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">                                 &lt;?php do_action( 'bp_before_profile_field_content' ) ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;div class=&quot;bp-widget &lt;?php bp_the_profile_group_slug() ?&gt;&quot;&gt;
</span><del>-                                        &lt;h3&gt;&lt;?php bp_the_profile_group_name() ?&gt;&lt;/h3&gt;
</del><ins>+                                        &lt;h4&gt;&lt;?php bp_the_profile_group_name() ?&gt;&lt;/h4&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;table class=&quot;profile-fields&quot;&gt;
</span><span class="cx">                                                 &lt;?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>