Skip to:
Content
Pages
Categories
Search
Top
Bottom

Striptags for Sitewide Activity Feed?

  • @welshpixie

    Participant

    Sorry if this has come up elsewhere – I’ve looked through trac and here and couldn’t find anything.

    Since updating to the most recent BP, our sitewide activity feed is showing all blog content instead of only text – so if someone makes a blog post with a huge image at the top of the post, we get a huge image on the front page in the sitewide activity feed.

    Could someone in-the-know direct us to where we’d add striptags for the sitewide activity so that it only shows text?

    Thanks ^.^

Viewing 2 replies - 1 through 2 (of 2 total)
  • @johnjamesjacoby

    Keymaster

    Check buddypress/bp-activity/bp-activity-filters.php for a list of what it’s being run through already.

    bp_get_activity_content

    …is the name of the filter you will want to use, just like BuddyPress already does.

    You could make your own custom kses for it, or if you’d rather try strip_tags give something like this a shot?

    http://pastebin.com/m9cb9d10

    The problem with that code (as it is) is that the activity stream contains the href’s and spans for the links to users and the time, so I don’t think strip_tags will really work. You’ll probably have to put your own kses in there honestly.

    @welshpixie

    Participant

    Thanks for the help ^.^ We pondered on it and decided to keep images in the site feed, because everybody likes pretty pictures, and we just added some jquery to an existing plugin we had running on the site to resize any larger images to fit better (without it they were overlapping the boundary of the sitewide activity feed box by a long shot, hehe).

    (P.S. Thanks for fixing bug #1226 – that was one of ours too, hee hee)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Striptags for Sitewide Activity Feed?’ is closed to new replies.
Skip to toolbar