Organic Groups - Select Audience by Group Type

Last week I posted up a new Drupal module that attempts to improve the usability of the Organic Groups module when it's used with multiple group types and large numbers of groups. The module modifies the node edit form's audience selector, provided by the Organic Groups module, such that the groups are selectable by content type. This is useful on sites with a very large number of groups and many different group types. For example, a site like the one this was written for, with Districts, Schools and Interest Groups (all of which are content types defined as organic groups) will have have a node edit form with an individual selector for each group type.

Check it out, if you're an Organic Groups user, and let me know what you think.

Comments

Hey Jeff,

Your module looks like just what I need.

I've installed it on a site with a long list of groups but I don't understand how your module groups the audience checkboxes (which is probably why it isn't doing anything spectacular on my site.

Do you have to group the groups somehow in advance?

Please advise.

Kevin

Hi Kevin,
The module breaks apart the audience selector by content type. So, if you only have one group type, you will still only see one selector list. An example of a way to set this up would be the setup described on the module page, where you have Districts, Schools and Interest Groups, all of which are defined as Organic Groups in your site admin area.

Hi!

I have a drupal site with og, the nodes are created by through SOAP serverand I want to set the OG value from SOAP server. Can anybody help me?

Thanks in advance,

Gabriel

You should be able to set the $node->og_groups property to an array of group node IDs when constructing your node object before sending it to the server. Other attributes to look at would be $node->og_public (boolean, whether or not the node is public) and $node->og_groups_both (not sure what this does actually, or if it's needed, but it's in the loaded node object for a node submitted to a group).

Hi Jeff, I am currently running Drupal 6.12.
Your module is EXACTLY what I need. I simply have 2 group types but it is essential that members of groups in Group Type A can only post in their own specific group and groups OF TYPE B! Put simply, members of groups in Group Type A want to show their projects to members of groups of Type B but other groups of Type A are competitors and so they do not want them to see their projects.
I have been into Group Type A (content type) "OG Audience Settings" and have ticked the "omit from audience targetting system" box for the content type "Project". I have been into Group Type B and have ticked nothing except those roles I would like to be able to post into groups they do not belong to for the content type "Project".
However, neither groups of Type A nor Type B show up on the Audience Selector box when creating a node (nor when editing it).
Furthermore, in the "Project" content type I have restricted access to the "Public" checkbox to only the Administrator and yet this still appears for all users. In all, you module seems to be completely ignored. Am I doing something wrong? I would love to use it as it is perfect for what I want.
Many thanks for your time
Glen Moore

Hi Glen,
Have you posted an issue to the project issue queue regarding the problem you're having? I've not been able to pay much attention to the project for the past several months, but over the next couple of weeks I'll be able to turn my attention back to maintaining it. If you haven't, would you do so and include some step-by-step instructions for recreating the issue?

Will do Jeff, thanks for your time on this
Glen

G'day,

This sounds like exactly what I want (a way to split chapters from SIGs and give a separate list of each) but I'm wary of using unmaintained code (even if RC) on a production site.

What's the latest?

Sam

I'll be honest and say that it's probably good to use, but if you're looking for something that's actively maintained, you may want to check back in a couple of weeks.

Hi Jeff,

Your module is exactly what I was looking for. It saved me a lot of work.

Many thanks
Zion

Thanks, tried it - seems to be really great!

Very good I would recommend to anyone sharing Thanks for sharing.

It's an interesting idea, but I have some doubts regarding $node->og_groups property, can you provide us with some updates?

really is a time saver! thank you so much!