The ability to enable WP comments on an event would possibly make this work as BBPress can as an option replace the WP Comments functionality on pages and posts, so in turn might work the same for WP comments on an events
Plugin Author
Franky
(@liedekef)
The available hooks can help you there:
eme_insert_event_action and others, see http://www.e-dynamics.be/wordpress/?cat=41
Based on that, it shouldn’t be too difficult to create a bbpress topic based on it.
I’ll have a look but I’m not a developer so it’s likely to be beyond my abilities.
Plugin Author
Franky
(@liedekef)
If you can provide the bbpress function to create a new topic, I can give you an example to start with.
Plugin Author
Franky
(@liedekef)
Based on this: http://www.e-dynamics.be/wordpress/?topic=trigger-a-post
your code in your functions.php would be something like this for starters, change the ‘post_parent’ (seems to be the forum id, but might not even be needed) and ‘forum_id’ to your liking:
add_action(’eme_insert_event_action’,’make_eme_bbtopic’);
function make_eme_bbtopic($event_passed) {
$new_post = array(
‘post_title’ => $event_passed [‘event_name’],
‘post_content’ => $event_passed [‘event_notes’],
‘post_parent’ => 0, // forum ID
);
$new_post_meta = array(
‘forum_id’ => 0
);
$topic_id=bbp_insert_topic($new_post,$new_post_meta);
}
That works pretty well thanks. It shows up in the correct forum section with all the content.
The new thread shows up in the ‘Latest posts’ sidebar widget, but not in the main body of the page, no idea why that would be.
I might have a play and see if I can make it post a link back to the Event listing.
I had to change both the ‘post_parent’ and the forum_id to the same forum_id to make the forum post appear in the right place.