Plugin Author
Kento
(@proaktion)
Hi,
That’s a good question, and I wouldn’t discard it just because we have Groups Forums – some will prefer that solution and others would prefer bbPress which is great, too. It simply depends on the requirements.
The issue with protecting those forums entities within bbPress with Groups is due to the structure used, i.e. bbPress forums are a custom post type and so are its topics and replies. If we protect a forum in bbpress, we would also have to protect each topic based on the forum it is related to, and the replies would have to be protected based on the forum. It should be possible to do that, when a topic or reply is created or updated, it could inherit the same access restrictions as its forum. Maybe a simple helper plugin that takes care of that automatically would be ok … I’ll look into it.
Cheers
Thanks for the response — sorry about the delay in thanking you, but for some reason the notification email was filtered into spam. I got a solution sorted out which works for new topics and replies. I’m working on a similar thing for the child forum creation process but since they are standard post types…it takes a bit more research. See below for what I coded.
I like your plugin for this because we’re using in conjunction with woo and selling memberships to various training products. Along with the training products, they get specific forum access. So they need to be members of multiple groups — which is where the built in groups obviously falls short.
My new issue is filtering recent posts to hide posts people can’t view…as well as the activity feed (a bit less important).
Here’s what I ended up doing, which is probably a bit specific but does handle the basic use case for this situation. And it’s been working really well for us:
// This will pull permissions from parent forum and apply to a new reply
add_action('bbp_new_reply', 'fx_set_groups_permissions');
add_action('bbp_new_topic', 'fx_set_groups_permissions');
function fx_set_groups_permissions( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author ) {
$forum_id = bbp_get_reply_forum_id($reply_id);
$data = get_post_meta( $forum_id, 'groups-groups_read_post' );
foreach( $data as $perm ) {
add_post_meta($reply_id, 'groups-groups_read_post', $perm);
}
}
Hello.
I just want to comment that I faced the same problem. For me also is better to use bbPress, and I will appreciate if future the release includes better support for bbPress.
Regards,
Plugin Author
Kento
(@proaktion)
Hi,
Following up on this with a plugin … Groups bbPress.
Many thanks to @johnmontfx for presenting your solution, it’s perfectly valid for new replies and topics but I preferred to take another route to this, by automatically checking the access restrictions on forums for related topics and replies.
The result is Groups bbPress and anyone interested in this solution can download the plugin zip there.
Groups bbPress integrates Groups and bbPress so that all topics and replies related to protected forums are also protected automatically.
I hope that many will find this solution useful.
Cheers
Plugin Author
Kento
(@proaktion)
Update:
Groups bbPress can now be installed directly from the WordPress Dashboard – http://wordpress.org/plugins/groups-bbpress/
Wow — this is so very cool — thanks so much. I wish I had email notifications for this thread turned on, as I just noticed this. 🙂
I can hack my way around WordPress and php and get quite a bit done, but I totally agree that your approach is much better.
FYI — since you did this as a free plugin and I think it’s so great, I just bought the import/export plugin from you. I don’t need the I/O plugin, but wanted to show my support you for creating the bbpress one.
Thanks so much…