Another great Open Atrium contributors conversation! Lots of excellent questions at our May 3rd Open Atrium for Developers Demo that we wanted to share including:
- Modules from Commons;
- The event calendar; and
- Media module privacy.
Below is the webinar from our Vimeo Channel, along with the questions and answers transcribed. Thanks again to everyone who attended, and please watch the webinar below and commet with any additional questions you have. If you've missed any of our demos, you can click here to register for our next Open Atrium webinar on May 10th!
We also have a webinar about the different ways to use Open Atrium that is NOT developer focused, coming up on May 14th. Click here to register for this webinar.
Q. Will it be possible to use modules from the Commons distribution?
A. We get this question a fair amount - as does Commons. The short answer is maybe. (We know this is a horrible answer.)
In theory, both Open Atrium (OA) and Commons use the Organic Groups module and we're using the same 2.x branch. In addition, we share the Message API, Panels, and Panelizer modules. If a plugin for Commons is written appropriately and generically, it shouldn't have any problem coming from Commons over to OA.
We're using, for example, the standard field name for group references. So if you create a wiki page in a space, the reference field is the standard OG group ref field from Organic Groups. So in that sense, we are trying to keep things standard and keep things compatible.
What will be different though is let's say you have a wiki plugin from Commons and you want to use that plugin on OA. That Commons wiki won't know about sections since that is purely an OA concept. However, it's fairly straightforward to add that. (See the following question.)
So, it's maybe this extra step of making your Commons plugin "section aware" that you might need to do. In addition, it depends on what else the plugin does - Commons includes modules that are not currently in OA by default. However, this is Drupal, so there is nothing stopping you from bringing those modules over and going to town. Now that OA has been released in Alpha, we will continue to learn more about the practicality of what in Commons can be used in OA.
Certainly the OA components being used in Commons going the other way might work in theory. If you use the OA wiki It's going to add a section reference, which can just be left empty. We tried to design it so you don't need a section reference. If you just want to add something to a space directly, you should be able to do that.
Q. How would I go about adding sections to a Commons plugin?
A. If you go to the old OA community site (2.0 content will be moving to a new space soon), you can find a community plugin toolkit. This basically tells people how to write plugins for OA. Under "Basics" we have "Adding Support for Groups" and "Adding Support for Sections." To add support for sections, there are two ways you can do it. If you take the Commons wiki, there is probably a content type called something like "wiki page." You can go to that content type and you can either manually add the OA Section ref field or you can do that via the Organic Groups field settings UI. If you go to the configuration page for Organic Group fields, there is this place where you can select your "bundle," which is your content type. In this case we are adding a section to our content page, content type and then the OA Sections will appear in the fields settings that you can add. So adding this will make a specific content type "section aware" and now when you create a wiki within a section, it will be private to that section and obey access control rules and so forth.
Q. Can you use OA and Commons at the same time?
A. Unfortunately, no. They are both install profiles and ways to get started with Drupal. So this will require you to pick one or the other at the start. Once OA is out there as actual modules that you can install and not just a profile, that's when you're going to start trying whether or not you can use OA modules in Commons and vice versa.
We do work with the team at Commons, and have a huge respect for the product and the team. OA & Commons have different focuses. OA has a more project collaboration approach and Commons is taking a more public/social media approach to things. However, having both distributions out there is beneficial - especially since we are using a lot of the same modules. We're going to be able to push a lot of activity on these modules, which will be great for everyone.
Q. What about the calendar feature?
A. The calendar is coming! Phase2 is currently working on the event calendar plugin as we speak. If we're lucky we might be able to show it at next week's demo because it's getting close.
As we've mentioned before, OA2 isn't going to have the functionality out of the box that OA1 had. We are relying on the community to provide plugins, but we are also working on our own plugins. For example, we don't have case tracker or issue tracker right now. We are letting the community right now - which you can find a version of on the OA project page done by David Snopek. Feel free to go in and start testing that and helping David get that module into working order for OA2
Q. How does the space/group/team access control apply to the media module library or does it?
A. Yes, it does. This is something we worked very hard on in OA2 and added for you. First was just getting the media module patched so it can handle private content and work with the private file system in Drupal, which we've already taken care of.
In addition, the media module is using file entities, which is just another entity in Drupal for encapsulating files like images. The Drupal access control system is for nodes, not entities. So the file entity module has it's own entity access system that we've implemented a hook for in OA. When you attach media to a document, the permission for that media is the same as the node you're attached to. So if you attach an image to a private node, that image is now private. However, this only works through the file attachment field.
If you just pasted an image into the WYSIWYG, that image will be public and not have that access control. In fact, you can get into trouble when your embedded image gets stored in the private file system and you won't have access to it for people that need access. We encourage people to use the attachment system.
We are planning to add support for the Insert module, so you can refer to attachments within the WYSIWYG, instead of having to embed them directly. We're definitely intending on having full private media support for OA2.