Home
  • English
  • עברית
  • Home
  • Portfolio
  • Blog
  • Services
  • About us
  • Contact

Group (the new OG) intro

Submitted by Amitaibu on Sun, 05/09/2010 - 17:11
— Tagged as
  • Drupal-planet
  • Group
  • OG

In the past few month, since Drupalcon Paris, I was busy upgrading Organic groups (a.k.a OG) to Drupal7. I'd like to give a quick overview of what has been done, what needs to be done, and the changes that came with the upgrade.

The first noticeable thing is that like Ubecart became Commerce, Organic groups has changed its name to Group. The second thing you will notice, is that Group is a complete rewrite of OG! Why was it done? OG is a great module, and it has been around for a long time. Long enough to be very popular and feature rich, but on the same time, concepts and implementations that were right in earlier Drupal versions became outdated. Using Drupal 7 new features - especially field API - were too hard to resist.

Here are the Group's main concepts, by importance:

  1. Allow associating entities (e.g. node, users, etc'.) to other entities - In plain English it means that you can have posts related to a group. Not more, not less
  2. Introduce the concept of roles and permissions, on the group level
  3. Provide integration with superior modules such as Views. We don't need to invent the wheel - just need to know how to hook into an existing one

Writing those concepts down made it easier to determine what should be in the core of Group and what should be a contrib module. The UI was separated to another module as-well, leaving us with a Group API module, that has as little assumptions as possible about how it will be used.

Time for the quick demo:

(As always -- The screencast script)

So, what is left to do? In a nutshell:

  • Upgrade path and add missing fields (group language and group theme)
  • Finish Views integration
  • Reach 100% test coverage
  • Document everything
  • Probably lots of other things I hope the community will bring up

Lets work on making Group the best module for groups in Drupal 7!

Comments

Nice.

Good job Amitai. I'll try to pitch in if I can.

  • reply
Submitted by Oren Zusman (not verified) on Sun, 05/09/2010 - 21:27.

Wundebar!

Wundebar!

  • reply
Submitted by Entrigan (not verified) on Sun, 05/09/2010 - 23:11.

Confusing!

Confusing!

  • reply
Submitted by Anonymous (not verified) on Mon, 05/10/2010 - 00:17.

Allow associating entities

Allow associating entities (e.g. node, users, etc'.) to other entities - In plain English it means that you can have posts related to a group. Not more, not less

Sorry-- but this sentence says two completely different things. Either it allows "associating entities" (meaning any entities) or it only relates posts (nodes?) to a group. They can't both be true. And what about users? Previously both users and nodes were associated with one or more groups.

  • reply
Submitted by Anonymous (not verified) on Mon, 05/10/2010 - 02:54.

> posts (nodes?) to a

> posts (nodes?) to a group

No, posts are not nodes. D7 is no longer node-centric, nor is Group. A user, is an entity, and it relates to the group the same way a node relates to a group.

  • reply
Submitted by Amitaibu on Mon, 05/10/2010 - 11:46.

Is it also possible to relate

Is it also possible to relate global user roles to groups?

(There seems to be a Drupal5 og module here http://drupal.org/project/og_default_roles that does this, but nothing since then.)

Use cases would be:
- give site editing/administration permissions based on group membership
- use custom content types, with some private fields which should only be viewed/edited by members of certain groups (field permission can only be given on a per-role-basis)

  • reply
Submitted by Sascha (not verified) on Sat, 06/19/2010 - 17:10.

This can already be done now

This can already be done now days with the Rules module integration. Group will have integration with Rules2.

  • reply
Submitted by Amitaibu on Sat, 06/19/2010 - 19:02.

could blocks be individually

could blocks be individually allowed to a group, a group of groups, or everybody please ?

  • reply
Submitted by aem34 (not verified) on Mon, 05/10/2010 - 11:30.

If blocks were fieldable that

If blocks were fieldable that would have been easier, but it won't be in D7. To show blocks only on certain groups, you will have to use your own custom logic or use the Context module.

  • reply
Submitted by Amitaibu on Mon, 05/10/2010 - 11:44.

Wow.

This seems slick, smart and flexible. Looking forward to exploring it further!

  • reply
Submitted by Itangalo (not verified) on Tue, 05/11/2010 - 10:02.

Wicked!

OG is growing up as well. :) I love how this leverages groups as sandboxes. Are you combining your efforts with the Spaces team?

The only thing I'm kind of opposed to is the name. Why not use the semi-convention of plural? "Groups" would suit this beauty better than "Group", IMO. Especially since it will probably most often handle multiple groups.

Anyway, keep up the awesome work!

  • reply
Submitted by Tobias Sjösten (not verified) on Wed, 05/12/2010 - 18:46.

> Why not use the

> Why not use the semi-convention of plural? "Groups"

Group is actually following Drupal's core convention (e.g. user module; node module).

  • reply
Submitted by Amitaibu on Wed, 05/12/2010 - 19:10.

You're right. Modules like

You're right. Modules like Views, Spaces, etc, came closer to mind but they are more so breaking convention than setting it. I retract my comment and leave Group as just an awesome module. :)

  • reply
Submitted by Tobias Sjösten (not verified) on Mon, 05/17/2010 - 18:21.

OG module was wonderful,I

OG module was wonderful,I like it, It's features were wonderful.the rewrite of OG,may not be user friendly!,Tannks.


  • reply
Submitted by martyn (not verified) on Mon, 05/17/2010 - 15:30.

private-only groups

What if I want private groups which *don't* allow post authors to mark individual posts as public?

I.e. don't show the "group content visibility" drop-down list on the "Add Node" page, and instead always use it's "use group defaults" value?

  • reply
Submitted by Sascha (not verified) on Sat, 06/19/2010 - 14:34.

> always use it's "use group

> always use it's "use group defaults" value?

You can set the default value for the field and disable/ hide it with hook_form_alter().

  • reply
Submitted by Amitaibu on Sat, 06/19/2010 - 16:20.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Gizra | Brener 5, Tel-Aviv 63826 Israel | +972-527-587-697 | info@gizra.com