Organic Groups: Enable users to create collaborative groups

Last modified: December 26, 2008 - 05:12

Organic groups enables users with permissions to create and manage their own groups. Community members often want to self organize or spontaneously organize around a topic of interest. Allowing communities to organize naturally is an important part of a healthy community.

An organic group is created by a single group owner, who has special permissions including the ability to delete the group the owner created. Group administrators also have special permissions but can not delete the group unless they are assigned to be the group owner. Group subscribers communicate amongst themselves using the group home page as a focal point. They do so by posting the usual content types: blog, story, page, etc. A block is shown on the group home page that links to these group specific posts and actions. The block also provides summary information about the group.

Groups may be selective or not. Selective groups require approval by the group administrator in order to become a member. Organic groups also support private groups which will not be displayed in a list of organic groups. You cannot use this module with other node access modules.

You can:

  • enable organic group creation and administration permissions at administer >> access.
  • create organic groups at create content >> group.
  • view a list of organic groups at groups.
  • administer organic group at administer >> settings >> og.
  • disable commenting and attachments for nodes of type group at administer >> content >> configure >> content types >> group.
  • enable group details block, group subscriber block, new groups block, and my groups block at administer >> block.
  • subscribe to groups by selecting the subscribe link in the group block.
  • create content, invite friends, manage subscriptions, view list of subscribers, and see the group administrator in the group block.
  • enable images in the group details block if you have the image module installed.
  • file issues, read about known bugs, and download the latest version on the Organic Groups project page.

Setup under 5.0

skor - January 27, 2007 - 21:06
  1. Make sure you've downloaded and extracted the Views module into your /sites/all/modules directory, and enabled Views and Veiws_RSS under Admin>>Site Building>>Modules.
  2. Download and extract the Organic Groups Module into your sites/all/modules directory
  3. Go to Admin>>Site Building>>Modules and enable the OG module
  4. Go to Admin>>Content Management>>Content Types and create a new content type. I entered the following:
    • Name = Group
    • Type=Groups
    • Description=A collection of people with a common goal
    • Title field label=Group Name
    • Body field label=blank
    • Minimum number of words = 0
    • Explanation or submission guidelines = blank for now
    • Default Options= Published, Not Promoted, Not Sticky, Don't create new revisions
    • Default comment settings = Disabled
    • Save Content Type
  5. Go to Admin>>Organic Groups>>Organic Groups Config and:
    • Access Control: Enable/Disabled your choice (I need to read up on this some more. I've used Taxonomy_Access in the past)
    • Group Details: Pretty self explanitory
    • Node authoring form: Whatever seems right to you. Under Omitted Content Types, you'll probably want to select the "Group" content type you created above, but that might happen automatically after the next step
    • Group home page: Under Group home page node types, pick your Group Content type you created above.
    • Email settings: as desired
    • Member pictures: as desired

Now you can go to Create Content>>Group and create your first group.

Updated 1/27/07: to reflect 5.0 installation of contrib modules into /sites/all/modules instead of /modules

Correction to step 4

ralphjohnson - February 22, 2007 - 23:00

Type = groups (must be lowercase).

Thanks for the step-by-step. Seems to work well.

If upgrading from 4.7

m1k83l - May 13, 2008 - 17:09

To upgrade from 4.7, I had to name the type 'og' instead of 'groups.'

Access Control

Matthew OMalley - April 27, 2007 - 03:56

Right after step 5 and before creating content, you also need to go to Admin>>User Management>>Access Control and set certain roles to create and edit and edit own Groups.

______________________
Grand Junction Design, LLC
Web and Print Design For
Nonprofits and Foundations

Set Up Under Drupal 6

drupal92037 - October 26, 2009 - 06:25

Setup under Drupal 6 is similar to instructions for 5.0 (above), but when creating a new content type, you don't have to enter "Groups" in the Type field. Instead, at the bottom, there is a checkbox for designating the content type as a group node.

Also, the content type's Name field doesn't have to be set to "Group". It can be anything you want.

Maybe This step by step will help you.

drupalcat - May 16, 2007 - 17:11

Maybe This step by step will help you.

Setting up Organic groups configuration

* go to module configuration
* go to Organic groups configuration
* go to "Group home page" and expand
* there will be a list of "Group home page node types:" you will need to add a "group" node type
* click the link that states "create a simple node type" at the bottom of the page
* click the link that states "Add content type"
* fill in fields make "type" called "group"
* return to "Organic groups configuration" page in module configuration expand "Group home page"
* you should now see a "group" field for selection highlight it and save configuration

Setting up URL alias configuration for groups

* go to module configuration
* go to URL aliases
* click "add alias" link
* Existing system path: = node/add/group and og/add
* click "update alias" button

Organic groups access control

* go to administration
* go to "Organic groups configuration"
* pull down "Access control"
* click "Enable" button to enable access control for post to controlled groups

a bit confused...

kpm - October 4, 2007 - 16:50

* go to module configuration
* go to URL aliases
* click "add alias" link
* Existing system path: = node/add/group and og/add
* click "update alias" button

I am a bit confused with this, right now if I navigate to node/add/group I am taken to the correct location, the correct add group page of the content type group that I created. If I navigate to og/add I am taken to the add view page. These are two different locations, am I misunderstanding something? Won't you loose access to the node/add/group if you alias it to the og/add which would then bring you to the views page when navigating to /node/add/group??

I think...

NikLP - January 9, 2008 - 14:10

...that this is referring to "these are the existing aliases for OG, alias them to what you want", not alias one onto the other :)

