<!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->activity->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->activity->user_id, $activities_template->activity->user_nicename, $activities_template->activity->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->user_fullname = $comment->display_name;
</span><span class="cx">
</span><span class="cx">                                 $content .= '<li id="acomment-' . $comment->id . '">';
</span><del>-                                $content .= '<div class="acomment-avatar">' . bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 25, 'height' => 25, 'email' => $comment->user_email ) ) . '</div>';
</del><ins>+                                $content .= '<div class="acomment-avatar"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 25, 'height' => 25, 'email' => $comment->user_email ) ) . '</a></div>';
</ins><span class="cx">                                 $content .= '<div class="acomment-meta"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . apply_filters( 'bp_get_member_name', $comment->user_fullname ) . '</a> &middot; ' . sprintf( __( '%s ago', 'buddypress' ), bp_core_time_since( strtotime( $comment->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"> <li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
</span><span class="cx">         <div class="activity-avatar">
</span><del>-                <?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
</del><ins>+                <a href="<?php bp_activity_user_link() ?>">
+                        <?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
+                </a>
</ins><span class="cx">         </div>
</span><span class="cx">
</span><span class="cx">         <div class="activity-content">
</span><ins>+                <?php /* You can also split this into bp_activity_action() and bp_activity_content_body() */ ?>
</ins><span class="cx">                 <?php bp_activity_content() ?>
</span><span class="cx">
</span><span class="cx">                 <?php do_action( 'bp_activity_entry_content' ) ?>
</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">         <?php endif; ?>
</span><span class="cx">
</span><span class="cx">         <div id="whats-new-avatar">
</span><del>-                <?php bp_loggedin_user_avatar( 'width=60&height=60' ) ?>
</del><ins>+                <a href="<?php echo bp_loggedin_user_domain() ?>">
+                        <?php bp_loggedin_user_avatar( 'width=60&height=60' ) ?>
+                </a>
</ins><span class="cx">         </div>
</span><span class="cx">
</span><span class="cx">         <h5>
</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">         <?php if ( is_user_logged_in() ) : ?>
</span><span class="cx">
</span><span class="cx">                 <div id="sidebar-me">
</span><del>-                        <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
</del><ins>+                        <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
+                                <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
+                        </a>
+
</ins><span class="cx">                         <h4><?php bp_loggedinuser_link() ?></h4>
</span><span class="cx">                         <a class="button" href="<?php echo wp_logout_url(wp_get_referer()) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>
</span><del>-
</del><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
</span></span></pre>
</div>
</div>
</body>
</html>