Hacking Open Atrium: adding Features within the Contexts of your Spaces

Steve Mokris

2011.12.03

Background

Game Research and Immersive Design (GRID) Lab
http://gridlab.ohio.edu/

Background (Continued)

Drupal @ the GRID Lab

Background (Continued)

Drupal @ the GRID Lab

Background (Continued)

Kosada, Inc.
http://kosada.com/

Background (Continued)

TWiki @ Kosada

Background (Continued)

Drupal @ Kosada

Prerequisites

features.module

Capital-F Features

Feature Example

http://drupal.org/project/debut
(a set of Features for Drupal 7.x)

Feature Example 2

http://kineme.net/

Other Features

http://drupal.org/project/features

Features: Other contributed modules

Features: Kit

http://drupal.org/project/kit

Site-Specific Features

Features can get fairly personal,
might not make sense to post on drupal.org

Capital-C Contexts

context.module

Drupal Core's "Page specific visibility settings" for Blocks

Context example

hypothetical site with
static content (node.module),
news (blog.module, comment.module),
and a user community (forum.module, poll.module).

Block requirements:

Context example (Page 1 of 3)

therefore:

Context example (Page 2 of 3)

therefore:

Context example (Page 3 of 3)

therefore:

spaces.module

How Open Atrium Does It

Built-in Open Atrium Features

(each can be toggled per Group)

Third-party Open Atrium Features

http://community.openatrium.com/node/441

Making a New OA Feature (1 of 3)

Making a New OA Feature (2 of 3)

#features-menu li a.icon-myfeature span.icon {
  background:url(myfeature.png) no-repeat;
}
.feature .feature-myfeature {
  background:transparent url(myfeature.png) no-repeat;
}
.feature-myfeature {
  background:url(myfeature.png) no-repeat !important;
}

Making a New OA Feature (3 of 3)

/**
 * Implementation of hook_init().
 */
function myfeature_init() {
  drupal_add_css(drupal_get_path('module', 'myfeature')
    .'/myfeature.css');
}

The Jobs Board

GRID Lab Callboard

The Jobs Board

[insert demo here]

Some Other Open Atrium Features

End