The MU forums have moved to WordPress.org

how to cut Site Wide Activity content 's num ? help! (5 posts)

  1. nba23
    Member
    Posted 14 years ago #

    such as http://grungepress.com/ 's Site Wide Activity . If the post has many words ,then use [...] end the content . How can i use the forrmat to my worpress-mu 's code ? Help . Thanks !

  2. tdjcbe
    Member
    Posted 14 years ago #

    From the source:

    bp_activity_widget_sitewide_activity

    In this case, it's a buddypress widget.

    For just a wpmu install, it would depend on the method of how you were listing all of your posts. What method are you using currently?

    If you;re not, you may want to search the forums for latest posts for ideas. There's a number of methods.

  3. andrea_r
    Moderator
    Posted 14 years ago #

    "If the post has many words ,then use [...] end the content . "

    that means that whatever method they are using to pull the content (buddypress widget or otherwise) to get what you want, use the_excerpt rather than the_content.

  4. nba23
    Member
    Posted 14 years ago #

    function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $filter_words = true, $filter_you = true ) {
    	if ( !$content )
    		return false;
    
    	/* Split the content so we don't evaluate and replace text on content we don't want to */
    	$content = explode( '%s', $content );
    
    	/* Re-add the exploded %s */
    	$content[0] .= '%s';

    I had found the code in bp-activity-templatetags.php,but I don't know how to come true ? thanks

  5. nba23
    Member
    Posted 14 years ago #

    my test site is http://cnplog.com/ , you will see the widget_sitewide_activity 's posting content is too long .

About this Topic