0

I am trying to set up a site which has forums and organic groups.

I want to set it up so the specific forum for a group appears only on that groups page.

By keeping tight control on group creation I can ensure that when a group is created I also create a forum for that group with the exact same name - this allows me to show the forum for that group on the group page by parsing the URL and then filtering by the group name to check it matches a forum name - then displaying that forum in the view on that groups page.. so far so good..

I have also added a group reference field to the forum topic content type, so topics show in the recent group content etc..

When adding a new forum topic, I'd like to automatically populate this field so the topic is assigned to the correct group, rather than give the user a choice, which they could then change. Hopefully this shouldn't be too hard as if a topic is added in the 'football' forum it will be the 'football' organic group that it should be associated with.

How do I go about doing this?

(if there is an easier way of doing the whole thing I'm open to suggestion there too! ie if the group name and forum name will always be the same anyway, it should make things easier all round, no?..)

  • The og_forum_d7 module (dev version) is filtering forum topics in OGs just fine. – user54241 Nov 12 '15 at 22:13
1

I have struggled with this problem myself for some time and finally decided to just create a separate content type for my group forum topics and "create" a forum in each group with those topics.

I created a new content type called "Group Forum Topic." In Advanced Forum settings, I added this content type to the "node types to style" so that it would make it look like the forum.

On the og_content view, I added an additional block and named it "Group Forum topics" and I changed it to use the forum topic list format. Using the view from Advanced Forum (Topic list) as a template, I set up the view to display the "group forum topic" content like a forum.

This allowed me better control over the permissions -- I am using entityreference-prepopulate to prepopulate the group when they add the content and I have the group content set to private, so I know that the content will be kept private to the group.

I tried using other modules, but ran into issues with auto-selecting both the forum name and the group and didn't want to chance the user accidentally not selecting one of those things on their own. After a lot of testing and trying, this seemed to be the easiest solution to having a private group forum on the group page.

Keep in mind this does NOT create a listing for the forum on the forum index page. What I have done instead is add my group listings to my forum index page view, so that beneath my "regular" forums, I have a listing of "groups," which contain their private forums inside.

This is my first answer here and I know this question is old... but I ran across it when I was researching this issue myself and thought perhaps the next person looking for a resolution might find it and it might help them!

  • Hi Heather... how to list the forum within group? – Prerit Mohan Jul 18 '16 at 14:50
  • Hi -- sorry, just seeing this! I created a view that mocked the forum view and used it to create a "mini-forum" at the bottom of the group homepage. – Heather Aug 29 '16 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.