Skip to:
Content

BuddyPress.org

Changeset 4849


Ignore:
Timestamp:
07/25/2011 07:55:01 PM (14 years ago)
Author:
djpaul
Message:

Align avatars in members' activity streams. Fixes #3364

Location:
trunk
Files:
5 edited

Legend:

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

    r4847 r4849  
    563563     */
    564564    function bp_get_activity_avatar( $args = '' ) {
    565         global $bp, $activities_template;
     565        global $activities_template, $bp;
    566566
    567567        $defaults = array(
     568            'alt'     => __( 'Profile picture of %s', 'buddypress' ),
     569            'class'   => 'avatar',
     570            'email'   => false,
    568571            'type'    => 'thumb',
    569             'width'   => 20,
    570             'height'  => 20,
    571             'class'   => 'avatar',
    572             'alt'     => __( 'Profile picture of %s', 'buddypress' ),
    573             'email'   => false,
    574572            'user_id' => false
    575573        );
     
    577575        $r = wp_parse_args( $args, $defaults );
    578576        extract( $r, EXTR_SKIP );
     577
     578        if ( !isset( $height ) && !isset( $width ) ) {  // Backpat
     579            if ( 'full' == $type ) {
     580                $height = $bp->avatar->full->height;
     581                $width  = $bp->avatar->full->width;
     582
     583            } elseif ( 'thumb' == $type ) {
     584                $height = $bp->avatar->thumb->height;
     585                $width  = $bp->avatar->thumb->width;
     586            }
     587        }
     588
     589        // Backpat
     590        if ( !isset( $width ) )
     591            $width = 20;
     592
     593        if ( !isset( $height ) )
     594            $height = 20;
    579595
    580596        // Within the loop, we the current activity should be set first to the
  • trunk/bp-themes/bp-default/_inc/css/default-rtl.css

    r4804 r4849  
    418418    margin-left: 0;
    419419}
    420 .activity-list li.activity_comment .activity-avatar img.avatar,
    421 .activity-list li.activity_comment .activity-avatar img.FB_profile_pic {
    422     margin-right: 10px;
    423     margin-left: 0;
    424 }
    425 body.activity-permalink .activity-list li .activity-avatar img.avatar,
    426 body.activity-permalink .activity-list li .activity-avatar img.FB_profile_pic {
    427     margin-left: auto;
    428     margin-right: 0;
    429 }
    430420body.activity-permalink .activity-list li .activity-header > p {
    431421    margin-left: auto;
  • trunk/bp-themes/bp-default/_inc/css/default.css

    r4837 r4849  
    11271127    width: 20px;
    11281128}
    1129 .activity-list li.activity_comment .activity-avatar img.avatar,
    1130 .activity-list li.activity_comment .activity-avatar img.FB_profile_pic {
    1131     height: 40px;
    1132     margin-left: 20px;
    1133     width: 40px;
    1134 }
    11351129body.activity-permalink .activity-list > li:first-child {
    11361130    padding-top: 0;
    1137 }
    1138 body.activity-permalink .activity-list li .activity-avatar img.avatar,
    1139 body.activity-permalink .activity-list li .activity-avatar img.FB_profile_pic {
    1140     height: 100px;
    1141     margin-left: 0;
    1142     width: 100px;
    11431131}
    11441132.activity-list li .activity-content {
     
    11751163    overflow: hidden;
    11761164    padding: 0;
    1177 }
    1178 .activity-list .activity-avatar img {
    1179     width: 50px;
    1180     height: 50px;
    1181 }
    1182 body.activity-permalink .activity-list .activity-avatar img {
    1183     width: 100px;
    1184     height: 100px;
    11851165}
    11861166.activity-list .activity-content {
     
    13841364    border-width: 2px !important;
    13851365    float: left;
     1366    height: 25px;
    13861367    margin-right: 10px;
     1368    width: 25px;
    13871369}
    13881370div.activity-comments div.acomment-content {
  • trunk/bp-themes/bp-default/activity/comment.php

    r4744 r4849  
    1818    <div class="acomment-avatar">
    1919        <a href="<?php bp_activity_comment_user_link(); ?>">
    20             <?php bp_activity_avatar( 'type=full&width=25&height=25&user_id=' . bp_get_activity_comment_user_id() ); ?>
     20            <?php bp_activity_avatar( 'type=thumb&user_id=' . bp_get_activity_comment_user_id() ); ?>
    2121        </a>
    2222    </div>
  • trunk/bp-themes/bp-default/activity/entry.php

    r4808 r4849  
    1919        <a href="<?php bp_activity_user_link(); ?>">
    2020
    21             <?php bp_activity_avatar( 'type=full&width=100&height=100' ); ?>
     21            <?php bp_activity_avatar( 'type=thumb' ); ?>
    2222
    2323        </a>
Note: See TracChangeset for help on using the changeset viewer.