Skip to:
Content
Pages
Categories
Search
Top
Bottom

Will 1.3 Activity Stream Support Custom Field Images for Posts?


  • Nahum
    Participant

    @nahummadrid

    One of the things I’ve been waiting for is for the activity stream to work with post’s custom field images. Many of the themes I work with buddypress rely heavily on custom fields for images and thumbnails. If not, anyone have a lead on how to make it work.

Viewing 4 replies - 1 through 4 (of 4 total)

  • Boone Gorges
    Keymaster

    @boonebgorges

    Can you be more specific about the kind of behavior you’re requesting? What would happen with those posts in the activity stream?


    Nahum
    Participant

    @nahummadrid

    I see. Well. In the activity stream there is a thumbnail pulled for blog post activity items if there’s an attachment. If the blog post has an image saved in a custom field, the activity stream will not display a thumbnail. Would it be possible to get it to check first for a custom field image and then check for an inserted image.


    Boone Gorges
    Keymaster

    @boonebgorges

    How would BP know about the custom fields? The only fields that BP can really know about with any certainty are the post_content field and perhaps the featured image. It probably wouldn’t be wise for BP, by default, to look through all of a post’s custom fields when creating activity items, as many people use them for many different things.

    I recommend hooking a filter to either ‘bp_blogs_record_activity_content’ or ‘bp_activity_thumbnail_content_images’, and handling the custom fields for yourself. It shouldn’t be too hard – look at the function bp_activity_thumbnail_content_images() in bp-activity.php for some hints on the markup. (Your function will even more straightforward – you really just need to pull up the value of your custom field, and then build the markup as on the line that reads $content = ... in that function)


    Nahum
    Participant

    @nahummadrid

    yes at least the featured image field. i think i’d be ok with that. and I’ll give it a try my self for now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Will 1.3 Activity Stream Support Custom Field Images for Posts?’ is closed to new replies.
Skip to toolbar