Group (the new OG) intro
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:
- 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
- Introduce the concept of roles and permissions, on the group level
- 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!

תגובות
Nice.
Good job Amitai. I'll try to pitch in if I can.
Wundebar!
Wundebar!
Confusing!
Confusing!
Allow associating entities
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.
> 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.
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)
This can already be done now
This can already be done now days with the Rules module integration. Group will have integration with Rules2.
could blocks be individually
could blocks be individually allowed to a group, a group of groups, or everybody please ?
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.
Wow.
This seems slick, smart and flexible. Looking forward to exploring it further!
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!
> 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).
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. :)
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.
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?
> 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().
Thanks for your time and for
Thanks for your time and for your clear explanations in the video.
OG is a nice and powerfull tool!
Wow that seems like it's
Wow that seems like it's going to be a really useful tool. Johnny from BuyDiamondRings.org
Interesting share
I have been looking for this kind of article since long when eventually i searched on google.com and find this. Thanks for such wonderful work. Web Design
I can confirm that it works
I can confirm that it works well. I tried a couple of times and then finally got it.
vuelos baratos
Carbon
Its a little difficult but interesting. I like it.
Carbon Footprint Calculator
Its a little difficult but interesting. I like it. Carbon Footprint Calculator
Group
I think there is already the best module for groups in Drupal 7, I am very glad to hear you've just ugraded the Group, weldone and keep it up! Robin from Nottingham