<!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" />
<title>[BuddyPress][3952] trunk: Break BuddyBar parts up into their individual components and out of bp-core.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3952</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-27 15:57:16 +0000 (Thu, 27 Jan 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Break BuddyBar parts up into their individual components and out of bp-core.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcorebuddybarphp">trunk/bp-core/bp-core-buddybar.php</a></li>
<li><a href="#trunkbpcorebpcorehooksphp">trunk/bp-core/bp-core-hooks.php</a></li>
<li><a href="#trunkbpmembersbpmembersloaderphp">trunk/bp-members/bp-members-loader.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbpblogsbpblogsbuddybarphp">trunk/bp-blogs/bp-blogs-buddybar.php</a></li>
<li><a href="#trunkbpmembersbpmembersbuddybarphp">trunk/bp-members/bp-members-buddybar.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpblogsbpblogsbuddybarphp"></a>
<div class="addfile"><h4>Added: trunk/bp-blogs/bp-blogs-buddybar.php (0 => 3952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-buddybar.php         (rev 0)
+++ trunk/bp-blogs/bp-blogs-buddybar.php        2011-01-27 15:57:16 UTC (rev 3952)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+<?php
+
+// *** "My Blogs" Menu ********
+function bp_adminbar_blogs_menu() {
+        global $bp;
+
+        if ( !is_user_logged_in() || !bp_is_active( 'blogs' ) )
+                return false;
+
+        if ( !is_multisite() )
+                return false;
+
+        if ( !$blogs = wp_cache_get( 'bp_blogs_of_user_' . $bp->loggedin_user->id . '_inc_hidden', 'bp' ) ) {
+                $blogs = bp_blogs_get_blogs_for_user( $bp->loggedin_user->id, true );
+                wp_cache_set( 'bp_blogs_of_user_' . $bp->loggedin_user->id . '_inc_hidden', $blogs, 'bp' );
+        }
+
+        $counter = 0;
+        if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) {
+
+                echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( $bp->loggedin_user->domain . $bp->blogs->slug ) . '">';
+
+                _e( 'My Blogs', 'buddypress' );
+
+                echo '</a>';
+                echo '<ul>';
+
+                foreach ( (array)$blogs['blogs'] as $blog ) {
+                        $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
+                        $site_url = esc_attr( $blog->siteurl );
+
+                        echo '<li' . $alt . '>';
+                        echo '<a href="' . $site_url . '">' . esc_html( $blog->name ) . '</a>';
+                        echo '<ul>';
+                        echo '<li class="alt"><a href="' . $site_url . 'wp-admin/">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';
+                        echo '<li><a href="' . $site_url . 'wp-admin/post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';
+                        echo '<li class="alt"><a href="' . $site_url . 'wp-admin/edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';
+                        echo '<li><a href="' . $site_url . 'wp-admin/edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';
+                        echo '</ul>';
+
+                        do_action( 'bp_adminbar_blog_items', $blog );
+
+                        echo '</li>';
+                        $counter++;
+                }
+
+                $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
+
+                if ( bp_blog_signup_enabled() ) {
+                        echo '<li' . $alt . '>';
+                        echo '<a href="' . $bp->root_domain . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog!', 'buddypress' ) . '</a>';
+                        echo '</li>';
+                }
+
+                echo '</ul>';
+                echo '</li>';
+        }
+}
+add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 );
+
+?>
</ins><span class="cx">Property changes on: trunk/bp-blogs/bp-blogs-buddybar.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkbpcorebpcorebuddybarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-buddybar.php (3951 => 3952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-buddybar.php        2011-01-27 15:40:28 UTC (rev 3951)
+++ trunk/bp-core/bp-core-buddybar.php        2011-01-27 15:57:16 UTC (rev 3952)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> <?php
</span><span class="cx">
</span><del>-
</del><span class="cx"> /**
</span><span class="cx"> * Adds a navigation item to the main navigation array used in BuddyPress themes.
</span><span class="cx"> *
</span><span class="lines">@@ -293,7 +292,7 @@
</span><span class="cx"> /** Template functions ********************************************************/
</span><span class="cx">
</span><span class="cx"> function bp_core_admin_bar() {
</span><del>-        global $bp, $wpdb, $current_blog;
</del><ins>+        global $bp;
</ins><span class="cx">
</span><span class="cx">         if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -323,7 +322,7 @@
</span><span class="cx"> function bp_adminbar_logo() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        echo '<a href="' . $bp->root_domain . '" id="admin-bar-logo">' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '</a>';
</del><ins>+        echo '<a href="' . $bp->root_domain . '" id="admin-bar-logo">' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '</a>';
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // **** "Log In" and "Sign Up" links (Visible when not logged in) ********
</span><span class="lines">@@ -349,7 +348,6 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         echo '<li id="bp-adminbar-account-menu"><a href="' . bp_loggedin_user_domain() . '">';
</span><del>-
</del><span class="cx">         echo __( 'My Account', 'buddypress' ) . '</a>';
</span><span class="cx">         echo '<ul>';
</span><span class="cx">
</span><span class="lines">@@ -397,69 +395,10 @@
</span><span class="cx">         echo '</li>';
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// *** "My Blogs" Menu ********
-function bp_adminbar_blogs_menu() {
-        global $bp;
-
-        if ( !is_user_logged_in() || !bp_is_active( 'blogs' ) )
-                return false;
-
-        if ( !is_multisite() )
-                return false;
-
-        if ( !$blogs = wp_cache_get( 'bp_blogs_of_user_' . $bp->loggedin_user->id . '_inc_hidden', 'bp' ) ) {
-                $blogs = bp_blogs_get_blogs_for_user( $bp->loggedin_user->id, true );
-                wp_cache_set( 'bp_blogs_of_user_' . $bp->loggedin_user->id . '_inc_hidden', $blogs, 'bp' );
-        }
-
-        $counter = 0;
-        if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) {
-
-                echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( $bp->loggedin_user->domain . $bp->blogs->slug ) . '">';
-
-                _e( 'My Blogs', 'buddypress' );
-
-                echo '</a>';
-                echo '<ul>';
-
-                foreach ( (array)$blogs['blogs'] as $blog ) {
-                        $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
-                        $site_url = esc_attr( $blog->siteurl );
-
-                        echo '<li' . $alt . '>';
-                        echo '<a href="' . $site_url . '">' . esc_html( $blog->name ) . '</a>';
-                        echo '<ul>';
-                        echo '<li class="alt"><a href="' . $site_url . 'wp-admin/">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';
-                        echo '<li><a href="' . $site_url . 'wp-admin/post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';
-                        echo '<li class="alt"><a href="' . $site_url . 'wp-admin/edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';
-                        echo '<li><a href="' . $site_url . 'wp-admin/edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';
-                        echo '</ul>';
-
-                        do_action( 'bp_adminbar_blog_items', $blog );
-
-                        echo '</li>';
-                        $counter++;
-                }
-
-                $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';
-
-                if ( bp_blog_signup_enabled() ) {
-                        echo '<li' . $alt . '>';
-                        echo '<a href="' . $bp->root_domain . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Blog!', 'buddypress' ) . '</a>';
-                        echo '</li>';
-                }
-
-                echo '</ul>';
-                echo '</li>';
-        }
-}
-
</del><span class="cx"> function bp_adminbar_thisblog_menu() {
</span><span class="cx">         if ( current_user_can( 'edit_posts' ) ) {
</span><span class="cx">                 echo '<li id="bp-adminbar-thisblog-menu"><a href="' . admin_url() . '">';
</span><del>-
</del><span class="cx">                 _e( 'Dashboard', 'buddypress' );
</span><del>-
</del><span class="cx">                 echo '</a>';
</span><span class="cx">                 echo '<ul>';
</span><span class="cx">
</span><span class="lines">@@ -474,82 +413,7 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// **** "Notifications" Menu *********
-function bp_adminbar_notifications_menu() {
-        global $bp;
</del><span class="cx">
</span><del>-        if ( !is_user_logged_in() )
-                return false;
-
-        echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">';
-        _e( 'Notifications', 'buddypress' );
-
-        if ( $notifications = bp_members_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
-                <span><?php echo count( $notifications ) ?></span>
-        <?php
-        }
-
-        echo '</a>';
-        echo '<ul>';
-
-        if ( $notifications ) {
-                $counter = 0;
-                for ( $i = 0; $i < count($notifications); $i++ ) {
-                        $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
-
-                        <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
-
-                        <?php $counter++;
-                }
-        } else { ?>
-
-                <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
-
-        <?php
-        }
-
-        echo '</ul>';
-        echo '</li>';
-}
-
-// **** "Blog Authors" Menu (visible when not logged in) ********
-function bp_adminbar_authors_menu() {
-        global $bp, $current_blog, $wpdb;
-
-        // Only for multisite
-        if ( !is_multisite() )
-                return false;
-
-        // Hide on root blog
-        if ( $current_blog->blog_id == BP_ROOT_BLOG || !bp_is_active( 'blogs' ) )
-                return false;
-
-        $blog_prefix = $wpdb->get_blog_prefix( $current_blog->blog_id );
-        $authors = $wpdb->get_results( "SELECT user_id, user_login, user_nicename, display_name, user_email, meta_value as caps FROM $wpdb->users u, $wpdb->usermeta um WHERE u.ID = um.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY um.user_id" );
-
-        if ( !empty( $authors ) ) {
-                // This is a blog, render a menu with links to all authors
-                echo '<li id="bp-adminbar-authors-menu"><a href="/">';
-                _e('Blog Authors', 'buddypress');
-                echo '</a>';
-
-                echo '<ul class="author-list">';
-                foreach( (array)$authors as $author ) {
-                        $caps = maybe_unserialize( $author->caps );
-                        if ( isset( $caps['subscriber'] ) || isset( $caps['contributor'] ) ) continue;
-
-                        echo '<li>';
-                        echo '<a href="' . bp_core_get_user_domain( $author->user_id, $author->user_nicename, $author->user_login ) . '">';
-                        echo bp_core_fetch_avatar( array( 'item_id' => $author->user_id, 'email' => $author->user_email, 'width' => 15, 'height' => 15 ) ) ;
-                         echo ' ' . $author->display_name . '</a>';
-                        echo '<div class="admin-bar-clear"></div>';
-                        echo '</li>';
-                }
-                echo '</ul>';
-                echo '</li>';
-        }
-}
-
</del><span class="cx"> // **** "Random" Menu (visible when not logged in) ********
</span><span class="cx"> function bp_adminbar_random_menu() {
</span><span class="cx">         global $bp; ?>
</span><span class="lines">@@ -557,17 +421,17 @@
</span><span class="cx">         <li class="align-right" id="bp-adminbar-visitrandom-menu">
</span><span class="cx">                 <a href="#"><?php _e( 'Visit', 'buddypress' ) ?></a>
</span><span class="cx">                 <ul class="random-list">
</span><del>-                        <li><a href="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/?random-member' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>
</del><ins>+                        <li><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->members->root_slug ) . '?random-member' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>
</ins><span class="cx">
</span><span class="cx">                         <?php if ( bp_is_active( 'groups' ) ) : ?>
</span><span class="cx">
</span><del>-                                <li class="alt"><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/?random-group' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>
</del><ins>+                                <li class="alt"><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->groups->root_slug ) . '?random-group' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>
</ins><span class="cx">
</span><span class="cx">                         <?php endif; ?>
</span><span class="cx">
</span><del>-                        <?php if ( bp_is_active( 'blogs' ) && is_multisite() ) : ?>
</del><ins>+                        <?php if ( is_multisite() && bp_is_active( 'blogs' ) ) : ?>
</ins><span class="cx">
</span><del>-                                <li><a href="<?php echo $bp->root_domain . '/' . $bp->blogs->slug . '/?random-blog' ?>"><?php _e( 'Random Blog', 'buddypress' ) ?></a></li>
</del><ins>+                                <li><a href="<?php echo trailingslashit( $bp->root_domain . '/' . $bp->blogs->root_slug ) . '?random-blog' ?>"><?php _e( 'Random Blog', 'buddypress' ) ?></a></li>
</ins><span class="cx">
</span><span class="cx">                         <?php endif; ?>
</span><span class="cx">
</span><span class="lines">@@ -593,10 +457,7 @@
</span><span class="cx">                 add_action( 'bp_adminbar_logo', 'bp_adminbar_logo' );
</span><span class="cx">                 add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );
</span><span class="cx">                 add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu', 4 );
</span><del>-                add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 );
</del><span class="cx">                 add_action( 'bp_adminbar_menus', 'bp_adminbar_thisblog_menu', 6 );
</span><del>-                add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 );
-                add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 );
</del><span class="cx">                 add_action( 'bp_adminbar_menus', 'bp_adminbar_random_menu', 100 );
</span><span class="cx">
</span><span class="cx">                 // Actions used to append BP admin bar to footer
</span></span></pre></div>
<a id="trunkbpcorebpcorehooksphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-hooks.php (3951 => 3952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-hooks.php        2011-01-27 15:40:28 UTC (rev 3951)
+++ trunk/bp-core/bp-core-hooks.php        2011-01-27 15:57:16 UTC (rev 3952)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> add_action( 'bp_init', 'bp_setup_widgets', 8 );
</span><span class="cx">         
</span><span class="cx"> // Setup admin bar
</span><del>-add_action( 'bp_loaded', 'bp_core_load_admin_bar' );
</del><ins>+add_action( 'bp_loaded', 'bp_core_load_admin_bar' );
</ins><span class="cx">
</span><span class="cx"> /** The hooks *****************************************************************/
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpmembersbpmembersbuddybarphp"></a>
<div class="addfile"><h4>Added: trunk/bp-members/bp-members-buddybar.php (0 => 3952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-buddybar.php         (rev 0)
+++ trunk/bp-members/bp-members-buddybar.php        2011-01-27 15:57:16 UTC (rev 3952)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+<?php
+
+// **** "Notifications" Menu *********
+function bp_adminbar_notifications_menu() {
+        global $bp;
+
+        if ( !is_user_logged_in() )
+                return false;
+
+        echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">';
+        _e( 'Notifications', 'buddypress' );
+
+        if ( $notifications = bp_members_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
+                <span><?php echo count( $notifications ) ?></span>
+        <?php
+        }
+
+        echo '</a>';
+        echo '<ul>';
+
+        if ( $notifications ) {
+                $counter = 0;
+                for ( $i = 0; $i < count($notifications); $i++ ) {
+                        $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
+
+                        <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
+
+                        <?php $counter++;
+                }
+        } else { ?>
+
+                <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
+
+        <?php
+        }
+
+        echo '</ul>';
+        echo '</li>';
+}
+add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 );
+
+// **** "Blog Authors" Menu (visible when not logged in) ********
+function bp_adminbar_authors_menu() {
+        global $bp, $current_blog, $wpdb;
+
+        // Only for multisite
+        if ( !is_multisite() )
+                return false;
+
+        // Hide on root blog
+        if ( $current_blog->blog_id == BP_ROOT_BLOG || !bp_is_active( 'blogs' ) )
+                return false;
+
+        $blog_prefix = $wpdb->get_blog_prefix( $current_blog->blog_id );
+        $authors = $wpdb->get_results( "SELECT user_id, user_login, user_nicename, display_name, user_email, meta_value as caps FROM $wpdb->users u, $wpdb->usermeta um WHERE u.ID = um.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY um.user_id" );
+
+        if ( !empty( $authors ) ) {
+                // This is a blog, render a menu with links to all authors
+                echo '<li id="bp-adminbar-authors-menu"><a href="/">';
+                _e('Blog Authors', 'buddypress');
+                echo '</a>';
+
+                echo '<ul class="author-list">';
+                foreach( (array)$authors as $author ) {
+                        $caps = maybe_unserialize( $author->caps );
+                        if ( isset( $caps['subscriber'] ) || isset( $caps['contributor'] ) ) continue;
+
+                        echo '<li>';
+                        echo '<a href="' . bp_core_get_user_domain( $author->user_id, $author->user_nicename, $author->user_login ) . '">';
+                        echo bp_core_fetch_avatar( array( 'item_id' => $author->user_id, 'email' => $author->user_email, 'width' => 15, 'height' => 15 ) ) ;
+                         echo ' ' . $author->display_name . '</a>';
+                        echo '<div class="admin-bar-clear"></div>';
+                        echo '</li>';
+                }
+                echo '</ul>';
+                echo '</li>';
+        }
+}
+add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 );
+
+?>
</ins><span class="cx">Property changes on: trunk/bp-members/bp-members-buddybar.php
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkbpmembersbpmembersloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-loader.php (3951 => 3952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-loader.php        2011-01-27 15:40:28 UTC (rev 3951)
+++ trunk/bp-members/bp-members-loader.php        2011-01-27 15:57:16 UTC (rev 3952)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">                         'filters',
</span><span class="cx">                         'screens',
</span><span class="cx">                         'template',
</span><ins>+                        'buddybar',
</ins><span class="cx">                         'functions',
</span><span class="cx">                         'notifications',
</span><span class="cx">                 );
</span></span></pre>
</div>
</div>
</body>
</html>