Re: Excerpt function in RC2
I see what you are saying. You want to be able to display an excerpt of the group description in the group directory. The best way I can recommend to you is to create a filter in bp-custom.php. Create one if it doesn’t exist in the bp /plugins/buddypress directory. This is a file where you can put all your custom mods for bp. In there, stick the following code:
// only filter the description in the groups directory
return bp_create_excerpt($text, 50);
That hooks a filter for the group description only when in the group directory and limits the work count to 50. You can modify the number of words limit by changing ’50’ to whatever word count you want.
The number of lines can’t be calculated easily. Too many variables. The bp_create_excerpt() function works by word count.