Grayside.Org

Home

spaces

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.

  • access control
  • cck
  • openatrium
  • spaces
  • Add new comment
  • Read more

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:

  1. I have the FeatureServer feature.
  2. I want it in OpenAtrium.
  3. Here’s a new Feature that provides some Contexts and some Groups variables.
  4. Here’s a patch that you must apply to FeatureServer to make Spaces aware of it. (And other stuff).
  • features
  • openatrium
  • spaces
  • Add new comment
  • Read more

Optional Spaces Integration for a View

grayside — Tue, 06/15/2010 - 13:05

If you want to make an exported [node-based] View smoothly integrate with Spaces, you can use the following code to modify the View structure with the “Content in current space” filter. This filter does nothing if the View is not itself in a Space, otherwise it restricts all results to content in the same space. Add any conditions you want to control whether the Spaces integration is applied.

  • drupal
  • spaces
  • views
  • 2 comments
  • Read more

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

Attachment: 
application/octet-stream icon
spaces_private_content.tar_.gz
  • og
  • openatrium
  • permissions
  • spaces
  • Add new comment
  • Read more

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:

  • boxes
  • dashboard
  • openatrium
  • spaces
  • Add new comment
  • Read more
Syndicate content

Monthly archive

  • July 2010 (2)
  • June 2010 (6)
  • May 2010 (9)
  • April 2010 (5)
  • March 2010 (6)
more

Feeds

  • Syndicate contentHeadlines
  • Syndicate contentDrupal Planet
  • Syndicate contentAtrium Headlines

casetracker cck drupal features FL3 freelinking module og openatrium permissions plugin spaces
<all>

© 2009 grayside.org ♠ Glossary ♠ Powered by Drupal ♠ Floating on Archlinux