Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2011 09:44:11 PM (14 years ago)
Author:
djpaul
Message:

Added AJAX loading spinner to activity stream 'read more' link. See #3183

File:
1 edited

Legend:

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

    r4277 r4305  
    160160function bp_activity_truncate_entry( $text ) {
    161161    global $activities_template;
    162    
     162
    163163    // The full text of the activity update should always show on the single activity screen
    164164    if ( bp_is_single_activity() )
     
    168168    $excerpt_length = apply_filters( 'bp_activity_excerpt_length', 358 );
    169169    $excerpt        = $text;
    170    
    171     $id     = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
    172    
     170
     171    $id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
     172
    173173    if ( strlen( $excerpt ) > $excerpt_length )
    174         $excerpt = sprintf( '%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', bp_create_excerpt( $excerpt, $excerpt_length, true, '&hellip;' ), $id, bp_get_activity_thread_permalink(), $append_text );
    175    
     174        $excerpt = sprintf( '%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a>&nbsp;<span class="ajax-loader"></span></span>', bp_create_excerpt( $excerpt, $excerpt_length, true, '&hellip;' ), $id, bp_get_activity_thread_permalink(), $append_text );
     175
    176176    return apply_filters( 'bp_activity_truncate_entry', $excerpt, $text, $append_text );
    177177}
Note: See TracChangeset for help on using the changeset viewer.