Skip to:
Content

BuddyPress.org

Changeset 3170


Ignore:
Timestamp:
08/09/2010 11:07:56 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Add support for secondary avatar items in activity feed.

Location:
branches/1.2/bp-themes/bp-default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-themes/bp-default/_inc/css/default.css

    r3104 r3170  
    11521152        line-height: 220%;
    11531153    }
     1154   
     1155    .activity-list .activity-content .activity-header img.avatar {
     1156        float: none !important;
     1157        margin: 0 5px -8px 0 !important;
     1158    }
    11541159
    11551160    .activity-list .activity-header a:first-child, span.highlight {
  • branches/1.2/bp-themes/bp-default/functions.php

    r3159 r3170  
    139139}
    140140add_filter( 'the_posts', 'bp_dtheme_fix_the_posts_on_activity_front' );
     141
     142function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
     143    global $bp;
     144
     145    switch ( $activity->component ) {
     146        case $bp->groups->id :
     147        case $bp->blogs->id :
     148        case $bp->friends->id :
     149            $reverse_content = strrev( $action );
     150            $position        = strpos( $reverse_content, 'a<' );
     151            $action          = substr_replace( $action, bp_get_activity_secondary_avatar(), -$position - 2, 0 );
     152            break;
     153    }
     154
     155    return $action;
     156}
     157add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );
    141158
    142159/****
Note: See TracChangeset for help on using the changeset viewer.