Kineta Systems - Web Development in Nottingham

Group pages

jcade - November 25, 2008 - 21:22

I cannot get the content type that is associated with my group (in this case, Story) to show up on my groups page, even when selecting that group as the audience for the post. What in the world am I missing?!

I want the entire post to show up.

Also having this problem

SAFW - March 3, 2009 - 18:17

Add me to the list, did something break under 6x-1.1? If anyone can offer pointers it would be much appreciated!

Force One Group Per user

wingie - February 10, 2009 - 05:20

Does anybody know how it would be possible to make sure a user can join ONLY one group and not any more?

Problem

sandipdev - April 26, 2009 - 19:41

I have a problem. Just installed OG. Now SMTP server is not working on my system.Its just a Win XP machine. I have created a few groups. Now when a user tries to join a group by click on Request to Join, it says that the request has been sent for approval by administrator. However, I dont find any request anywhere when I log in as admin. It not under notification or messages or anywhere else. I have changed the request method to web. But nothing seems to be working. Pls help.

I believe...whatever doesn't kill you, makes you.......stranger

Smoother Invite workflow

zchandler - May 5, 2009 - 18:58

I am trying to make OG easier for my users, and the Invite functionality is the piece that needs (imho) to be exposed better. (In this context all groups are Moderated, so Invite is always applicable.)

My plan is to redirect users to the OG Invite page after group node creation ... which is where I am currently stuck. Moshe could no doubt do this one-handed and blind-folder, for me it's a stumper.

