Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom topic Fields

  • Hi folks,

    I want to use BBPress for a message/discussion board for doctors. However, the requirement is that every topic should start with a set of basic fields. This is because they are going to be talking about a particular condition at hand and we need that a combination of fields be selected and input to accompany the topic.

    I know WordPress now offers custom post type so you can add custom fields to a post. But can something similar be done with topics in BBpress? Has anyone tried something like that before?

    Thanks,

    -tejas

Viewing 25 replies - 1 through 25 (of 48 total)
  • Is it something that can be done with the to-be-released BBpress plugin? If yes, is the beta release available for testing?

    Is it something that can be done with the to-be-released BBpress plugin? If yes, is the beta release available for testing?


    christopher jon
    Member

    @christopher-jon

    You can find a link to the plugin in the sticky post at the top of the forum.

    The bbpress plugin’s topics and replies are custom post types.

    Check bbpress.php for the register_post_type functions.

    I’ve only been hacking away at the plugin for a day but from what I’ve seen all of the standard custom post type features appear to be working.

    Tomorrow I’m going to mess around with custom fields, custom meta boxes and adding in some additional taxonomies.

    I see a lot of possibilities for blurring the lines between a blog and a forum.

    If you can manipulate wordpress to do crazy stuff, you’ll love the new plugin version.


    christopher jon
    Member

    @christopher-jon

    You can find a link to the plugin in the sticky post at the top of the forum.

    The bbpress plugin’s topics and replies are custom post types.

    Check bbpress.php for the register_post_type functions.

    I’ve only been hacking away at the plugin for a day but from what I’ve seen all of the standard custom post type features appear to be working.

    Tomorrow I’m going to mess around with custom fields, custom meta boxes and adding in some additional taxonomies.

    I see a lot of possibilities for blurring the lines between a blog and a forum.

    If you can manipulate wordpress to do crazy stuff, you’ll love the new plugin version.

    Could you please post the link? I know this is something I am going to laugh myself at for later, but for the life of me, it might be staring at my face and I can’t find the link to download the plugin. :/

    Could you please post the link? I know this is something I am going to laugh myself at for later, but for the life of me, it might be staring at my face and I can’t find the link to download the plugin. :/


    christopher jon
    Member

    @christopher-jon

    http://bbpress.trac.wordpress.org/browser/branches/plugin

    at the bottom of the page is a link to the zip file.


    christopher jon
    Member

    @christopher-jon

    http://bbpress.trac.wordpress.org/browser/branches/plugin

    at the bottom of the page is a link to the zip file.

    Awesome!!! Thanks a lot. I think I am going to spend new few hours adding custom fields the way I want it!! And yeah, I LOVE THIS PLUGIN!!! (after a hair splitting day that is ;))

    Awesome!!! Thanks a lot. I think I am going to spend new few hours adding custom fields the way I want it!! And yeah, I LOVE THIS PLUGIN!!! (after a hair splitting day that is ;))


    christopher jon
    Member

    @christopher-jon

    Thought I’d update the fun.

    Made a couple of custom loops to grab the forums and topics. Plain ‘ol wordpress custom queries, nothing new or special and added support for post thumbnails.

    Working like a charm.

    With the queries I’m able to list forums or topics anywhere on the blog and the thumbnails just add in some extra coolness, similar to how buddypress uses images for groups but I’ve extended it so any forum or topic can have it’s own thumbnail using default wordpress features.

    Now, I need to remember how to write a filter so I can modify the custom post types through the theme functions and not mess with the core plugin code.


    christopher jon
    Member

    @christopher-jon

    Thought I’d update the fun.

    Made a couple of custom loops to grab the forums and topics. Plain ‘ol wordpress custom queries, nothing new or special and added support for post thumbnails.

    Working like a charm.

    With the queries I’m able to list forums or topics anywhere on the blog and the thumbnails just add in some extra coolness, similar to how buddypress uses images for groups but I’ve extended it so any forum or topic can have it’s own thumbnail using default wordpress features.

    Now, I need to remember how to write a filter so I can modify the custom post types through the theme functions and not mess with the core plugin code.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Awesome :)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Awesome :)


    christopher jon
    Member

    @christopher-jon

    It works but it might not be the ideal solution.

    I’m still working my way through the core forum code to get a better understanding of how it all works.

    Ideally, I’d like to be able to grab topics from specific forums along with some additional query options. Similar to what the current widgets are doing but with greater flexibility.

    Digging through the bbp-includes, all of the pieces are there, I just need to figure out what does what.


    christopher jon
    Member

    @christopher-jon

    It works but it might not be the ideal solution.

    I’m still working my way through the core forum code to get a better understanding of how it all works.

    Ideally, I’d like to be able to grab topics from specific forums along with some additional query options. Similar to what the current widgets are doing but with greater flexibility.

    Digging through the bbp-includes, all of the pieces are there, I just need to figure out what does what.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    For topics, you’ll want to do a meta_query using ‘_bbp_forum_id’ as one of the keys. The code could probably use some cleaning up to simplify this, but that’ll come with time. :)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    For topics, you’ll want to do a meta_query using ‘_bbp_forum_id’ as one of the keys. The code could probably use some cleaning up to simplify this, but that’ll come with time. :)

    Chris,

    Did you have to call any additional function to add meta boxes? Have you tried that yet?

    Thanks

    Chris,

    Did you have to call any additional function to add meta boxes? Have you tried that yet?

    Thanks


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @whitehats – You can add actions to hooks in the various forum/topic/reply admin areas to assist in creating custom meta boxes.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @whitehats – You can add actions to hooks in the various forum/topic/reply admin areas to assist in creating custom meta boxes.

    Thanks. I realize I will have to modify a lot of core files to do that. Anywho, I might be wrong but I will report back the changes I made and the results of it. :)

    Thanks. I realize I will have to modify a lot of core files to do that. Anywho, I might be wrong but I will report back the changes I made and the results of it. :)


    christopher jon
    Member

    @christopher-jon

    “Did you have to call any additional function to add meta boxes? Have you tried that yet?”

    Nope. Using the default wordpress code should work. Just remember to set the correct page type (forum/topic) or you wont see it.

    Here is part of my code so you can see where I changed the page type to the “topic” custom post type.

    $meta_boxes[] = array(

    ‘id’ => ‘forum_options’,

    ‘title’ => ‘Forum Options’,

    ‘pages’ => array(‘topic’),

    ‘context’ => ‘side’,

    ‘priority’ => ‘core’,

Viewing 25 replies - 1 through 25 (of 48 total)

You must be logged in to reply to this topic.