adding context to your site using drupal organic groups
DESCRIPTION
Using Drupal Organic Groups to build communities is cool. But why not look a bit further? We started experimenting and found new ways to use the flexible built-in API. It is perfect for setting up very complex structures within a single Drupal environment. It lets you create small or larger sections that can start leading a life of their own.TRANSCRIPT
![Page 1: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/1.jpg)
PRESENTS
![Page 2: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/2.jpg)
Context toevoegen aan uw Drupal site met Organic GroupsDrupal User Group
drupal.be
![Page 3: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/3.jpg)
Me
Stijn De Meyere
Drupal Developer
@stijndm
![Page 4: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/4.jpg)
Organic Groups
![Page 5: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/5.jpg)
Enable users to create and manage their own
'groups'. Each group can have subscribers, and
maintains a group home page where subscribers
communicate amongst themselves.
![Page 6: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/6.jpg)
Agenda● Cases
● Basis concepten van Organic Groups
● Welke API is er voor handen
● Integratie en uitbreiding
● Uitlichten cases
● Nababbelen
![Page 7: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/7.jpg)
Inspireren
![Page 8: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/8.jpg)
Cases
![Page 9: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/9.jpg)
3 cases
● Corporate site met brandsites
● Boekenplatform met e-commerce integratie
● Ledenmanagementplatform
![Page 10: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/10.jpg)
Deme Brandsites
![Page 14: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/14.jpg)
Uitdagingen
● Gedeelde content over corporate site en brandsites
● Delegeren van content over de verschillende brandsites
● Verschillende content beheerders, met eigen rollen en
rechten
● Content workflows
● Zelf aanmaken en beheren van brandsites
● Brandsite beheerders
● (Beperkte) meertaligheid
![Page 15: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/15.jpg)
Boeda boekenplatform
![Page 16: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/16.jpg)
Boeda boekenplatform
![Page 17: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/17.jpg)
Boeda boekenplatform
![Page 18: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/18.jpg)
Uitdagingen
● Verschillende type gebruikers
○ Uitgevers
○ Vertegenwoordigers/verkopers
○ Boekhandels
● Elke entiteit kan meerdere beheerders hebben
● Bepaalde gebruikers moeten overkoepelend kunnen werken
● E-commerce
![Page 19: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/19.jpg)
KSJ Leden management
![Page 20: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/20.jpg)
KSJ Leden management platform
![Page 21: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/21.jpg)
KSJ Leden management platform
![Page 22: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/22.jpg)
● Verschillende type leden
● Verschillende rechten afhankelijk van uw groep en rol binnen
uw groep
● Groep-overkoepelende rollen
● Bijhouden van ledengeschiedenis
● Groepen hiërarchie
Uitdagingen
![Page 23: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/23.jpg)
De basics
![Page 24: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/24.jpg)
Organic groups basics
● Group and Group Audience
● OG membership
● OG permissions
● OG roles
● OG context
![Page 25: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/25.jpg)
Group and Group Audience
Group
Field dat een entity als group aanduidt.
Niet zichtbaar in UI.
Group Audience
Entity reference field met specifiek group gedrag.
Koppelt een entity aan een groep.
![Page 26: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/26.jpg)
OG Membership
Entity dat een lidmaatschap aanduidt.
bv: gebruiker X is lid van groep 1
Er kunnen verschillende types gedefinieerd worden.
Vergelijkbaar met type krantenabonnement: 6 maanden vs 12 maanden.
![Page 27: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/27.jpg)
OG roles & permissions
Een interne rollen systeem dat toelaat om op groepniveau rechten toe te kennen.
bv: een rol die toelaat nieuwsberichten te publiceren in een groep
![Page 28: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/28.jpg)
OG context
Een conditioneel systeem die toelaat een groep te activeren op basis van bepaalde kenmerken
Net als de core language negotiation
![Page 29: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/29.jpg)
OG API
![Page 30: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/30.jpg)
Dé beste resource voor wat OG doet en kan:
● og.module● og.api.php
![Page 31: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/31.jpg)
Wat je moet weten
(1) Entity reference wordt onderschept en opgeslaan als og_membership.
EntityFieldQuery kan wel nog gebruikt worden. Zie:
og_entity_query_alter()
og_query_og_membership_alter()
(2) Alles kan van alles lid zijn.
Elke entity kan als groep dienen, elke entity kan als lid fungeren.
![Page 32: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/32.jpg)
Groep of groep content
og_is_group($entity_type, $type)
og_is_group_type($entity_type, $bundle_name)
og_is_group_content_type($entity_type, $bundle_name)
![Page 33: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/33.jpg)
Iets of iemand lid maken
og_group($group_type, $gid, $values, $save_created)
og_ungroup($group_type, $gid, $entity_type, $etid)
og_get_entity_groups($entity_type, $entity, $states)
![Page 34: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/34.jpg)
Rechten beheren
hook_og_permission()
og_user_access($group_type, $gid, $string, $account, ...)
hook_og_user_access_alter()
og_role_grant($group_type, $gid, $uid, $rid)
og_role_revoke($group_type, $gid, $uid, $rid)
og_roles()
og_get_user_roles()
![Page 35: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/35.jpg)
Lidmaatschap opvragen
og_is_member($group_type, $gid, $entity_type, $entity)
og_get_groups_by_user($account, $group_type)
og_get_entity_groups($entity_type, $entity, $states)
Membership laden op basis van groep en entity
og_get_membership()
![Page 36: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/36.jpg)
When funny things happen
og_flush_caches()
typical databse caches
og_invalidate_cache()
includes static caches
![Page 37: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/37.jpg)
Context
Ook wel, welke groep is er nu eigenlijk actief
og_context($group_type)
Of als je een specifieke groep wil activeren
og_context($group_type, $group)
hook_og_context_negotiation_info()
![Page 38: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/38.jpg)
Rules
Let rules do all the leg work.
![Page 39: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/39.jpg)
Integregeren en uitbreiden
![Page 40: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/40.jpg)
Code, cases, demos
Te bekijken
● OG Context
● Autopopulate
● PURL
● Variable & variable realms
● Views integrations
● Dynamic nodequeues
![Page 41: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/41.jpg)
Limieten & lessen
![Page 42: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/42.jpg)
Revisions zijn lastigIn het algemeen geschiedenis bijhouden van leden en status
![Page 43: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/43.jpg)
Globale adminsUser 1 rechten dupliceren
![Page 44: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/44.jpg)
Multiple memberships & types
OG Membership is nogal single minded
![Page 45: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/45.jpg)
OG Permissions vs Site Permissions
Dat loopt soms door mekaar en kan onverwachte resultaten geven. Goed over nadenken.
![Page 46: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/46.jpg)
Heb ik iets gemist?
![Page 47: Adding context to your site using Drupal Organic Groups](https://reader036.vdocument.in/reader036/viewer/2022081519/55610491d8b42a8c388b57e7/html5/thumbnails/47.jpg)
C-MINE 1 BUS 13Evence Coppéelaan 91
3600 GenkBelgium
Phone +32 89 20 15 00Fax +32 89 20 15 01
Thanks!