I already tried FormAPI $form['#redirect'] (see http://drupal.org/node/134000#comment-1556220) but since that value can only do fixed paths, I can't come up with a way to use it so that it ends in the appropriate /$gid.

Here's the og.module function for making the Invite Page:

function og_invite_page($gid) {
  $node = node_load($gid);
  if ($node->og_selective < OG_INVITE_ONLY || og_is_node_admin($node)) {
    return drupal_get_form('og_invite_form', $gid);
  }
  else {
    drupal_access_denied();
  }
}

So presumably I could get there with some custom module magic, but that is just outside my current expertise level.
Any suggestions out there in the Drupalverse?

Answered

joshk - May 5, 2009 - 21:12

------
Personal: Outlandish Josh
Professional: Chapter Three

Node access module conflicts?

SheilaRuth - July 15, 2009 - 17:19

According to the page above, "You cannot use this module with other node access modules." However, the link points to a 4 year old post. Does anyone know if this is still true? In Drupal 6.x, can Organic Groups co-exist with Taxonomy Access Control?

Well...

NikLP - July 16, 2009 - 00:36

I spoke to Moshe about this (in very little detail) recently, and I think the "modern" take on it is that you can indeed integrate OG with node access modules, as long as you're aware of the caveats of the access control system. Obviously, there are potential pitfalls and limitations of this. Be sure to read up about Drupal's access control system, which may help you decide which, if any, access control module is best for your particular use case.

Thanks!

SheilaRuth - July 30, 2009 - 15:23

Thanks!

Seems to work

roball - July 20, 2009 - 07:02

I have asked the same half a year ago in the issue queue at #384094: Compatibility with the "ACL" module without any response. Nevertheless, I am now running OG 6.x-2.0-rc3 together with ACL 6.x-1.0 and Content Access 6.x-1.1 and did not observe an incompatibility yet.

-- Robert Allerstorfer

Great. Thanks for that update.

Taxoman - August 19, 2009 - 11:27

We need more confirmations that OG2.x is playing nicely along with the ACL framework for Drupal6, especially here on this handbook page as to ensure people that it is stable and well working especially in regards to security etc.

How about updating the setup

pivey - November 1, 2009 - 20:07

How about updating the setup instructions for latest D6?
Like many other modules... you need hours to figure out how to setup and use them

OG Workspace Content Creation

bbass - November 28, 2009 - 19:33

I'm using the Organic Groups module to create a collaborative workspace for a very specific purpose, so I would like to go ahead and populate each new group with a particular set of content types and display those as a menu regardless of their states of completion. I'm having a lot of trouble with this and wonder if there's something I don't understand - will I need to use PHP in the menu links (that is, $gid or something to that effect)? Or any other general tips?

Setting up Drupal Organic Groups

skizzo - December 14, 2009 - 21:55

Just in case you are looking for it... here is a nice tutorial on D6 OG setup (May 2009)

http://groups.idcminnovations.com/articles/setting-drupal-organic-groups

Some OG tips

developer-x - January 28, 2010 - 18:13

Here are some tips that I came away with having knocked around OG:

1. If you append ?gids[]= to the add node url, it will automatically select the organic to post to. For example:

node/add/post?gids[]=1

This will bring up the "Add Post" page with the Audience preselected to the OG with a nid of 1

2. If you are using Panels with OG and you want to have a PHP based visibility rule to display a block based off of membership, you can use this code :

$object = $contexts ['argument_nid_1'];
$object = $object->data;
return og_is_group_member($object->nid);

3. Node gallery module is a great module for uploading multiple images - but if you want to include the uploaded files into a block within group, you will need to extend the OG views. I won't go into how to extend a view, but here are the view extension definitions I used to include the Node Gallery:

$data['og_ancestry']['node_galleries_gid']= array(
'real field' => 'nid',
'title' => t("Gallery Image from OG"),
'relationship' => array(
'title' => t("Gallery Image from OG"),
'help' => t("Bring in node gallery's images based off an OG"),
'base' => 'node_galleries',
'base field' => 'gid',
'relationship field' => 'nid',
'handler' => 'views_handler_relationship',
'label' => t("Gallery Image from OG"),
),
);
$data['node_galleries']['gid']['field'] = array(
'handler' => 'views_handler_field_numeric',
);

I hope somebody finds these tips useful

Groups duplicate entry

siva_qus - March 10, 2010 - 11:50

When I create a group and some one post a comment or entry for that groups , the entry will repeat 2 or 3 times. And the group display also repeat 2 or more times , if I am manager of that group. how do i avoid this.

Thanks

Siva

 
 

Drupal is a registered trademark of Dries Buytaert.