<!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] [3443] trunk: Use WordPress' gravatar settings.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>3443</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2010-11-18 21:31:44 +0000 (Thu, 18 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use WordPress' gravatar settings. See #2712.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcoreadminbpcoreadminphp">trunk/bp-core/admin/bp-core-admin.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcoreadminbpcoreadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-admin.php (3442 => 3443)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-admin.php        2010-11-18 19:48:44 UTC (rev 3442)
+++ trunk/bp-core/admin/bp-core-admin.php        2010-11-18 21:31:44 UTC (rev 3443)
</span><span class="lines">@@ -124,18 +124,6 @@
</span><span class="cx">                                 &lt;/tr&gt;
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><del>-                                &lt;tr&gt;
-                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Default User Avatar', 'buddypress' ) ?&gt;&lt;/th&gt;
-                                        &lt;td&gt;
-                                                &lt;p&gt;&lt;?php _e( 'For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email address', 'buddypress' ) ?&gt;&lt;/p&gt;
-
-                                                &lt;label&gt;&lt;input name=&quot;bp-admin[user-avatar-default]&quot; id=&quot;avatar_mystery&quot; value=&quot;mystery&quot; type=&quot;radio&quot; &lt;?php if ( get_site_option( 'user-avatar-default' ) == 'mystery' ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; /&gt; &amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;http://www.gravatar.com/avatar/&lt;?php md5( $ud-&gt;user_email ) ?&gt;&amp;amp;?s=32&amp;amp;d=&lt;?php echo BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg' ?&gt;&amp;amp;r=PG&amp;amp;forcedefault=1&quot; class=&quot;avatar avatar-32&quot; height=&quot;32&quot; width=&quot;32&quot;&gt; &amp;nbsp;&lt;?php _e( 'Mystery Man', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;br&gt;
-                                                &lt;label&gt;&lt;input name=&quot;bp-admin[user-avatar-default]&quot; id=&quot;avatar_identicon&quot; value=&quot;identicon&quot; type=&quot;radio&quot; &lt;?php if ( get_site_option( 'user-avatar-default' ) == 'identicon' ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; /&gt; &amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;http://www.gravatar.com/avatar/&lt;?php md5( $ud-&gt;user_email ) ?&gt;?s=32&amp;amp;d=identicon&amp;amp;r=PG&amp;amp;forcedefault=1&quot; class=&quot;avatar avatar-32&quot; height=&quot;32&quot; width=&quot;32&quot;&gt; &amp;nbsp;&lt;?php _e( 'Identicon (Generated)', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;br&gt;
-                                                &lt;label&gt;&lt;input name=&quot;bp-admin[user-avatar-default]&quot; id=&quot;avatar_wavatar&quot; value=&quot;wavatar&quot; type=&quot;radio&quot; &lt;?php if ( get_site_option( 'user-avatar-default' ) == 'wavatar' ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; /&gt; &amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;http://www.gravatar.com/avatar/&lt;?php md5( $ud-&gt;user_email ) ?&gt;?s=32&amp;amp;d=wavatar&amp;amp;r=PG&amp;amp;forcedefault=1&quot; class=&quot;avatar avatar-32&quot; height=&quot;32&quot; width=&quot;32&quot;&gt; &amp;nbsp;&lt;?php _e( 'Wavatar (Generated)', 'buddypress' ) ?&gt; &lt;/label&gt;&lt;br&gt;
-                                                &lt;label&gt;&lt;input name=&quot;bp-admin[user-avatar-default]&quot; id=&quot;avatar_monsterid&quot; value=&quot;monsterid&quot; type=&quot;radio&quot; &lt;?php if ( get_site_option( 'user-avatar-default' ) == 'monsterid' ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; /&gt; &amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;http://www.gravatar.com/avatar/&lt;?php md5( $ud-&gt;user_email ) ?&gt;?s=32&amp;amp;d=monsterid&amp;amp;r=PG&amp;amp;forcedefault=1&quot; class=&quot;avatar avatar-32&quot; height=&quot;32&quot; width=&quot;32&quot;&gt; &amp;nbsp;&lt;?php _e( 'MonsterID (Generated)', 'buddypress' ) ?&gt;&lt;/label&gt;
-                                        &lt;/td&gt;
-                                &lt;/tr&gt;
-
</del><span class="cx">                                 &lt;?php do_action( 'bp_core_admin_screen_fields' ) ?&gt;
</span><span class="cx">                         &lt;/tbody&gt;
</span><span class="cx">                         &lt;/table&gt;
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (3442 => 3443)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-11-18 19:48:44 UTC (rev 3442)
+++ trunk/bp-core.php        2010-11-18 21:31:44 UTC (rev 3443)
</span><span class="lines">@@ -72,58 +72,58 @@
</span><span class="cx"> 
</span><span class="cx">         $current_user = wp_get_current_user();
</span><span class="cx"> 
</span><del>-        /* Get the base database prefix */
</del><ins>+        // Get the base database prefix
</ins><span class="cx">         $bp-&gt;table_prefix = bp_core_get_table_prefix();
</span><span class="cx"> 
</span><del>-        /* The domain for the root of the site where the main blog resides */
</del><ins>+        // The domain for the root of the site where the main blog resides
</ins><span class="cx">         $bp-&gt;root_domain = bp_core_get_root_domain();
</span><span class="cx"> 
</span><del>-        /* The names of the core WordPress pages used to display BuddyPress content */
</del><ins>+        // The names of the core WordPress pages used to display BuddyPress content
</ins><span class="cx">         $bp-&gt;pages = $bp_pages;
</span><span class="cx"> 
</span><del>-        /* Set up the members id and active components entry */
</del><ins>+        // Set up the members id and active components entry
</ins><span class="cx">         $bp-&gt;members-&gt;id = 'members';
</span><span class="cx">         $bp-&gt;members-&gt;slug = $bp-&gt;pages-&gt;members-&gt;slug;
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;members-&gt;slug] = $bp-&gt;members-&gt;id;
</span><span class="cx"> 
</span><del>-        /* The user ID of the user who is currently logged in. */
</del><ins>+        // The user ID of the user who is currently logged in.
</ins><span class="cx">         $bp-&gt;loggedin_user-&gt;id = $current_user-&gt;ID;
</span><span class="cx"> 
</span><del>-        /* The domain for the user currently logged in. eg: http://domain.com/members/andy */
</del><ins>+        // The domain for the user currently logged in. eg: http://domain.com/members/andy
</ins><span class="cx">         $bp-&gt;loggedin_user-&gt;domain = bp_core_get_user_domain( $bp-&gt;loggedin_user-&gt;id );
</span><span class="cx"> 
</span><del>-        /* The core userdata of the user who is currently logged in. */
</del><ins>+        // The core userdata of the user who is currently logged in.
</ins><span class="cx">         $bp-&gt;loggedin_user-&gt;userdata = bp_core_get_core_userdata( $bp-&gt;loggedin_user-&gt;id );
</span><span class="cx"> 
</span><del>-        /* is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */
</del><ins>+        // is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop.
</ins><span class="cx">         $bp-&gt;loggedin_user-&gt;is_super_admin = is_super_admin();
</span><span class="cx">         $bp-&gt;loggedin_user-&gt;is_site_admin  = $bp-&gt;loggedin_user-&gt;is_super_admin; // deprecated 1.2.6
</span><span class="cx"> 
</span><del>-        /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */
</del><ins>+        // The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php
</ins><span class="cx">         $bp-&gt;displayed_user-&gt;id = $displayed_user_id;
</span><span class="cx"> 
</span><del>-        /* The domain for the user currently being displayed */
</del><ins>+        // The domain for the user currently being displayed
</ins><span class="cx">         $bp-&gt;displayed_user-&gt;domain = bp_core_get_user_domain( $bp-&gt;displayed_user-&gt;id );
</span><span class="cx"> 
</span><del>-        /* The core userdata of the user who is currently being displayed */
</del><ins>+        // The core userdata of the user who is currently being displayed
</ins><span class="cx">         $bp-&gt;displayed_user-&gt;userdata = bp_core_get_core_userdata( $bp-&gt;displayed_user-&gt;id );
</span><span class="cx"> 
</span><del>-        /* The component being used eg: http://domain.com/members/andy/ [profile] */
</del><ins>+        // The component being used eg: http://domain.com/members/andy/ [profile]
</ins><span class="cx">         $bp-&gt;current_component = $current_component; // type: string
</span><span class="cx"> 
</span><del>-        /* The current action for the component eg: http://domain.com/members/andy/profile/ [edit] */
</del><ins>+        // The current action for the component eg: http://domain.com/members/andy/profile/ [edit]
</ins><span class="cx">         $bp-&gt;current_action = $current_action; // type: string
</span><span class="cx"> 
</span><del>-        /* The action variables for the current action eg: http://domain.com/members/andy/profile/edit/ [group] / [6] */
</del><ins>+        // The action variables for the current action eg: http://domain.com/members/andy/profile/edit/ [group] / [6]
</ins><span class="cx">         $bp-&gt;action_variables = $action_variables; // type: array
</span><span class="cx"> 
</span><del>-        /* Only used where a component has a sub item, e.g. groups: http://domain.com/members/andy/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/
</del><ins>+        // Only used where a component has a sub item, e.g. groups: http://domain.com/members/andy/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.
</ins><span class="cx">         $bp-&gt;current_item = ''; // type: string
</span><span class="cx"> 
</span><del>-        /* Used for overriding the 2nd level navigation menu so it can be used to display custom navigation for an item (for example a group) */
</del><ins>+        // Used for overriding the 2nd level navigation menu so it can be used to display custom navigation for an item (for example a group)
</ins><span class="cx">         $bp-&gt;is_single_item = false;
</span><span class="cx"> 
</span><del>-        /* The default component to use if none are set and someone visits: http://domain.com/members/andy */
</del><ins>+        // The default component to use if none are set and someone visits: http://domain.com/members/andy
</ins><span class="cx">         if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) {
</span><span class="cx">                 if ( isset( $bp-&gt;pages-&gt;activity ) )
</span><span class="cx">                         $bp-&gt;default_component = $bp-&gt;pages-&gt;activity-&gt;name;
</span><span class="lines">@@ -133,25 +133,24 @@
</span><span class="cx">                 $bp-&gt;default_component = BP_DEFAULT_COMPONENT;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        /* Fetches all of the core database based BuddyPress settings in one foul swoop */
</del><ins>+        // Fetches all of the core database based BuddyPress settings in one foul swoop
</ins><span class="cx">         $bp-&gt;site_options = bp_core_get_site_options();
</span><span class="cx"> 
</span><del>-        /* Sets up the array container for the component navigation rendered by bp_get_nav() */
</del><ins>+        // Sets up the array container for the component navigation rendered by bp_get_nav()
</ins><span class="cx">         $bp-&gt;bp_nav = array();
</span><span class="cx"> 
</span><del>-        /* Sets up the array container for the component options navigation rendered by bp_get_options_nav() */
</del><ins>+        // Sets up the array container for the component options navigation rendered by bp_get_options_nav()
</ins><span class="cx">         $bp-&gt;bp_options_nav = array();
</span><span class="cx"> 
</span><del>-        /* Contains an array of all the active components. The key is the slug, value the internal ID of the component */
</del><ins>+        // Contains an array of all the active components. The key is the slug, value the internal ID of the component
</ins><span class="cx">         $bp-&gt;active_components = array();
</span><span class="cx"> 
</span><del>-        /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */
-        $default_grav = isset( $bp-&gt;site_options['user-avatar-default'] ) ? $bp-&gt;site_options['user-avatar-default'] : 'wavatar';
-        $bp-&gt;grav_default-&gt;user  = apply_filters( 'bp_user_gravatar_default', $default_grav );
-        $bp-&gt;grav_default-&gt;group = apply_filters( 'bp_group_gravatar_default', 'identicon' );
-        $bp-&gt;grav_default-&gt;blog  = apply_filters( 'bp_blog_gravatar_default', 'identicon' );
</del><ins>+        // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar
+        $bp-&gt;grav_default-&gt;user  = apply_filters( 'bp_user_gravatar_default',  $bp-&gt;site_options['avatar_default'] );
+        $bp-&gt;grav_default-&gt;group = apply_filters( 'bp_group_gravatar_default', $bp-&gt;grav_default-&gt;user );
+        $bp-&gt;grav_default-&gt;blog  = apply_filters( 'bp_blog_gravatar_default',  $bp-&gt;grav_default-&gt;user );
</ins><span class="cx"> 
</span><del>-        /* Fetch the full name for the logged in and current user */
</del><ins>+        // Fetch the full name for the logged in and current user
</ins><span class="cx">         $bp-&gt;loggedin_user-&gt;fullname  = bp_core_get_user_displayname( $bp-&gt;loggedin_user-&gt;id );
</span><span class="cx">         $bp-&gt;displayed_user-&gt;fullname = bp_core_get_user_displayname( $bp-&gt;displayed_user-&gt;id );
</span><span class="cx"> 
</span><span class="lines">@@ -161,7 +160,7 @@
</span><span class="cx">            'is_item_admin' would be 1 if they are a group admin, 0 if they are not. */
</span><span class="cx">         $bp-&gt;is_item_admin = bp_user_has_access();
</span><span class="cx"> 
</span><del>-        /* Used to determine if the logged in user is a moderator for the current content. */
</del><ins>+        // Used to determine if the logged in user is a moderator for the current content.
</ins><span class="cx">         $bp-&gt;is_item_mod = false;
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;core-&gt;table_name_notifications = $bp-&gt;table_prefix . 'bp_notifications';
</span><span class="lines">@@ -1582,8 +1581,8 @@
</span><span class="cx">                 'bb-config-location',
</span><span class="cx">                 'hide-loggedout-adminbar',
</span><span class="cx"> 
</span><del>-                /* Useful WordPress settings used often */
-                'user-avatar-default',
</del><ins>+                // Useful WordPress settings used often
+                'avatar_default',
</ins><span class="cx">                 'tags_blog_id',
</span><span class="cx">                 'registration',
</span><span class="cx">                 'fileupload_maxk'
</span></span></pre>
</div>
</div>

</body>
</html>