Using Drupal's Organic Groups, an Introduction - PNWDS 2013

46
WHO, WHAT, WHERE, WHEN, WHY… HOW? A whirlwind tour of OG2!

description

Using Drupal's Organic Groups module: who, what, where, why and when? We'll discus potential alternatives and go into a little more depth with 3 case studies. We’ll sort out any of the pain points you have experienced -- and show you new ways to leverage Organic Groups has to offer. By UBC's Valerie Eades and Renée Stephen

Transcript of Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Page 1: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHO, WHAT, WHERE, WHEN, WHY… HOW?

A whirlwind tour of OG2!

Page 2: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

ABOUT US

Renée StephenCMS Developer & Webmaster

UBC Computer Science

Valerie EadesProgrammer AnalystUBC IT Web Servicesdmt.it.ubc.ca

Page 3: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Roadmap

WHAT is it?

HOW does it work?

Examples of WHERE and WHEN (case studies)

WHY use it?

WHO should use it?

Page 4: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHY use Organic Groups?

Powerful means for users to self organize around content they care about

Flexible user-powered access control

Easy to create complex relationships between content and entities

Plentiful third-party integration

Page 5: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Roadmap

WHAT is it?

HOW does it work?

Examples of WHERE and WHEN (case studies)

WHY use it?

WHO should use it?

Page 6: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHO needs it?

● need content organization with flexible access control

● want private discussion or document-sharing spaces

● need a wiki or collaborative space, but want better usability and organization

● have subunits wanting to brand and control content but share other areas of their site.

If you:

Page 7: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Roadmap

WHAT is it?

HOW does it work?

Examples of WHERE and WHEN (case studies)

WHY use it?

WHO should use it?

Page 8: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHAT is Organic Groups (OG)?

It’s a little Drupal site within your Drupal site!

Groups:

● have members, roles, and permissions

● can have $THINGS added to them by their members

Group content can be organized, displayed using group membership and a user’s group access.

Page 9: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHAT is Organic Groups (OG)... cont?

● Each group is a collection of stuff + permissions

● Users can subscribe, or be added by members

● Members assignedroles, permissions

● Members administer,managing roles,users, permissions.

Page 10: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Another Group

Group

OG relates entities to parent entities

Members and content are allentity references

Page 11: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Roadmap

WHAT is it?

HOW does it work?

Examples of WHERE and WHEN (case studies)

WHY use it?

WHO should use it?

Page 12: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

● Memberships (fieldable)● State (active / pending / disabled)● Roles● Permissions

Group entities have attributes:

...which can integrate with:

HOW?

Page 13: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

HOW?

Two key fields:Group (int):

is the entity a group?Group audience (entityreference):

assign this content to groups

Plus helper fields:Group visibility (int):

Can user alter content visibilityGroup roles and permissions (int):

Let group manager override defaults

Page 14: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 15: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

OG Field Settings (admin/config/group/fields)

Page 16: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Roadmap

WHAT is it?

HOW does it work?

Examples of WHERE and WHEN (case studies)

WHY use it?

WHO should use it?

Page 17: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

WHERE & WHEN?

Case Study 1: Community sites

Case Study 2: Content organization with baked-in access control

Case Study 3: Subsite management

Page 18: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case Study 1: Community sites

● Out of the box, OG is a community site-builder

● OpenAtrium, Commons: powered by OG

Page 19: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 20: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 21: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 22: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case Study 1: Community sites

● Out of the box, OG is a community site-builder

● OpenAtrium, Commons: powered by OG

● Simple alternatives:

● Flag and/or Entityreference, with Node Access Node Reference to pass access

● Content Access, Forum

Page 23: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case Study 2: an IntranetWe needed self-organizing working groups, committees.

Some wanted:

● universal public access● mixed access● specific access control over some content.

… They all wanted to control memberships and permissions to add / edit / delete.

Page 24: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 25: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 26: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Classes!

Page 27: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Pros / Cons?

Alternatives? Taxonomy Access Control (TAC), Content Access, Workbench...

OG lets you:

● Delegate “module-lite” permissions to users

● Users manage almost anything in “their” group

Page 28: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 29: Using Drupal's Organic Groups, an Introduction - PNWDS 2013
Page 30: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Integrations

OG LDAP - OG Menu - OG Workflow - Rules - Views - Tokens - OG Moderation - Profile2 - Panels - Search API - Webform - ...

etc etc etc…

About 387,000 results (0.20 seconds)

Page 31: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case Study 3: “Multi-site”

Website for organization with sub-units

Share some structures, content, design

Sub-units:

● Have own content requirements● Content editors● Need individualized branding● Want their own domain

Page 32: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Example

UBC’s office ofthe Vice President Research &International(VPRI)

reseach.ubc.ca

Page 33: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

ors.ubc.ca

sparc.ubc.ca

uilo.ubc.ca

research.ubc.ca/ore

Page 34: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: The OG Solution

Create a content type “sub-site” as group type

Create a number of group content types:

“Announcement”“Carousel Item”“Event”“Page”“Profile”“Webform”

Use views to create “sub-site” content blocks for shared group content types

Page 35: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Organizing with OG Menus

1. When creating new group content types (e.g. Page) – check “Enable for OG Menus”

Page 36: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Organizing with OG Menus

2. When creating new “sub-site” check “enable menu for this group”

Page 37: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Organizing with OG Menus

Organic Menus have own link under admin->structure

Or can be access by path: admin/structure/og_menu

Page 38: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Differentiating Sub-sites by Path Alias

Edit url alias patterns to include “group” name in path

Using token:

[node:og-group-ref]

Needed for:● Views contextual filter● Domain handling

Page 39: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Theming Sub-site

Global Base Theme common look and feel

Subthemes for each “sub-site”

Each “sub-site” can apply theme settings, css, scripts, templates as needed

Page 40: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Applying Theme to Sub-site

Using “ThemeKey” module(admin/config/user-interface/themekey)

Available Properties:

Group IDGroup Type

Note: group:id = nid for group type entity instance

Page 41: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Adding sub-site domain

Server directives:

1. Create server alias for additional domains

Page 42: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Redirect Domain Request to Sub-site

Server directives:

2. Use rewrite rules to direct domain to right content path

Mysub.domain.com =>Mysub.domain.com/<subsite>

Page 43: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

Case 3: Domain Handling for Drupal Path

1. Make sure right path is attached to right domain Awkward – needs PHP redirect scripts

Page 44: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

To sum up….

WHY: Flexibility, user control

WHAT: Entities -> entities, roles, permissions

WHO: needs a better wiki, community space, or sub-site.

HOW:- Organic Groups Documentation: https://drupal.org/node/2014733 - Lullabot training videos:http://drupalize.me/series/organic-groups-drupal-7

Page 45: Using Drupal's Organic Groups, an Introduction - PNWDS 2013

The End

Shout out to OG’s maintainer Amitai Burstein: amitaibu

Page 46: Using Drupal's Organic Groups, an Introduction - PNWDS 2013