openatrium
Spaces Integrating a CCK Field
grayside — Mon, 07/26/2010 - 12:25
I wanted to make a CCK Field available only when a given feature was enabled. It turns out it’s really easy.
CCK comes with a hook_field_access() hook (see content_access()). Any implementation of this function that returns FALSE for a given field results in that field being denied to the user.
By implementing this function with a Spaces API call instead of the content_permissions module approach of a new, field-specific permission, all kinds of magic becomes possible.
Read on for demonstration code.
Integrating Some Other Feature with Spaces
grayside — Fri, 07/23/2010 - 08:10
I have found more than once a situation in which I had a basic feature that could be used on any site which I would like to see integrated with Spaces (for OpenAtrium magic). It usually runs like this:
- I have the FeatureServer feature.
- I want it in OpenAtrium.
- Here’s a new Feature that provides some Contexts and some Groups variables.
- Here’s a patch that you must apply to FeatureServer to make Spaces aware of it. (And other stuff).
Integrating the Features Server into OpenAtrium
grayside — Thu, 06/03/2010 - 08:32
Working on integrating the Features Server feature into OpenAtrium. My intention is to set it up as another Casetracker Project type.
OpenAtrium provides a solid case tracker and documentation system, and is a natural fit for the infrastructure of a Drupal.Org-style project ecosphere. Integrating them will allow me to post Features I’ve created to a place where I might actually have a means to get feedback on my work, let alone provide support.
OpenAtrium Group Manager as Content Administrator
grayside — Wed, 05/05/2010 - 23:38
In Drupal, it only takes a couple hours (or perhaps a couple days) to build the concept of a site-wide content manager into your system. It gets mighty tricky to start parceling out administrative tasks for parts of the site.
With Organic Groups (the module behind OpenAtrium’s groups), the solution to this problem has always been messy. But with the advent of Spaces and Group Administrator configuration, it seems like OA and related sites are within shouting distance of giving Group Managers the power of Content Administration.
Single Group Login Redirect
grayside — Wed, 04/28/2010 - 13:39
Community.OA had a request for functionality that would redirect a user with a single group membership to that group’s homepage.
I packaged that functionality up as a Feature, so you can use it too. The oa_ prefix refers to the support for spaces_og/purl to generate a group URL.
Changing Node Group Audience
grayside — Mon, 04/12/2010 - 10:33
In OpenAtrium, it’s not easy to change the group affiliation of a node once it has been created. OA locks down the interface to set group audience specifically to make the interface easier to understand.
I have just posted a quick feature that demonstrates how to grant administrators the ability to shuffle nodes around between groups, it can be found in the issue queue at community.OA.
Spaces Private Content
grayside — Wed, 03/31/2010 - 08:35
I am using Spaces with OpenAtrium in several Intranet-like scenarios. However, my repeated pattern is a group with a public face, public listings, some public news and documentation, and then a bunch of private stuff that should only be exposed to members. Unfortunately, spaces_og, the Spaces sub-module that provides group integration, completely overwhelms any fine-grained option to control individual node privacy settings
Simple Spaces Recipe for a Static Welcome Widget
grayside — Sun, 03/07/2010 - 00:33
One of the little conundrums in OpenAtrium (and I imagine in Spaces) is building static content for the space. (Or in OpenAtrium terms, getting a nice dashboard box to stay put, yet be customizable by group.)
There are countless ways of doing this, but I opted to create a CCK Textarea field in my group content type (named field_group_welcome_message) and turn on the PHP filter.
Then I created a Box (which is what OpenAtrium uses, could just as well have been a block) using the following snippet:
Moving OpenAtrium Node Form Elements to the Right Column
grayside — Sat, 03/06/2010 - 12:01
Previously, I discussed how you could move CCK fields into the node form sidebar by careful fieldgroup naming.
If you are of a programmer’s bent, you might instead try the more flexible programmer’s solution—preprocessor function. I dug this out of the atrium_blog feature.
OpenAtrium Empty Views: Gimme That Button!
grayside — Sat, 03/06/2010 - 09:28
Do you like the large gray “Add Blog entry” button when you first visit your blog space, and have yet to create anything? Creating views with similar buttons (or adding more) is really easy!
The key is to create Empty text in your view using the Full HTML Input Format. Then, drop some HTML in like this to make use of Atrium’s built-in theming.
<div class="buttons">
<ul class="links">
<li class="first last">
<a href="/node/add/blog">Add Blog entry</a>
</li>
</ul>
</div>