SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Beyond the Intranet
  A new way to look at Open Atrium




   Antonio De Marco       Andrea Pescetti
     antonio@nuvole.org    andrea@nuvole.org
“   Open Atrium is an intranet in a box that has group
    spaces to allow different teams to have their own
    conversations. It comes with six features - a blog,
    a wiki, a calendar, a to do list, a shoutbox, and a
    dashboard to manage it all.

                                 Development Seed
Part intranet, part do-it-yourself project
with a kick of open source hotness
Part intranet, part do-it-yourself project
with a kick of open source hotness
for all tastes: the easygoing and the picky
Possibilities
Open Atrium out of the box.
Open Atrium as a public website.
Open Atrium as a fully customized private group.
Open Atrium as a social network.
Open Atrium as a file manager.
Open Atrium as you like it.
Technologies
Features
 A feature is a collection of Drupal entities
(views, contexts, fields, etc...) which taken
    together satisfy a certain use-case.

         http://drupal.org/project/features
Spaces
A way to make one Drupal site act
        like several sites.

     http://drupal.org/project/spaces
PURL


            Persistent URL
A helper for other modules interested in using
   elements of the page request to sustain
         information between pages.

            http://drupal.org/project/purl
OG


      Organic Groups
Enable users to create and manage
        their own groups.

       http://drupal.org/project/og
Recipes
How to
Add custom user profile fields
core = "6.x"
dependencies[] = "features"
dependencies[] = "text"
description = "Custom profile feature."
features[content][] = "profile-field_profile_city"
features[content][] = "profile-field_profile_country"
name = "Custom Profile"
package = "Features"
project = "custom_profile"
version = "6.x-1.0"




           custom_profile.info
How to
Override Atrium's core configuration
core = "6.x"
dependencies[] = "book"
dependencies[] = "codefilter"
...

description = "Atrium sitewide settings and configuration."
...
features[variable][] = "upload_uploadsize_default"
features[variable][] = "upload_usersize_default"
features[variable][] = "user_picture_default"
...
name = "Atrium"
package = "Atrium"



                       atrium.info
<?php
/**
* Implementation of hook_strongarm_alter()
*/
function custom_profile_strongarm_alter(&$items) {
  if (isset($items['user_picture_default'])) {
    $items['user_picture_default']->value = 'sites/.../user.png';
  }
}
?>




              hook_strongarm_alter()
Feature's component alter hooks
“   Hooks to modify components defined by other
    features. These come in the form
    hook_COMPONENT_alter where COMPONENT is
    the default_hook declared by any of
    components within features.

    CTools also has a variety of hook_FOO_alters.

                                features.api.php
How to
Alter contexts at run-time
/**
* Implementation of hook_context_load_alter().
*/
function spaces_context_load_alter(&$context) {
  $space = spaces_get_space();
  if ($space) {
    foreach (array_keys(context_reactions()) as $plugin) {
      $override = $space->controllers
                        ->context
                        ->get("{$context->name}:reaction:{$plugin}");
      if (!is_null($override)) {
        $context->reactions[$plugin] = $override;
      }
    }
  }
}
How to
Remove the Welcome video block
<?php
/**
* Implementation of hook_spaces_presets_alter()
*/
function custom_group_spaces_presets_alter(&$items) {
 
   // Store a reference to our target block section.
  $blocks = &$items['atrium_groups_private']->value['context']
['spaces_dashboard-custom-1:reaction:block']['blocks'];
 
  // Remove "Welcome" block.
  unset($blocks['atrium-welcome_member']);
 
   // Add "Latest discussions" block.
  $blocks['views-blog_listing-block_1'] = array(
    'module' => 'views',
    'delta' => 'blog_listing-block_2',
    'region' => 'content',
    'weight' => 1,
  );
}
?>
           hook_spaces_presets_alter()
Overridden...

$ drush features
Name                   Feature                Status    State       
Atrium                 atrium                 Enabled   Overridden  
Atrium Blog            atrium_blog            Enabled     
Atrium Notebook        atrium_book            Enabled               
Atrium Calendar        atrium_calendar        Enabled               
Atrium Case Tracker    atrium_casetracker     Enabled               
Atrium Groups          atrium_groups          Enabled   Overridden  
Atrium Members         atrium_members         Enabled    
Atrium Profile         atrium_profile         Enabled  




                ...but Upgrade-safe
