Using Drupal's Organic Groups, an Introduction - PNWDS 2013
-
Upload
renee-stephen -
Category
Technology
-
view
2.618 -
download
0
description
Transcript of Using Drupal's Organic Groups, an Introduction - PNWDS 2013
![Page 1: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/1.jpg)
WHO, WHAT, WHERE, WHEN, WHY… HOW?
A whirlwind tour of OG2!
![Page 2: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/2.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/4.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/5.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/6.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/7.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/8.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/9.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/10.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/11.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/12.jpg)
● 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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/13.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/14.jpg)
![Page 15: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/15.jpg)
OG Field Settings (admin/config/group/fields)
![Page 16: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/16.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/17.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/18.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/19.jpg)
![Page 20: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/20.jpg)
![Page 21: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/21.jpg)
![Page 22: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/22.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/23.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/24.jpg)
![Page 25: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/25.jpg)
![Page 26: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/26.jpg)
Classes!
![Page 27: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/27.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/28.jpg)
![Page 29: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/29.jpg)
![Page 30: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/30.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/31.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/32.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/33.jpg)
ors.ubc.ca
sparc.ubc.ca
uilo.ubc.ca
research.ubc.ca/ore
![Page 34: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/34.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/35.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/36.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/37.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/38.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/39.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/40.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/41.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/42.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/43.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/44.jpg)
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](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/45.jpg)
The End
Shout out to OG’s maintainer Amitai Burstein: amitaibu
![Page 46: Using Drupal's Organic Groups, an Introduction - PNWDS 2013](https://reader033.fdocuments.net/reader033/viewer/2022052523/55560c45d8b42a3f168b4ce0/html5/thumbnails/46.jpg)