Skip to:
Content
Pages
Categories
Search
Top
Bottom

docs to help me understand adding custom post_types to bp activity stream


  • Anointed
    Participant

    @anointed

    I’ve been playing with custom post_types for some time now and finally have everything working exactly how I want them to.

    What I can’t find is any documentation on what is required to get my custom post types to show up in the activity stream. So far the only thing that shows up is comments made on the post types, but not the post’s themselves. I want to be able to pull in a post type along with a few relevent metafields and taxonomies that belong to each type.

    I’m sure that I can do all the heavy lifting, it’s just that some documentation would really help.

    also:
    Is there any documentation on working with the front end editor in bp?
    Specifically I would like to extend bp to allow my members to upload the post types that I created. Each post type has numerous metafields and custom taxonomies, both hierarchical and non.

    anyhow, I searched high n low, but found nothing of much help so far.

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

  • Anointed
    Participant

    @anointed

    Spent most of the day reading everything available, but still can’t find any documentation on how to pull in my custom post_types with meta into the activity stream.

    Please, someone point me in the right direction.


    thelandman
    Participant

    @thelandman

    Are you using WordPress 3-beta. Because only wordpress 3 allows custom post_types. But anyway, this helped me, hope it helps you…

    Custom post types in WordPress


    Anointed
    Participant

    @anointed

    @thelandman
    Yes I am using wp 3.0 beta. Actually I have the post_types just about finished, a few more hours on templating a few more types and that will be done.

    example:
    http://deardaddy.org/sermons/ — multi-relational page with type ‘sermons’ related to types ‘podcasts, preachers, and locations’.

    Now I am at the point of wanting to include the post_types into the bp activity stream. That’s where I find a complete lack of any documentation. Appreciate the response though.

    Activity stream doesn’t have anything to do with WordPress post_types, which is why you find no documentation.
    Look through, for example, groups_record_activity().


    Anointed
    Participant

    @anointed

    @DJPaul
    Thank you!. Yes I realize that post_types have absolutely nothing to do with the activity stream. I look at post_types as nothing more than a new dataset that I want to include in the activity stream.

    I guess that I was hoping that bp had some type of action that I could hook into. Meaning I add a function to bp record activity to recognize my new post_types as a new dataset. Then the activity could pick up whatever data I want to add into it. (I’m not a seasoned coder, so pretty sure my terminology is wrong, but I hope you get the idea).


    Anointed
    Participant

    @anointed

    Well I am sure that many others will someday want to figure out how to get custom post_types to automatically show up in the activity stream. It took me all day reading through most of the bp code, but I finally found the edit needed.

    in bp-blogs.php line 373
    comment out:
    ` if ( $post->post_type != ‘post’ )
    return false;`

    Now this is not optimal, as it will still say that user ‘x’ posted a new blog post instead of user ‘x’ posted a new ‘post_type’ post, and it won’t automatically insert the metafields, but it’s a start.

    I’ll come up with a simple code hack and post it here when I have added the ability to add in the custom post_types custom metafields into the activity stream.

    The reason I am going with this approach, is because for now, I have zero interest in creating a new bp component, as the users will never be adding in these post types via bp. I simply wanted the information to show in the activity stream when the new post_type data is added.

    Hope this helps save someone countless hours in the future.


    Anointed
    Participant

    @anointed

    with wp 3.0 utilizing post_types, I’m guessing a lot of people in the future are going to be asking about adding their pretty new data types into bp.

    I would strongly suggest bp consider an easy UI for an admin to simply add in their post types and desired metafields for capture into the activity stream. The current setup is FAR from user friendly. I can see many cases where an admin will simply want to display their new info without having to build an input component.

    is there a bugreport for this issue?

    @anointed – a new component is not required – just add a new function to your custom/functions file that mimics bp_blogs_record_post (same save_post action hook) but targeting whatever post_type you need. This would allow you to change up the “wrote a new blog post” and add whatever else (meta)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘docs to help me understand adding custom post_types to bp activity stream’ is closed to new replies.
Skip to toolbar