Extending and Customizing Open Atrium

  • 8,851 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
8,851
On Slideshare
0
From Embeds
0
Number of Embeds
6

Actions

Shares
Downloads
124
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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 projectwith a kick of open source hotness
  • 4. Part intranet, part do-it-yourself projectwith a kick of open source hotnessfor all tastes: the easygoing and the picky
  • 5. Possibilities
  • 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.
  • 12. Technologies
  • 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. SpacesA way to make one Drupal site act like several sites. http://drupal.org/project/spaces
  • 15. PURL Persistent URLA 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 GroupsEnable users to create and manage their own groups. http://drupal.org/project/og
  • 17. Recipes
  • 18. How toAdd 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 toOverride Atriums 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()
  • 23. Features component alter hooks
  • 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 toAlter 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 toRemove the Welcome video block
  • 28. <?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()
  • 29. Overridden...$ drush featuresName                 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
  • 30. How toCreate custom group types
  • 31. 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
  • 32. Custom feature set
  • 33. /*** 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
  • 34. Custom dashboard context
  • 35. /*** 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
  • 36. Thank You. http://nuvole.org