Helping you Build Your Own Social Network!

Faster, better and easier!

any docs on pulling custom post_types into the bp activity stream?

(4 posts) (2 voices)

Tags:

No tags yet.


  1. I've just about finished my sandbox site which relies heavily upon custom post_types.
    http://deardaddy.org/sermons/
    -- be kind, it's just a sandbox test site.

    So far I have created 'sermons, podcasts, preachers, and locations' as my post types. They are all connected together via relation functions.

    I have also created custom taxonomies, 'series' that are applied to 'sermons, podcasts, posts, and pages'. By far the hardest part was the tax archive page and separating out the content types:
    http://deardaddy.org/series/unidos-messages/

    Now I simply want to add my post_types incl. metadata fields into the activity stream.

    Does anyone know if there happens to be any documentation on this?
    (I'm pretty sure that I can handle all the heavy lifting, just need some basic docs or guidance)

    also:
    Has anyone attempted to modify the front end editor to allow me to use it for inputting custom post_types with metafields?

    Once again, there seems to be no docs on bp site, and dev's have not responded to requests. figured I'd ask here as many experts hang out here as well.

    thanks

    Posted 2 years ago #
  2. Definitely not an expert here :-) I would look at how plugin authors have published content to activity stream, somewhat how Brajesh did in BP Gallery in bp-gallery/gallery-action-functions.php and how David did in BuddyPress Wiki Component in bp-wiki/includes/bp-wiki-core.php. The plugin is a complete rewrite of the BuddyPress Group Wiki plugin and uses custom post_types to create wikis and publish to activity stream. Best wishes :-)

    Posted 1 year ago #
  3. @mercime

    Thanks for the reference to the new wiki. Obviously he is doing pretty much what I am after, so it's going to be worth reading through.

    I spent the morning reading most/all of the bp code itself, and still working on understanding the content insertion. I can say though, I'm kinda shocked at how little code is needed for bp to run. The bp front end makes it look like a huge project, but in reality there isn't that much to it.

    Anyhow, as I am going to use bp on the side, I figured I might as well start learning how it works. Besides bp documentation is horribly sparse considering it's age. I end up feeling like they don't actually want the public understanding the inner workings. WP itself is so well documented, that it only took me a few weeks to get a solid grasp of most systems. Now if bp would follow suit lol.

    Posted 1 year ago #
  4. figured it out:
    edit bp-blogs.php line 373 and comment out

    if ( $post->post_type != 'post' )
    		return false;

    Not ideal, but it gets the job somewhat done. Keep in mind it will not show the custom fields assigned to the post_type when in the activity stream, and it will say that user x posted a 'blog' post instead of user x posted a 'post_type' post, but it's better than nothing.

    Now I will go and look into bp gallery to see how Brajesh added the images and videos to the activity stream.

    I'm kind of hoping that I don't have to build a full component, but can simply amend the $bp_blogs_record_post function to separate out for my current post_types, and have it change the terminology and add in the custom fields to the activity stream.

    @mercime
    thanks for all the help on this. Your answers and the lack of support on bp.org led me to spend the day reading all the bp code. Now at least I understand most of what I am using.

    Posted 1 year ago #

Reply

You must log in to post.