Skip to:
Content

BuddyPress.org

Changeset 2441


Ignore:
Timestamp:
01/25/2010 12:50:03 AM (16 years ago)
Author:
apeatling
Message:

Making avatars in activity streams clickable.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r2416 r2441  
    287287        }
    288288
     289function bp_activity_user_link() {
     290        echo bp_get_activity_user_link();
     291}
     292        function bp_get_activity_user_link() {
     293                global $activities_template;
     294                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 ) );
     295        }
     296
    289297function bp_activity_avatar( $args = '' ) {
    290298        echo bp_get_activity_avatar( $args );
     
    474482
    475483                                $content .= '<li id="acomment-' . $comment->id . '">';
    476                                 $content .= '<div class="acomment-avatar">' . bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 25, 'height' => 25, 'email' => $comment->user_email ) ) . '</div>';
     484                                $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>';
    477485                                $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 ) ) );
    478486
  • trunk/bp-themes/bp-default/activity/entry.php

    r2381 r2441  
    55<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
    66        <div class="activity-avatar">
    7                 <?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
     7                <a href="<?php bp_activity_user_link() ?>">
     8                        <?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
     9                </a>
    810        </div>
    911
    1012        <div class="activity-content">
     13                <?php /* You can also split this into bp_activity_action() and bp_activity_content_body() */ ?>
    1114                <?php bp_activity_content() ?>
    1215
  • trunk/bp-themes/bp-default/activity/post-form.php

    r2433 r2441  
    1010
    1111        <div id="whats-new-avatar">
    12                 <?php bp_loggedin_user_avatar( 'width=60&height=60' ) ?>
     12                <a href="<?php echo bp_loggedin_user_domain() ?>">
     13                        <?php bp_loggedin_user_avatar( 'width=60&height=60' ) ?>
     14                </a>
    1315        </div>
    1416
  • trunk/bp-themes/bp-default/sidebar.php

    r2425 r2441  
    99
    1010                <div id="sidebar-me">
    11                         <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
     11                        <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
     12                                <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
     13                        </a>
     14
    1215                        <h4><?php bp_loggedinuser_link() ?></h4>
    1316                        <a class="button" href="<?php echo wp_logout_url(wp_get_referer()) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>
    14 
    1517                </div>
    1618
Note: See TracChangeset for help on using the changeset viewer.