SlideShare uma empresa Scribd logo
1 de 40
Using Spaces
  Stijn De Meyere
Topics
• Spaces in general
• Space types
• Spaces + PURL
• Space controllers
• Features integration
• Use cases

                            2
What is spaces?
http://drupal.org/project/spaces




                                   3
From the project page

Spaces is an API module intended to make
 configuration options generally avaliable
only at the sitewide level to be configurable
and overridden by individual "spaces" on a
                 Drupal site.




                                               4
My description


 Spaces is an API module that introduces
context to your site, effectively allowing you
      to load different configuration.




                                                 5
What does this mean?
• Abstract API
• No real UI
• For developers




                           6
What’s it good for?
• Create site sections
• Set up multiple sites with or without shared content
• Create private/public groups
• Give editor/admin rights to certain users on certain
  parts of the site

• Enable different features based on the active
  space

• ...
                                                         7
The Magic



spaces_load('space_type', 'id')->activate();




                                           8
The Magic



$space = spaces_get_space();




                               9
The Magic



$space->deactivate();




                        10
Space types



              11
Space types
• Trigger (not as in actions)
• A property, anything you want
• Plugin based (ctools)
• Extend base types




                                  12
Provided space types
• Organic Groups
• Taxonomy
• User




                           13
Spaces + PURL
http://drupal.org/project/purl




                                 14
PURL
                 Persistent URL




It is meant to be a helper for other modules
  interested in using elements of the page
    request to sustain information between
  pages without using a SESSION or other
                hackish means.




                                               15
PURL Providers
• Path prefixes: http://example.com/foo/node/5
• Path prefix pairs: http://example.com/group/1/node/5
• Query string: http://example.com/node/5?group=1
• Domains: http://example.com/node/5
• Subdomains: http://foo.example.com/node/5
• Path Extensions: http://example.com/node/5.csv
  (detection only, no rewriting)

• HTTP User Agent: Mozilla/5.0 (iPhone; U; CPU like
  Mac OS X; en) (detection only, no rewriting)
                                                        16
PURL
• Rewrite link
  • hook_url_inbound_alter()
  • hook_url_outbound_alter()




                                17
The Magic

$options = array(
 'purl' => array(
   'provider' => 'purl_provider', 
   'id' => 5
 ),
);



                                     18
The Magic


$options = array(
 'purl' => FALSE,
);




                     19
Spaces + PURL
• extend space_type_purl
• Keeps a space alive




                           20
Space controllers



                    21
Space controllers


Provides a way to manage configuration for
               each space.




                                            22
Space controllers


Configuration that lives, or can live, in code can
               be overruled.

    (or basically: anything that comes with a hook or a
        drupal_alter can become space dependent)




                                                          23
Configuration stack


   site > preset > space




                           24
Configuration stack


     site > preset > space
 site > preset > space > user




                                25
Implemented controllers
• Variable
• Context

• (menu reorder)




                            26
Spaces + Features



                    27
Spaces + Features
• A special controller to manage features in a
 space

• Disable / Enable a feature without touching the
 feature module

• Provide configuration for your feature



                                                    28
The Magic


spaces[types] = "all"
spaces[types] = "og"
spaces[types] = "user"




                         29
Spaces Dashboard


Provides a feature to create/configure a
        dashboard per space.




                                          30
Obligatory screenshot
                        31
Use Cases



            32
Open Atrium
http://openatrium.com/
                         33
Belgian Beer Weekend
  http://belgianbeerweekend.jp

                                 34
Belgian Beer Weekend
  http://belgianbeerweekend.jp
                                 35
Belgian Beer Cafe
http://www.belgianbeercafe.com/
                                  36
Belgian Beer Cafe
http://www.belgianbeercafe.com/
                                  37
Mystery project
• Launch with 200+ microsites
• Grow up to 800+ microsites
• Lots of shared content (± 30 pages/microsite)
• Authors & editors per microsite, top-level
 moderators

• Custom entity
• Whitelabling
                                                  38
@stijndm
freelance Drupal dev




                       39
Feedback & follow-up:
http://drupalcampgent.be/feedback

Mais conteúdo relacionado

Destaque

Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
EqualValue
 
New Technologies, Challenges and Opportunities for Traditional Public Librari...
New Technologies, Challenges and Opportunities for Traditional Public Librari...New Technologies, Challenges and Opportunities for Traditional Public Librari...
New Technologies, Challenges and Opportunities for Traditional Public Librari...
Esin Sultan Oguz
 
The Public Library Catalogue as a Social Space: Usability Studies of User Int...
The Public Library Catalogue as a Social Space: Usability Studies of User Int...The Public Library Catalogue as a Social Space: Usability Studies of User Int...
The Public Library Catalogue as a Social Space: Usability Studies of User Int...
Laurel Tarulli
 
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
Glob@l Libraries - Bulgaria Program
 
Utilizing Library Space For Learning Opportunities
Utilizing Library Space For Learning OpportunitiesUtilizing Library Space For Learning Opportunities
Utilizing Library Space For Learning Opportunities
Kathryn Crowe
 

Destaque (20)

