Integration into BuddyPress Groups?

Solved4.53K viewsCore
1

I’ve spent a good amount of time looking for Q&A systems over the past week and this one, by far, is the most robust and closest to meeting my client’s needs. The one thing that it doesn’t quite do out of the box is integrate into the BuddyPress groups.

Background: My client wants to be able to create a set of “Projects” which then have a set of “Issues” that can be listed and discussed within that project. I can do that with bbPress by creating a forum for each group, but a simple forum isn’t quite what we need. It’s questions, answers, and all the features you have. So, my plan is to set it up so that each BuddyPress Group is the “Project” and then (hopefully) use AnsPress in place of the bbPress forums.

My question revolves around whether my solution below is the most efficient way to go about it, or if someone on the dev team might have a more efficient or better way to tackle it.

My Solution: It seems like I can probably just disable the “Tags” for the front end of AnsPress (i.e. Users can’t add their own tags) and then I add some sort of hook in the groups so that when you ask a question from that group, it automatically inserts the group slug as a tag for that question. Then I create a function that will list questions by tag and insert that on the group page – thus showing only the questions which contain the current group slug. This will also allow browsing on the normal questions page and I should be able to edit the theme to also link to the group that the question belongs to by generating a link using the slug in the tag field.

My Question: Does this seem like an efficient way to execute this plan? Or might there be some other hooks or functions in the code that might make this better done in a different way? Please don’t spend a ton of time on this – I know your time is valuable. I’m mainly just looking for a simple, “Yeah, sounds like that is a good way to go,” or a “Have a look at function and see if that helps make it easier,” type thing.

Thanks in advance for any help/advice.

selected answer
1

Holla,
Your solution seem good to me. But if groups are CPT then AnsPress is ready for it. You just have to add group id as post_parent for AnsPress question. Later you can fetch questions using:
ap_get_questions( [ 'post_parent' => group_id ] );

Cheers.

commented on answer

Excellent – that is EXACTLY what I was hoping for! Thanks so much!

Thanks @Stockbridge for the question and @Rahul for the answer! I’m gonna try to investigate a a bit more but this could be a much better solution than the “related questions widget” we have been discussing no?

when using buddypress and bbpress integration, there will be forums both for buddypress users and buddypress groups, and administrator can custom whether assign forum to them.

I am trying to replace bbpress with Anspress, it would be great if you can make it support for buddypress group. An buddypress Add-on maybe solution?

Also I believe it would great helpful to anspress since there are over 200000 buddypress sites activated.

Thanks Rahul, and have a nice day.

Alex

You are viewing 1 out of 1 answers, click here to view all answers.