Skip to:
Content
Pages
Categories
Search
Top
Bottom

Excerpts for activity stream

  • @bmoseley07

    Member

    Basically, how do you change the bp_activity_content_body() to excerpts for the activity stream. I used a modified version of this: http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    I’ve tried shortening it with PHP, since I can’t find an excerpt template tag, but wasn’t successful:

    <div class="activity-inner">
    <?php
    
    $chars = 125;
    
    $excerpt = bp_activity_content_body()." ";
    $excerpt = substr($excerpt,0,$chars);
    $excerpt = substr($excerpt,0,strrpos($excerpt,' '));
    $excerpt = $excerpt."...";
    
    return $excerpt;
    
    ?>
    </div>

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excerpts for activity stream’ is closed to new replies.
Skip to toolbar