Digital Initiatives at the State Library of NC (NCLA Conference 2009)
Digital Initiatives at the State Library of NC (NCLA Conference 2009)Digital Initiatives at the State Library of NC (NCLA Conference 2009)
Digital Initiatives at the State Library of NC (NCLA Conference 2009)
 
Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
Creating a Comprehensive Library Service - Getting the Equality Duty Right (S...
 
New Technologies, Challenges and Opportunities for Traditional Public Librari...
New Technologies, Challenges and Opportunities for Traditional Public Librari...New Technologies, Challenges and Opportunities for Traditional Public Librari...
New Technologies, Challenges and Opportunities for Traditional Public Librari...
 
Spaces and places - transforming the public library
Spaces and places - transforming the public librarySpaces and places - transforming the public library
Spaces and places - transforming the public library
 
The New Design Workflow
The New Design WorkflowThe New Design Workflow
The New Design Workflow
 
From Gov Docs to Fun Docs: Using Government Information to Enhance your Libra...
From Gov Docs to Fun Docs: Using Government Information to Enhance your Libra...From Gov Docs to Fun Docs: Using Government Information to Enhance your Libra...
From Gov Docs to Fun Docs: Using Government Information to Enhance your Libra...
 
Redhat.com: An Architectural Case Study
Redhat.com: An Architectural Case StudyRedhat.com: An Architectural Case Study
Redhat.com: An Architectural Case Study
 
The Public Library Catalogue as a Social Space: Usability Studies of User Int...
The Public Library Catalogue as a Social Space: Usability Studies of User Int...The Public Library Catalogue as a Social Space: Usability Studies of User Int...
The Public Library Catalogue as a Social Space: Usability Studies of User Int...
 
Making Sense of the Future
Making Sense of the FutureMaking Sense of the Future
Making Sense of the Future
 
Valuing Staff as Stakeholders in Recreating Library Space
Valuing Staff as Stakeholders in Recreating Library SpaceValuing Staff as Stakeholders in Recreating Library Space
Valuing Staff as Stakeholders in Recreating Library Space
 
Creating Library Spaces of the Future
Creating Library Spaces of the FutureCreating Library Spaces of the Future
Creating Library Spaces of the Future
 
Design My Library Space
Design My Library SpaceDesign My Library Space
Design My Library Space
 
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
Mihaela Andonova, Librarian at Svetlina 1896 Public Chitalishte in the villag...
 
Utilizing Library Space For Learning Opportunities
Utilizing Library Space For Learning OpportunitiesUtilizing Library Space For Learning Opportunities
Utilizing Library Space For Learning Opportunities
 
Public library in democracy
Public library in democracyPublic library in democracy
Public library in democracy
 
IL13 - Design My Library Space Workshop
IL13 - Design My Library Space WorkshopIL13 - Design My Library Space Workshop
IL13 - Design My Library Space Workshop
 
A Career in Libraries
A Career in LibrariesA Career in Libraries
A Career in Libraries
 
Teen Spaces @ your library
Teen Spaces @ your libraryTeen Spaces @ your library
Teen Spaces @ your library
 
How to step out of the Library Bubble using Social Media
How to step out of the Library Bubble using Social MediaHow to step out of the Library Bubble using Social Media
How to step out of the Library Bubble using Social Media
 
A community, not a library: Design patterns for government services
A community, not a library: Design patterns for government servicesA community, not a library: Design patterns for government services
A community, not a library: Design patterns for government services
 

Semelhante a Using spaces (Drupal)

One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Caceres
hernanibf
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
hernanibf
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
Chris Tankersley
 

Semelhante a Using spaces (Drupal) (20)

London Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in ProductionLondon Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in Production
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Caceres
 
LISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground RunningLISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground Running
 
On the Edge Systems Administration with Golang
On the Edge Systems Administration with GolangOn the Edge Systems Administration with Golang
On the Edge Systems Administration with Golang
 
Cloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made onCloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made on
 
Kubernetes meetup - 2018-05-23
Kubernetes meetup - 2018-05-23Kubernetes meetup - 2018-05-23
Kubernetes meetup - 2018-05-23
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)
 
WSO2Con ASIA 2016: Revolutionizing WSO2 App Cloud with Kubernetes & Docker
WSO2Con ASIA 2016: Revolutionizing WSO2 App Cloud with Kubernetes & DockerWSO2Con ASIA 2016: Revolutionizing WSO2 App Cloud with Kubernetes & Docker
WSO2Con ASIA 2016: Revolutionizing WSO2 App Cloud with Kubernetes & Docker
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native PragueKubernetes + Python = ❤ - Cloud Native Prague
Kubernetes + Python = ❤ - Cloud Native Prague
 
Troubleshooting Hadoop: Distributed Debugging
Troubleshooting Hadoop: Distributed DebuggingTroubleshooting Hadoop: Distributed Debugging
Troubleshooting Hadoop: Distributed Debugging
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Using spaces (Drupal)

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. Menu settings for the backend\n
  20. \n
  21. \n
  22. \n
  23. \n
  24. Space overrules preset, overrules site\n
  25. Add your own stack, ie: let the user have some control over settings\n
  26. Whenever a space is active, these controllers come in to action and save the settings for that sapce\nEven in the backend. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. The space settings form (as seen in Open Atrium)\n
  32. \n
  33. It all started with Development Seed and their personal intranet, which led to Open Atrium\nDrupal 6\n
  34. Drupal 7\nSpaces + taxonomy\nTweaks to allow same page in multiple spaces\nBuilt to last a couple of years\nNow with a custom path prefix city + year\nUsed to be domain + prefix\nEach city has it’s own mini site, whenever they are ready with the content they can enable the feature for that mini site\n
  35. Left: Nagoya, beer menu is published, different blocks (same context), different sponsors (same feature)\nRight: Tokyo, beers are currently unknown, feature is disabled\n
  36. Drupal 6\nSpaces + Organic groups\n
  37. Each cafe is a different space \nCafe owner can manage cafe profile + beers, menu\nAdd staff to the cafe > linked to schooling platform\n
  38. Drupal 7\nCustom entity with 2 types -> profile acts as preset, microsite acts as space\nCustom menu controller\nTheme selection\n
  39. \n
  40. \n