Grayside.Org - openatrium http://grayside.org/taxonomy/term/30/0 en Adding a Content Type to the Open Atrium Calendar Views http://grayside.org/2010/09/adding-content-type-open-atrium-calendar-views <p>People often seem to wonder how they can get their new date-specified content types to show up on the Atrium Calendar. The following Views snippet makes it happen for a content type called &#8220;example_type&#8221; in module &#8220;custom&#8221;. Note that this code is specific to the Views as they were renamed for <a href="http://drupal.org/project/kit">Kit</a>-compatibility in Open Atrium&nbsp;1.0-beta8.</p> <p><div class="codeblock"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/**<br /> * Implementation of hook_views_default_views_alter().<br /> */<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">custom_views_default_views_alter</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">$views</span><span style="color: #007700">) {<br />&nbsp; </span><span style="color: #0000BB">$views</span><span style="color: #007700">[</span><span style="color: #DD0000">'calendar_listing'</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">display</span><span style="color: #007700">[</span><span style="color: #DD0000">'default'</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">display_options</span><span style="color: #007700">[</span><span style="color: #DD0000">'filters'</span><span style="color: #007700">][</span><span style="color: #DD0000">'type'</span><span style="color: #007700">][</span><span style="color: #DD0000">'value'</span><span style="color: #007700">][</span><span style="color: #DD0000">'example_type'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'example_type'</span><span style="color: #007700">;<br />&nbsp; </span><span style="color: #0000BB">$views</span><span style="color: #007700">[</span><span style="color: #DD0000">'calendar_upcoming'</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">display</span><span style="color: #007700">[</span><span style="color: #DD0000">'default'</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">display_options</span><span style="color: #007700">[</span><span style="color: #DD0000">'filters'</span><span style="color: #007700">][</span><span style="color: #DD0000">'type'</span><span style="color: #007700">][</span><span style="color: #DD0000">'value'</span><span style="color: #007700">][</span><span style="color: #DD0000">'example_type'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'example_type'</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div></p> <h2>Why Not Override the View with Views&nbsp;<span class="caps">UI</span>?</h2> <p>Once you have overridden the core Views in Atrium, you take a potentially stressful upgrade/maintenance path and make it vaguely nightmarish. Your changes will disappear into the ether when you upgrade. Restoring your changes would require building out a site based on a backup database to grab the key pieces of your&nbsp;override.</p> <p>By keeping these changes in code, you can much more easily determine how to fix them&#8230; assuming any changes are even&nbsp;necessary!</p> <p>Happy calendar&nbsp;hooking.</p> <p><a href="http://grayside.org/2010/09/adding-content-type-open-atrium-calendar-views" target="_blank">read more</a></p> http://grayside.org/2010/09/adding-content-type-open-atrium-calendar-views#comments calendar openatrium views Wed, 08 Sep 2010 23:04:50 +0000 grayside 89 at http://grayside.org Adding Items to the Open Atrium Settings Menu http://grayside.org/2010/08/adding-items-open-atrium-settings-menu <p>Recently I dusted off <a href="http://drupal.org/project/og_vocab"><span class="caps">OG</span> Vocabularies</a> with an eye toward integration with OpenAtrium. To my mild surprise, there was really not much that needed to be done. The menu path (node/%node/og/vocab) isn&#8217;t great, but that can be tackled&nbsp;later.</p> <p>All I wanted was to avoid another hidden tab that can only be reached by clicking on <strong>Settings &gt; Customize Features</strong>. I wanted the group vocabularies to be accessible directly in the Settings&nbsp;menu.</p> <p>It turns out it&#8217;s really simple. There is a&nbsp;hook.</p> <p><a href="http://grayside.org/2010/08/adding-items-open-atrium-settings-menu" target="_blank">read more</a></p> http://grayside.org/2010/08/adding-items-open-atrium-settings-menu#comments interface openatrium Tue, 24 Aug 2010 16:55:07 +0000 grayside 84 at http://grayside.org Spaces Integrating a CCK Field http://grayside.org/2010/07/spaces-integrating-cck-field <p>I wanted to make a <span class="caps">CCK</span> Field available only when a given feature was enabled. It turns out it&#8217;s really&nbsp;easy.</p> <p><span class="caps">CCK</span> comes with a <em>hook_field_access()</em> hook (see <a href="http://api.lullabot.com/content_access">content_access()</a>). Any implementation of this function that returns <span class="caps">FALSE</span> for a given field results in that field being denied to the&nbsp;user.</p> <p>By implementing this function with a <a href="http://drupal.org/project/spaces">Spaces</a> <span class="caps">API</span> call instead of the content_permissions module approach of a new, field-specific permission, all kinds of magic becomes&nbsp;possible.</p> <p>Read on for demonstration&nbsp;code.</p> <p><a href="http://grayside.org/2010/07/spaces-integrating-cck-field" target="_blank">read more</a></p> http://grayside.org/2010/07/spaces-integrating-cck-field#comments access control cck openatrium spaces Mon, 26 Jul 2010 20:25:09 +0000 grayside 86 at http://grayside.org Integrating Some Other Feature with Spaces http://grayside.org/2010/07/integrating-some-other-feature-spaces <p>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&nbsp;this:</p> <ol> <li>I have the FeatureServer&nbsp;feature.</li> <li>I want it in&nbsp;OpenAtrium.</li> <li>Here&#8217;s a new Feature that provides some Contexts and some Groups&nbsp;variables.</li> <li>Here&#8217;s a patch that you must apply to FeatureServer to make Spaces aware of it. (And other&nbsp;stuff).</li> </ol> <p><a href="http://grayside.org/2010/07/integrating-some-other-feature-spaces" target="_blank">read more</a></p> http://grayside.org/2010/07/integrating-some-other-feature-spaces#comments features openatrium spaces Fri, 23 Jul 2010 16:10:17 +0000 grayside 85 at http://grayside.org Integrating the Features Server into OpenAtrium http://grayside.org/2010/06/integrating-features-server-openatrium <p>Working on integrating the <a href="http://code.developmentseed.org/featureserver/node/163">Features Server</a> feature into <a href="http://openatrium.com">OpenAtrium</a>. My intention is to set it up as another Casetracker Project&nbsp;type.</p> <p>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&#8217;ve created to a place where I might actually have a means to get feedback on my work, let alone provide&nbsp;support.</p> <p><a href="http://grayside.org/2010/06/integrating-features-server-openatrium" target="_blank">read more</a></p> http://grayside.org/2010/06/integrating-features-server-openatrium#comments drupal features-servers openatrium Thu, 03 Jun 2010 16:32:53 +0000 grayside 77 at http://grayside.org OpenAtrium Group Manager as Content Administrator http://grayside.org/2010/05/openatrium-group-manager-content-administrator <p>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&nbsp;site.</p> <p>With Organic Groups (the module behind OpenAtrium&#8217;s groups), the solution to this problem has always been messy. But with the advent of Spaces and Group Administrator configuration, it seems like <span class="caps">OA</span> and related sites are within shouting distance of giving Group Managers the power of Content&nbsp;Administration.</p> <p><a href="http://grayside.org/2010/05/openatrium-group-manager-content-administrator" target="_blank">read more</a></p> http://grayside.org/2010/05/openatrium-group-manager-content-administrator#comments content manager drupal openatrium Thu, 06 May 2010 07:38:13 +0000 grayside 70 at http://grayside.org Single Group Login Redirect http://grayside.org/2010/04/single-group-login-redirect <p><a href="http://community.openatrium.com">Community.<span class="caps">OA</span></a> had a <a href="https://community.openatrium.com/issues/node/1805">request</a> for functionality that would redirect a user with a single group membership to that group&#8217;s&nbsp;homepage.</p> <p><a href="http://tinkercms.grayside.org/projects/oa-single-group-login-redirect">I packaged that functionality up as a Feature</a>, so you can use it too. The <em>oa_</em> prefix refers to the support for spaces_og/purl to generate a group&nbsp;<span class="caps">URL</span>.</p> http://grayside.org/2010/04/single-group-login-redirect#comments drupal6 login openatrium organic groups rules Wed, 28 Apr 2010 21:39:37 +0000 grayside 64 at http://grayside.org Changing Node Group Audience http://grayside.org/2010/04/changing-node-group-audience <p>In OpenAtrium, it&#8217;s not easy to change the group affiliation of a node once it has been created. <span class="caps">OA</span> locks down the interface to set group audience specifically to make the interface easier to&nbsp;understand.</p> <p>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 <a href="https://community.openatrium.com/issues/node/48#comment-3624">issue queue at community.<span class="caps">OA</span></a>.</p> <p><a href="http://grayside.org/2010/04/changing-node-group-audience" target="_blank">read more</a></p> http://grayside.org/2010/04/changing-node-group-audience#comments actions og openatrium vbo views Mon, 12 Apr 2010 18:33:31 +0000 grayside 62 at http://grayside.org Spaces Private Content http://grayside.org/spaces-private-content <blockquote><p> Replaced with a project on D.O: <a href="http://drupal.org/project/og_privacy"><span class="caps">OG</span>&nbsp;Privacy</a> </p></blockquote> http://grayside.org/spaces-private-content#comments og openatrium permissions spaces Wed, 31 Mar 2010 16:35:05 +0000 grayside 60 at http://grayside.org Simple Spaces Recipe for a Static Welcome Widget http://grayside.org/2010/03/simple-spaces-recipe-static-welcome-widget <p>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&nbsp;group.)</p> <p>There are countless ways of doing this, but I opted to create a <span class="caps">CCK</span> Textarea field in my group content type (named <em>field_group_welcome_message</em>) and turn on the <span class="caps">PHP</span>&nbsp;filter.</p> <p>Then I created a <a href="http://drupal.org/project/boxes">Box</a> (which is what OpenAtrium uses, could just as well have been a block) using the following&nbsp;snippet:</p> <p><a href="http://grayside.org/2010/03/simple-spaces-recipe-static-welcome-widget" target="_blank">read more</a></p> http://grayside.org/2010/03/simple-spaces-recipe-static-welcome-widget#comments boxes dashboard openatrium spaces Sun, 07 Mar 2010 08:33:50 +0000 grayside 58 at http://grayside.org