SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
PRESENTS
Context toevoegen aan
uw Drupal site met
Organic Groups
Drupal User Group
drupal.be
Me
Stijn De Meyere
Drupal Developer
@stijndm
Organic Groups
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.
Agenda
● Cases
● Basis concepten van Organic Groups
● Welke API is er voor handen
● Integratie en uitbreiding
● Uitlichten cases
● Nababbelen
Inspireren
Cases
3 cases
● Corporate site met brandsites
● Boekenplatform met e-commerce integratie
● Ledenmanagementplatform
Deme Brandsites
Deme Brandsites - http://deme-group.com
Deme Brandsites - http://deme-group.com
Deme Brandsites - http://deme-group.com
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
Boeda boekenplatform
Boeda boekenplatform
Boeda boekenplatform
Uitdagingen
● Verschillende type gebruikers
○ Uitgevers
○ Vertegenwoordigers/verkopers
○ Boekhandels
● Elke entiteit kan meerdere beheerders hebben
● Bepaalde gebruikers moeten overkoepelend kunnen werken
● E-commerce
KSJ Leden management
KSJ Leden management platform
KSJ Leden management platform
● Verschillende type leden
● Verschillende rechten afhankelijk van uw groep en rol binnen
uw groep
● Groep-overkoepelende rollen
● Bijhouden van ledengeschiedenis
● Groepen hiërarchie
Uitdagingen
De basics
Organic groups basics
● Group and Group Audience
● OG membership
● OG permissions
● OG roles
● OG context
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.
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.
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
OG context
Een conditioneel
systeem die toelaat
een groep te activeren
op basis van bepaalde
kenmerken
Net als de core
language negotiation
OG API
Dé beste resource voor
wat OG doet en kan:
● og.module
● og.api.php
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.
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)
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)
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()
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()
When funny things happen
og_flush_caches()
typical databse caches
og_invalidate_cache()
includes static caches
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()
Rules
Let rules do all the leg
work.
Integregeren en
uitbreiden
Code, cases, demos
Te bekijken
● OG Context
● Autopopulate
● PURL
● Variable & variable realms
● Views integrations
● Dynamic nodequeues
Limieten & lessen
Revisions zijn lastig
In het algemeen geschiedenis bijhouden van leden en status
Globale admins
User 1 rechten dupliceren
Multiple memberships
& types
OG Membership is nogal single minded
OG Permissions vs Site
Permissions
Dat loopt soms door mekaar en kan onverwachte resultaten
geven. Goed over nadenken.
Heb ik iets gemist?
C-MINE 1 BUS 13
Evence Coppéelaan 91
3600 Genk
Belgium
Phone +32 89 20 15 00
Fax +32 89 20 15 01
Info@nascom.be
Thanks!

Contenu connexe

Similaire à DUG: Context toevoegen aan uw Drupal site met Organic Groups

Drupal entity presentatie
Drupal entity presentatieDrupal entity presentatie
Drupal entity presentatie
Ward Brems
 
Drupal 7 Theming
Drupal 7 ThemingDrupal 7 Theming
Drupal 7 Theming
Hans Rossel
 
Drupal Views Cck Hans Rossel
Drupal Views Cck Hans RosselDrupal Views Cck Hans Rossel
Drupal Views Cck Hans Rossel
Hans Rossel
 
Navorming ict ondersteund leren coltd
Navorming ict ondersteund leren coltdNavorming ict ondersteund leren coltd
Navorming ict ondersteund leren coltd
Artevelde - VUB
 

Similaire à DUG: Context toevoegen aan uw Drupal site met Organic Groups (20)

Ontwikkelen van online platformen met Drupal 8
Ontwikkelen van online platformen met Drupal 8Ontwikkelen van online platformen met Drupal 8
Ontwikkelen van online platformen met Drupal 8
 
General Drupal presentation in Dutch
General Drupal  presentation in DutchGeneral Drupal  presentation in Dutch
General Drupal presentation in Dutch
 
Drupal entity presentatie
Drupal entity presentatieDrupal entity presentatie
Drupal entity presentatie
 
20070914 Van Nieuwerburg Inge2
20070914 Van Nieuwerburg Inge220070914 Van Nieuwerburg Inge2
20070914 Van Nieuwerburg Inge2
 
Smartsite iXperion Redactiebasistraining
Smartsite iXperion RedactiebasistrainingSmartsite iXperion Redactiebasistraining
Smartsite iXperion Redactiebasistraining
 
Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010
 
Mis02 Hc6
Mis02 Hc6Mis02 Hc6
Mis02 Hc6
 
Drupal 7 Theming
Drupal 7 ThemingDrupal 7 Theming
Drupal 7 Theming
 
Multimediagebruik in Drupal 7 met de Media module
Multimediagebruik in Drupal 7 met de Media module Multimediagebruik in Drupal 7 met de Media module
Multimediagebruik in Drupal 7 met de Media module
 
Lucius Websystems Drupal Startersdag
Lucius Websystems Drupal StartersdagLucius Websystems Drupal Startersdag
Lucius Websystems Drupal Startersdag
 
Drupal Views Cck Hans Rossel
Drupal Views Cck Hans RosselDrupal Views Cck Hans Rossel
Drupal Views Cck Hans Rossel
 
Drupalgardens
DrupalgardensDrupalgardens
Drupalgardens
 
Navorming ict ondersteund leren coltd
Navorming ict ondersteund leren coltdNavorming ict ondersteund leren coltd
Navorming ict ondersteund leren coltd
 
Wat is drupal? - Drupal seminar 20 mei 2010, Colours
Wat is drupal? - Drupal seminar 20 mei 2010, ColoursWat is drupal? - Drupal seminar 20 mei 2010, Colours
Wat is drupal? - Drupal seminar 20 mei 2010, Colours
 
1 integratie ict 2016 2017 (1)
1 integratie ict 2016 2017 (1)1 integratie ict 2016 2017 (1)
1 integratie ict 2016 2017 (1)
 
Let's Learn IT - CommunIcaTie
Let's Learn IT - CommunIcaTieLet's Learn IT - CommunIcaTie
Let's Learn IT - CommunIcaTie
 
Les 3 Inct. Training WordPress
Les 3 Inct. Training WordPressLes 3 Inct. Training WordPress
Les 3 Inct. Training WordPress
 
V-ICT-OR SHOPT IT 2014
V-ICT-OR SHOPT IT 2014V-ICT-OR SHOPT IT 2014
V-ICT-OR SHOPT IT 2014
 
Drupal intro 2010
Drupal intro 2010Drupal intro 2010
Drupal intro 2010
 
MediaWiki in Bedrijf
MediaWiki in BedrijfMediaWiki in Bedrijf
MediaWiki in Bedrijf
 

DUG: Context toevoegen aan uw Drupal site met Organic Groups