<!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] [2441] trunk: Making avatars in activity streams clickable.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2441</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-25 00:50:03 +0000 (Mon, 25 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Making avatars in activity streams clickable.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityentryphp">trunk/bp-themes/bp-default/activity/entry.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivitypostformphp">trunk/bp-themes/bp-default/activity/post-form.php</a></li>
<li><a href="#trunkbpthemesbpdefaultsidebarphp">trunk/bp-themes/bp-default/sidebar.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 (2440 => 2441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-01-25 00:34:36 UTC (rev 2440)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-01-25 00:50:03 UTC (rev 2441)
</span><span class="lines">@@ -286,6 +286,14 @@
</span><span class="cx">                 return apply_filters( 'bp_get_activity_user_id', $activities_template-&gt;activity-&gt;user_id );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+function bp_activity_user_link() {
+        echo bp_get_activity_user_link();
+}
+        function bp_get_activity_user_link() {
+                global $activities_template;
+                return apply_filters( 'bp_get_activity_user_link', bp_core_get_user_domain( $activities_template-&gt;activity-&gt;user_id, $activities_template-&gt;activity-&gt;user_nicename, $activities_template-&gt;activity-&gt;user_login ) );
+        }
+
</ins><span class="cx"> function bp_activity_avatar( $args = '' ) {
</span><span class="cx">         echo bp_get_activity_avatar( $args );
</span><span class="cx"> }
</span><span class="lines">@@ -473,7 +481,7 @@
</span><span class="cx">                                         $comment-&gt;user_fullname = $comment-&gt;display_name;
</span><span class="cx"> 
</span><span class="cx">                                 $content .= '&lt;li id=&quot;acomment-' . $comment-&gt;id . '&quot;&gt;';
</span><del>-                                $content .= '&lt;div class=&quot;acomment-avatar&quot;&gt;' . bp_core_fetch_avatar( array( 'item_id' =&gt; $comment-&gt;user_id, 'width' =&gt; 25, 'height' =&gt; 25, 'email' =&gt; $comment-&gt;user_email ) ) . '&lt;/div&gt;';
</del><ins>+                                $content .= '&lt;div class=&quot;acomment-avatar&quot;&gt;&lt;a href=&quot;' . bp_core_get_user_domain( $comment-&gt;user_id, $comment-&gt;user_nicename, $comment-&gt;user_login ) . '&quot;&gt;' . bp_core_fetch_avatar( array( 'item_id' =&gt; $comment-&gt;user_id, 'width' =&gt; 25, 'height' =&gt; 25, 'email' =&gt; $comment-&gt;user_email ) ) . '&lt;/a&gt;&lt;/div&gt;';
</ins><span class="cx">                                 $content .= '&lt;div class=&quot;acomment-meta&quot;&gt;&lt;a href=&quot;' . bp_core_get_user_domain( $comment-&gt;user_id, $comment-&gt;user_nicename, $comment-&gt;user_login ) . '&quot;&gt;' . apply_filters( 'bp_get_member_name', $comment-&gt;user_fullname ) . '&lt;/a&gt; &amp;middot; ' . sprintf( __( '%s ago', 'buddypress' ), bp_core_time_since( strtotime( $comment-&gt;date_recorded ) ) );
</span><span class="cx"> 
</span><span class="cx">                                 /* Reply link */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityentryphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/entry.php (2440 => 2441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/entry.php        2010-01-25 00:34:36 UTC (rev 2440)
+++ trunk/bp-themes/bp-default/activity/entry.php        2010-01-25 00:50:03 UTC (rev 2441)
</span><span class="lines">@@ -4,10 +4,13 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;li class=&quot;&lt;?php bp_activity_css_class() ?&gt;&quot; id=&quot;activity-&lt;?php bp_activity_id() ?&gt;&quot;&gt;
</span><span class="cx">         &lt;div class=&quot;activity-avatar&quot;&gt;
</span><del>-                &lt;?php bp_activity_avatar( 'type=full&amp;width=100&amp;height=100' ) ?&gt;
</del><ins>+                &lt;a href=&quot;&lt;?php bp_activity_user_link() ?&gt;&quot;&gt;
+                        &lt;?php bp_activity_avatar( 'type=full&amp;width=100&amp;height=100' ) ?&gt;
+                &lt;/a&gt;
</ins><span class="cx">         &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;div class=&quot;activity-content&quot;&gt;
</span><ins>+                &lt;?php /* You can also split this into bp_activity_action() and bp_activity_content_body() */ ?&gt;
</ins><span class="cx">                 &lt;?php bp_activity_content() ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;?php do_action( 'bp_activity_entry_content' ) ?&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivitypostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/post-form.php (2440 => 2441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/post-form.php        2010-01-25 00:34:36 UTC (rev 2440)
+++ trunk/bp-themes/bp-default/activity/post-form.php        2010-01-25 00:50:03 UTC (rev 2441)
</span><span class="lines">@@ -9,7 +9,9 @@
</span><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;div id=&quot;whats-new-avatar&quot;&gt;
</span><del>-                &lt;?php bp_loggedin_user_avatar( 'width=60&amp;height=60' ) ?&gt;
</del><ins>+                &lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() ?&gt;&quot;&gt;
+                        &lt;?php bp_loggedin_user_avatar( 'width=60&amp;height=60' ) ?&gt;
+                &lt;/a&gt;
</ins><span class="cx">         &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;h5&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/sidebar.php (2440 => 2441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar.php        2010-01-25 00:34:36 UTC (rev 2440)
+++ trunk/bp-themes/bp-default/sidebar.php        2010-01-25 00:50:03 UTC (rev 2441)
</span><span class="lines">@@ -8,10 +8,12 @@
</span><span class="cx">         &lt;?php if ( is_user_logged_in() ) : ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;div id=&quot;sidebar-me&quot;&gt;
</span><del>-                        &lt;?php bp_loggedin_user_avatar( 'type=thumb&amp;width=40&amp;height=40' ) ?&gt;
</del><ins>+                        &lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() ?&gt;&quot; title=&quot;&lt;?php _e( 'My Profile', 'buddypress' ) ?&gt;&quot;&gt;
+                                &lt;?php bp_loggedin_user_avatar( 'type=thumb&amp;width=40&amp;height=40' ) ?&gt;
+                        &lt;/a&gt;
+
</ins><span class="cx">                         &lt;h4&gt;&lt;?php bp_loggedinuser_link() ?&gt;&lt;/h4&gt;
</span><span class="cx">                         &lt;a class=&quot;button&quot; href=&quot;&lt;?php echo wp_logout_url(wp_get_referer()) ?&gt;&quot;&gt;&lt;?php _e( 'Log Out', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><del>-
</del><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;?php if ( function_exists( 'bp_message_get_notices' ) ) : ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>