How to
Create custom group types
core = "6.x"
dependencies[] = "atrium_news"
dependencies[] = "atrium_pages"
dependencies[] = "context"
dependencies[] = "menu"
dependencies[] = "spaces"
features[context][] = "layout_portal"
features[ctools][] = "context:context:3"
features[ctools][] = "spaces:spaces:3"
features[menu_custom][] = "menu-portal"
features[menu_links][] = "menu-portal:calendar"
features[menu_links][] = "menu-portal:dashboard"
features[spaces_presets][] = "atrium_portal"
name = "atrium_portal"
package = "Features"




           atrium_portal.info
Custom feature set
/**
* Implementation of hook_spaces_presets().
*/
function atrium_portal_spaces_presets() {

...
'spaces_features' => array(
  'atrium_blog' => '0',
  'atrium_book' => '0',
  'atrium_calendar' => '1',
  'atrium_casetracker' => '0',
  'atrium_members' => '0',
  'atrium_news' => '1',
  'atrium_pages' => '1',
  'atrium_shoutbox' => '0',
  'spaces_dashboard' => '1',
),
...




atrium_portal.spaces.inc
Custom dashboard context
/**
* Implementation of hook_spaces_presets().
*/
function atrium_portal_spaces_presets() {

...

'context' => array(
  'spaces_dashboard-custom-1:reaction:block' => array(
    'blocks' => array(
      'views-atrium_news-block_3' => array(
        'module' => 'views',
        'delta' => 'atrium_news-block_3',
        'region' => 'content',
        'weight' => 0,
      ),
      'views-calendar_listing-block_1' => array(
        'module' => 'views',
        'delta' => 'calendar_listing-block_1',
        'region' => 'right',
        'weight' => 0,
      ),
    ),
  ),
      atrium_portal.spaces.inc
Thank You.
  http://nuvole.org

Weitere ähnliche Inhalte

Ähnlich wie New ways to customize Open Atrium

Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Atenea tech
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupalDay
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentNuvole
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Amazon Web Services
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
Using Drupal Features in B-Translator
Using Drupal Features in B-TranslatorUsing Drupal Features in B-Translator
Using Drupal Features in B-TranslatorDashamir Hoxha
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build themDick Olsson
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocialThomas Roger
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-finalDavid Lapsley
 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Dhinakaran Mani
 
20140821 delapsley-cloudopen-public
20140821 delapsley-cloudopen-public20140821 delapsley-cloudopen-public
20140821 delapsley-cloudopen-publicDavid Lapsley
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your CodeDrupalDay
 

Ähnlich wie New ways to customize Open Atrium (20)

Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017
 
Drupal 8 Hooks
Drupal 8 HooksDrupal 8 Hooks
Drupal 8 Hooks
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Using Drupal Features in B-Translator
Using Drupal Features in B-TranslatorUsing Drupal Features in B-Translator
Using Drupal Features in B-Translator
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocial
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7
 
20140821 delapsley-cloudopen-public
20140821 delapsley-cloudopen-public20140821 delapsley-cloudopen-public
20140821 delapsley-cloudopen-public
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 

Mehr von Nuvole

The OpenEuropa Initiative
The OpenEuropa InitiativeThe OpenEuropa Initiative
The OpenEuropa InitiativeNuvole
 
CMI 2.0 session at Drupal DevDays in Cluj-Napoca
CMI 2.0 session at Drupal DevDays in Cluj-NapocaCMI 2.0 session at Drupal DevDays in Cluj-Napoca
CMI 2.0 session at Drupal DevDays in Cluj-NapocaNuvole
 
Advanced Configuration Management with Config Split et al.
Advanced Configuration Management with Config Split et al.Advanced Configuration Management with Config Split et al.
Advanced Configuration Management with Config Split et al.Nuvole
 
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...Introducing the UI Patterns module: use atomic UI components everywhere in Dr...
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...Nuvole
 
Drupal 8 Configuration Management with Features
Drupal 8 Configuration Management with FeaturesDrupal 8 Configuration Management with Features
Drupal 8 Configuration Management with FeaturesNuvole
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Nuvole
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Nuvole
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondNuvole
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Remote Collaboration and Institutional Intranets with Drupal and Open Atrium
Remote Collaboration and Institutional Intranets with Drupal and Open AtriumRemote Collaboration and Institutional Intranets with Drupal and Open Atrium
Remote Collaboration and Institutional Intranets with Drupal and Open AtriumNuvole
 
Public Works Monitoring
Public Works MonitoringPublic Works Monitoring
Public Works MonitoringNuvole
 
Code driven development: using Features effectively in Drupal 6 and 7
Code driven development: using Features effectively in Drupal 6 and 7Code driven development: using Features effectively in Drupal 6 and 7
Code driven development: using Features effectively in Drupal 6 and 7Nuvole
 
Features based development workflow
Features based development workflowFeatures based development workflow
Features based development workflowNuvole
 

Mehr von Nuvole (13)

The OpenEuropa Initiative
The OpenEuropa InitiativeThe OpenEuropa Initiative
The OpenEuropa Initiative
 
CMI 2.0 session at Drupal DevDays in Cluj-Napoca
CMI 2.0 session at Drupal DevDays in Cluj-NapocaCMI 2.0 session at Drupal DevDays in Cluj-Napoca
CMI 2.0 session at Drupal DevDays in Cluj-Napoca
 
Advanced Configuration Management with Config Split et al.
Advanced Configuration Management with Config Split et al.Advanced Configuration Management with Config Split et al.
Advanced Configuration Management with Config Split et al.
 
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...Introducing the UI Patterns module: use atomic UI components everywhere in Dr...
Introducing the UI Patterns module: use atomic UI components everywhere in Dr...
 
Drupal 8 Configuration Management with Features
Drupal 8 Configuration Management with FeaturesDrupal 8 Configuration Management with Features
Drupal 8 Configuration Management with Features
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Remote Collaboration and Institutional Intranets with Drupal and Open Atrium
Remote Collaboration and Institutional Intranets with Drupal and Open AtriumRemote Collaboration and Institutional Intranets with Drupal and Open Atrium
Remote Collaboration and Institutional Intranets with Drupal and Open Atrium
 
Public Works Monitoring
Public Works MonitoringPublic Works Monitoring
Public Works Monitoring
 
Code driven development: using Features effectively in Drupal 6 and 7
Code driven development: using Features effectively in Drupal 6 and 7Code driven development: using Features effectively in Drupal 6 and 7
Code driven development: using Features effectively in Drupal 6 and 7
 
Features based development workflow
Features based development workflowFeatures based development workflow
Features based development workflow
 

New ways to customize Open Atrium

  • 1. Beyond the Intranet A new way to look at Open Atrium Antonio De Marco Andrea Pescetti antonio@nuvole.org andrea@nuvole.org
  • 2. Open Atrium is an intranet in a box that has group spaces to allow different teams to have their own conversations. It comes with six features - a blog, a wiki, a calendar, a to do list, a shoutbox, and a dashboard to manage it all. Development Seed
  • 3. Part intranet, part do-it-yourself project with a kick of open source hotness
  • 4. Part intranet, part do-it-yourself project with a kick of open source hotness for all tastes: the easygoing and the picky
  • 6. Open Atrium out of the box.
  • 7. Open Atrium as a public website.
  • 8. Open Atrium as a fully customized private group.
  • 9. Open Atrium as a social network.
  • 10. Open Atrium as a file manager.
  • 11. Open Atrium as you like it.
  • 13. Features A feature is a collection of Drupal entities (views, contexts, fields, etc...) which taken together satisfy a certain use-case. http://drupal.org/project/features
  • 14. Spaces A way to make one Drupal site act like several sites. http://drupal.org/project/spaces
  • 15. PURL Persistent URL A helper for other modules interested in using elements of the page request to sustain information between pages. http://drupal.org/project/purl
  • 16. OG Organic Groups Enable users to create and manage their own groups. http://drupal.org/project/og
  • 18. How to Add custom user profile fields
  • 19. core = "6.x" dependencies[] = "features" dependencies[] = "text" description = "Custom profile feature." features[content][] = "profile-field_profile_city" features[content][] = "profile-field_profile_country" name = "Custom Profile" package = "Features" project = "custom_profile" version = "6.x-1.0" custom_profile.info
  • 20. How to Override Atrium's core configuration
  • 21. core = "6.x" dependencies[] = "book" dependencies[] = "codefilter" ... description = "Atrium sitewide settings and configuration." ... features[variable][] = "upload_uploadsize_default" features[variable][] = "upload_usersize_default" features[variable][] = "user_picture_default" ... name = "Atrium" package = "Atrium" atrium.info
  • 22. <?php /** * Implementation of hook_strongarm_alter() */ function custom_profile_strongarm_alter(&$items) {   if (isset($items['user_picture_default'])) {     $items['user_picture_default']->value = 'sites/.../user.png';   } } ?> hook_strongarm_alter()
  • 24. Hooks to modify components defined by other features. These come in the form hook_COMPONENT_alter where COMPONENT is the default_hook declared by any of components within features. CTools also has a variety of hook_FOO_alters. features.api.php
  • 25. How to Alter contexts at run-time
  • 26. /** * Implementation of hook_context_load_alter(). */ function spaces_context_load_alter(&$context) {   $space = spaces_get_space();   if ($space) {     foreach (array_keys(context_reactions()) as $plugin) {       $override = $space->controllers ->context ->get("{$context->name}:reaction:{$plugin}");       if (!is_null($override)) {         $context->reactions[$plugin] = $override;       }     }   } }
  • 27. How to Remove the Welcome video block
  • 28.
  • 29. <?php /** * Implementation of hook_spaces_presets_alter() */ function custom_group_spaces_presets_alter(&$items) {   // Store a reference to our target block section.   $blocks = &$items['atrium_groups_private']->value['context'] ['spaces_dashboard-custom-1:reaction:block']['blocks'];     // Remove "Welcome" block.   unset($blocks['atrium-welcome_member']);   // Add "Latest discussions" block.   $blocks['views-blog_listing-block_1'] = array(     'module' => 'views',     'delta' => 'blog_listing-block_2',     'region' => 'content',     'weight' => 1,   ); } ?> hook_spaces_presets_alter()
  • 30. Overridden... $ drush features Name                 Feature              Status    State        Atrium               atrium               Enabled   Overridden   Atrium Blog          atrium_blog          Enabled      Atrium Notebook      atrium_book          Enabled                Atrium Calendar      atrium_calendar      Enabled                Atrium Case Tracker  atrium_casetracker   Enabled                Atrium Groups        atrium_groups        Enabled   Overridden   Atrium Members       atrium_members       Enabled     Atrium Profile       atrium_profile       Enabled   ...but Upgrade-safe
  • 31. How to Create custom group types
  • 32. core = "6.x" dependencies[] = "atrium_news" dependencies[] = "atrium_pages" dependencies[] = "context" dependencies[] = "menu" dependencies[] = "spaces" features[context][] = "layout_portal" features[ctools][] = "context:context:3" features[ctools][] = "spaces:spaces:3" features[menu_custom][] = "menu-portal" features[menu_links][] = "menu-portal:calendar" features[menu_links][] = "menu-portal:dashboard" features[spaces_presets][] = "atrium_portal" name = "atrium_portal" package = "Features" atrium_portal.info
  • 34. /** * Implementation of hook_spaces_presets(). */ function atrium_portal_spaces_presets() { ... 'spaces_features' => array(   'atrium_blog' => '0',   'atrium_book' => '0',   'atrium_calendar' => '1',   'atrium_casetracker' => '0',   'atrium_members' => '0',   'atrium_news' => '1',   'atrium_pages' => '1',   'atrium_shoutbox' => '0',   'spaces_dashboard' => '1', ), ... atrium_portal.spaces.inc
  • 36. /** * Implementation of hook_spaces_presets(). */ function atrium_portal_spaces_presets() { ... 'context' => array(   'spaces_dashboard-custom-1:reaction:block' => array(     'blocks' => array(       'views-atrium_news-block_3' => array(         'module' => 'views',         'delta' => 'atrium_news-block_3',         'region' => 'content',         'weight' => 0,       ),       'views-calendar_listing-block_1' => array(         'module' => 'views',         'delta' => 'calendar_listing-block_1',         'region' => 'right',         'weight' => 0,       ),     ),   ), atrium_portal.spaces.inc
  • 37. Thank You. http://nuvole.org