Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Solved: set a character limit on activity content?

@nit3watch

Participant

working nicely, just need to filter out ‘joined the group.. and created group.. and remove ‘view’ and delete’.

Once im done using it for what i need ill turn it into a widget for the community :D

`function bp_limit_group_activity_content() {

$group_activity_length = 100; //character limit

$group_excerpt = substr(bp_get_activity_content_body(), 0, $group_activity_length); //truncate excerpt according to lenngth
if(strlen($group_excerpt) < strlen(bp_get_activity_content_body())) {
$group_excerpt = $group_excerpt.’..’ ;
}

echo “

“.$group_excerpt.”

“; //finally display excerpt
}`

and then calling it by
`

    <li class="” id=”activity-“>

    <a href="”>

`

Skip to toolbar