Skip to:
Content

BuddyPress.org

Ticket #3364: 3364-1.patch

File 3364-1.patch, 5.5 KB (added by DJPaul, 14 years ago)
  • bp-themes/bp-default/activity/entry.php

     
    1111 */
    1212
    1313?>
    14 
    1514<?php do_action( 'bp_before_activity_entry' ); ?>
    1615
    1716<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
    1817        <div class="activity-avatar">
    1918                <a href="<?php bp_activity_user_link(); ?>">
    2019
    21                         <?php bp_activity_avatar( 'type=full&width=100&height=100' ); ?>
     20                        <?php bp_activity_avatar( 'type=thumb' ); ?>
    2221
    2322                </a>
    2423        </div>
  • bp-themes/bp-default/activity/comment.php

     
    1717<li id="acomment-<?php bp_activity_comment_id(); ?>">
    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=tiny&user_id=' . bp_get_activity_comment_user_id() ); ?>
    2121                </a>
    2222        </div>
    2323
  • bp-themes/bp-default/_inc/css/default-rtl.css

     
    417417        margin-right: 30px;
    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;
    432422        margin-right: -35px;
  • bp-themes/bp-default/_inc/css/default.css

     
    11311131        margin-left: 30px;
    11321132        width: 20px;
    11331133}
    1134 .activity-list li.activity_comment .activity-avatar img.avatar,
    1135 .activity-list li.activity_comment .activity-avatar img.FB_profile_pic {
    1136         height: 40px;
    1137         margin-left: 20px;
    1138         width: 40px;
    1139 }
    11401134body.activity-permalink .activity-list > li:first-child {
    11411135        padding-top: 0;
    11421136}
    1143 body.activity-permalink .activity-list li .activity-avatar img.avatar,
    1144 body.activity-permalink .activity-list li .activity-avatar img.FB_profile_pic {
    1145         height: 100px;
    1146         margin-left: 0;
    1147         width: 100px;
    1148 }
    11491137.activity-list li .activity-content {
    11501138        position: relative;
    11511139}
     
    11801168        overflow: hidden;
    11811169        padding: 0;
    11821170}
    1183 .activity-list .activity-avatar img {
    1184         width: 50px;
    1185         height: 50px;
    1186 }
    1187 body.activity-permalink .activity-list .activity-avatar img {
    1188         width: 100px;
    1189         height: 100px;
    1190 }
    11911171.activity-list .activity-content {
    11921172        margin-left: 70px;
    11931173        margin-bottom: 15px;
  • bp-core/bp-core-avatars.php

     
    1414 */
    1515function bp_core_set_avatar_constants() {
    1616        global $bp;
     17
     18        if ( !defined( 'BP_AVATAR_TINY_WIDTH' ) )
     19                define( 'BP_AVATAR_TINY_WIDTH', 25 );
     20
     21        if ( !defined( 'BP_AVATAR_TINY_HEIGHT' ) )
     22                define( 'BP_AVATAR_TINY_HEIGHT', 25 );
    1723       
    1824        if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) )
    1925                define( 'BP_AVATAR_THUMB_WIDTH', 50 );
     
    4955        global $bp;
    5056       
    5157        // Dimensions
     58        $bp->avatar->tiny->width           = BP_AVATAR_TINY_WIDTH;
     59        $bp->avatar->tiny->height          = BP_AVATAR_TINY_HEIGHT;
    5260        $bp->avatar->thumb->width          = BP_AVATAR_THUMB_WIDTH;
    5361        $bp->avatar->thumb->height         = BP_AVATAR_THUMB_HEIGHT;
    5462        $bp->avatar->full->width           = BP_AVATAR_FULL_WIDTH;
  • bp-activity/bp-activity-template.php

     
    562562         * @return string
    563563         */
    564564        function bp_get_activity_avatar( $args = '' ) {
    565                 global $bp, $activities_template;
     565                global $activities_template, $bp;
    566566
    567567                $defaults = array(
    568                         'type'    => 'thumb',
    569                         'width'   => 20,
    570                         'height'  => 20,
     568                        'alt'     => __( 'Profile picture of %s', 'buddypress' ),
    571569                        'class'   => 'avatar',
    572                         'alt'     => __( 'Profile picture of %s', 'buddypress' ),
    573570                        'email'   => false,
     571                        'type'    => 'thumb',
    574572                        'user_id' => false
    575573                );
    576574
    577575                $r = wp_parse_args( $args, $defaults );
    578576                extract( $r, EXTR_SKIP );
    579577
     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                        } elseif ( 'tiny' == $type ) {
     588                                $height = $bp->avatar->tiny->height;
     589                                $width  = $bp->avatar->tiny->width;
     590                        }
     591                }
     592
    580593                // Within the loop, we the current activity should be set first to the
    581594                // current_comment, if available
    582595                $current_activity_item = isset( $activities_template->activity->current_comment ) ? $activities_template->activity->current_comment : $activities_template->activity;