Hi,

I have been attempting to use spaces and context on one of my sites, well actually in a sandbox at the moment. I am trying to follow the devseed tutorial (see http://developmentseed.org/blog/2009/jan/30/easy-feature-building-spaces).

Rather than bore you with all the minor issues I can match between the video and my installation, I am hoping someone could give me a brief walk through, or point me to a tutorial, that would show me how to use spaces/context. I am using Context 2 and Spaces 2.

Regards,
Nick

Comments

nickbits’s picture

Okay, so I have tried going back having looked at OpenAtrium but still not getting anywhere. What I want is simple, using Organic Groups I would like to have a blog for each group. I can, now, recreate the video linked to in my first post to create a site wide blog. I cannot seem to get it to link with OG.

When viewing an OG I get the emssage "Please setup your group by choosing a homepage setting." I know this is not OG and it is something to do with context and space but cannot figure out what, I just cant see where you set the home page. I assume it should be under a feature page somewhere, but can't figure out how to get there. I can post code if needed, would prefer some good tutorials though, if any exist.

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Scrap that, after a fresh sandbox it seems to work, but would still like links to some good tutorials on spaces and context.

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

mxt’s picture

I need Space/Features/Context tutorial too... I've read all (modules description/info/readme, etc), watched video about this modules (more and more times!) but STILL I can't understand the mechanism to use them together...

Also english is not my native language so my difficulties are double! I absolutely need step by step tutorial for dummies because working with the "Spaces/Features/Context" environment is very tough to understand for me...

Does someone have a suggestions?

Thank you very much

nickbits’s picture

Hi MXT,

I havn't revisited this yet, but as you can see I got no answers yet. What I have done, and has helped , is to set-up a sandbox and play with Spaces. It is not, in my opinion, the easiest module to get along with and I am still strugling to find some good documentation/tutorials/examples for it.

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

So I am starting again with this. Have V3 of Spaces, Context, etc. (the latest). I am starting from scratch, doing a bit at a time and working up.The ultimate aim, as noted in the original post, is to have a blog, calendar and gallery for each OG group, but as a feature so it can be turned on/off as needed.

Anyway, I am trying to follow the tutorial (see orig post) to get the basic blog working. I have a view which works. I ahve created the context (see below):

$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'spaces_feature_blog';
$context->description = '';
$context->tag = 'Blog';
$context->conditions = array(
  'node' => array(
    'values' => array(
      'blog' => 'blog',
    ),
    'options' => array(
      'node_form' => 1,
    ),
  ),
  'views' => array(
    'values' => array(
      'blog' => 'blog',
    ),
  ),
);
$context->reactions = array(
  'block' => array(
    'blocks' => array(
      'views-blog-block_1' => array(
        'module' => 'views',
        'delta' => 'blog-block_1',
        'region' => 'right',
        'weight' => 0,
      ),
    ),
  ),
);
$context->condition_mode = 0;

$translatables['spaces_feature_blog'] = array(
  t('Blog'),
);

That works fine. I realise this is not OG yet, just working through the tutorial. In the tutorial it notes you can goto "mysite/spaces/features" and enable the feature. That doesn't appear to be the case in the new versions of the modules. Can someone confirm that?

Better yet, are there any good tutorials for the new versions, simple ones?

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Havin had no replies or pointers, I ahve started again. I have a fresh install of Drupal, and this time I ahve gone back to Cotnext and Spaces V1.x. I know it's out of date, but it lets me follow the video tutorial over at - http://developmentseed.org/blog/2009/jan/30/easy-feature-building-spaces.

I follow everything, got a view, context, etc. When I go to enable the feature at mysite/spaces/feature - I get the error

Access denied
You are not authorized to access this page. 

Have no idea why. Have attached an export of the context below:

$items[] = array (
  'namespace' => 'spaces',
  'attribute' => 'feature',
  'value' => 'blog',
  'node' => 
  array (
    'blog' => 'blog',
  ),
  'views' => 
  array (
    'blog' => 'blog',
  ),
  'spaces' => 
  array (
    'label' => 'Blog',
    'description' => 'site blog',
    'menu' => 
    array (
      0 => 
      array (
        'title' => 'My Blog',
        'href' => 'blog',
      ),
    ),
    'types' => 
    array (
      'site' => 'site',
    ),
  ),
  'block' => 
  array (
    'user_3' => 
    array (
      'module' => 'user',
      'delta' => '3',
      'region' => 'right',
      'weight' => '12',
    ),
    'user_2' => 
    array (
      'module' => 'user',
      'delta' => '2',
      'region' => 'right',
      'weight' => '11',
    ),
    'comment_0' => 
    array (
      'module' => 'comment',
      'delta' => '0',
      'region' => 'right',
      'weight' => '10',
    ),
  ),
);

The context itself works, I just cannot get to the features page that the tutorial says I should be able to get to. Any ideas anyone?

Cheers,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

Anonymous’s picture

I'm trying to figure these modules too. They seem to be incredibly powerful and useful, but about as transparent (and hard) as a brick wall. I've been banging my head against them all day.

Neither version 2 or 3 of context looks or works like the screencast and as far as I can tell, 3 has no organic groups integration. All three need some serious UX love I think. And some documentation that isn't either hopelessly out of date or so mysterious that it verges on the occult.

I want to create an organic group space that has an event calendar, blog, membership list and file repository for each group. Logged in users will see all of this content, while anonymous users will only see a subset of this. Is this possible? And is Spaces/Context/Features the right way to go about it?

Thanks

I'm happy to help with the documentation and UX by the way, if I ever manage to figure out how it works...

Matt

saltcod’s picture

You're all right. Use of these modules is sadly not transparent.

I got a reasonable handle on them in the context of an Open Atrium site, but on their own, they're a bit challenging conceptually.

The best way that I've come to think about/explain these things is really through the lens of Context. But lets go through the other two first:

1. Features: You've just put together a content type and made a View. You've got lots of fields, some View wizardry going on, and you're using Imagecache presets to handle your images. Features lets you package this functionality up and treat it like a normal Drupal module. So, just like Poormanscron, you can disable the module (Feature), move it around, share with your friends...etc... At it's most basic level, Features lets you package site-building up and use it like modules.

2. Spaces : A space can be any part of your site. You can make a site-wide space, a blog space, your "Contact Us" page can be a space, every user's blog can have its own space....etc....

3. Context: For me, the best way to think of the Context module is to look at it as the admin/build/blocks page on steroids. You've previously defined a Space, and now you want a block to appear only in that space. Instead of just using URLs (like the Blocks module does), you can now use your defined Space.

I had a few real hangups here too, but remember those few tips: Features=modules, Spaces=blog space, site-wide space, forums space, etc.... and Context= a super Block administration interface.

Obviously it isn't as straightforward as that, but this much should get you started.

Terry

nickbits’s picture

Hi saltcod,

Thanks for the feedback. I have already managed to figure out what you have jsut written, although it took a while. Wish it had been that clear in the first place. Whilst I understand what they all do, putting it into action is another thing alltogether. There needs to be some tutorials to go with versions 2 and 3. Some simple step by step ones.

I am by no means a beginer, but getting spaces, context and features to work is just driving me nuts. I did try to look at OpenAtrium, and whilst I can understand what is going on, trying to replicate some of it, for example having a blog that can be enabled/disable per OG, just doesn't work.

I even tried installing version 1 and following the devseed tutorials but at one point it falls over, the features do not appear.

I expect this is going to be like Views when it changed from V1 to 2. I found that a pain at the time, but now look back on it and can't see why I couldn't get it.

Anyway, thanks for making things clearer.
Regards,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

Anonymous’s picture

Thanks saltcod, that helps me get a bit more of a grasp on it conceptually. I get what they're about, but the problem lies in the execution with all sorts of unexpected gotchas.

nickbits – I thought I was doing well looking through Atrium and replicating the settings, until I tried to add the 'Node: Group space' field in my view. It wasn't there. A bit of searching and I came across your post on the OA Community board asking the same question.

I'm by no means a Drupal beginner either, but at that point I realised that these aren't the modules I'm looking for. At least not yet.

I think that the admin interface for all three modules needs to be condensed to one screen, perhaps something like a cross between views and panels that makes setting them up a bit more intuitive to figure out and conceptually grasp how they work together.

nickbits’s picture

rick_random777 - glad someone else has the same issue as me and I am happy that you have found it is not what you are looking for, at least you ahve made progress.

I have gone about my issue another way as well, but think that this is the ideal way of doing things. A combined admin panel sounds like an excellent idea, one that I wouldn't mind having a crack at if only I could get the basics working.

Anyway, have put this to one side and will revisit when I either find some good tutorials or when I get a LOT more time.

Good luck,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

summit’s picture

Hi Guys,

Did anyone of you contacted Development Seed about this? Are they not willing to give more support?
I think spaces/features and context are the next things to move to when we have what we want for one site with CCK/views (panels/ctools?) and then want to distribute made functionality to another place, right?

What does Development Seed (Jeff Miccolis) says about a tutorial of a working version of these modules?

greetings, Martijn

Anonymous’s picture

No I haven't contacted Development Seed about it yet, that's a good idea.

I'm kind of surprised at how bad the interfaces are for these modules, especially as their design is usually very good - I can't go without their admin module and theme now.

mxt’s picture

...it's a rather high order to ask for step-by-step instructions on how to build out your relatively complex site. There's a reason that Drupal developers are paid tens of thousands of dollars to build complex sites -- because it's really hard to do and they've spent years learning the skill...

The above is the answer I get when I tried to ask a step by step example about the use of some of these modules.

See http://drupal.org/node/742676#comment-2897680

summit’s picture

Hi,

That is not a response from development seed. Those guys are great in support. They believe that contributing knowledge will bring drupal further. Anyone really asked someone of Development Seed?

Otherwise, may be someone who has attended the features workshop in Drupalcon Paris can give some light over these modules?
greetings, Martijn

nickbits’s picture

Hi,

I did try contacting DevSeed but had no reply (with regards to new tutorials). I'm not asking anyone to develop my site, just to give me an insight into how to get things working, ideally with some examples. I had hoped that the community in general would have been able to of helped. As noted in another post, I had tried going to the Open Atrium site but got no where.

I have at present put context, spaces and features to one side. What I will do when I get some time is to sit down with a fresh install of Drupal, spaces, etc. and Open Atrium. I will reverse engineer Open Atrium and see if I can't figure out whats going on, try porting it to my Drupal to get a similar result. And of course record and document what I do.

Chances are though I'm not going to get the time to do that for a while.

In the mean time, if anyone does have any insight, I would love to hear about it.

Cheers,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

summit’s picture

Hi Nick,

May be you can attend http://developmentseed.org/blog/2010/may/13/step-step-presentation-build...
or someone else can and give here an update after this?

greetings,
Martijn

nickbits’s picture

Hi,

Thanks for that, only two issues, the event unless I am mistaken was on the 14th and is halfway around the world from me! Would love to have attended, if I ahd seen it in time and money wasn't an issue, I may have gone.

Anyway, I have checked out the slides from the talk ( http://www.slideshare.net/miccolis/bending-open-atrium-to-your-will-4127787 ) and will watch the video when available. It does say it/they assume you have used context, spaces and features before, but maybe seeing the video may be more useful.

What I would like is a simple step by step guid from scratch. i.e. a sample to using them without ahving anything inplace already such as is the case with Open Atrium.

Anyway, you for pointing it out, will keep an eye on it.

Cheers,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

cairnsim’s picture

Hi Nick,

Just seeing this now, no one at Dev Seed had been aware of this thread until your tweet today: https://twitter.com/drnickyoung/status/14251546457. Good news, we're actually already working on new docs for the community.openatrium.com site. We've been taking a lot of feedback that we receive on that site into account as we work on docs, and your comments here are helpful as well to know what people are running into outside of the OA paradigm. Since we have a good documentation site there already and this is all relevant to OA, we'll use it to post this kind of info. We'll be tweeting from @open_atrium as new docs are posted.

For now, we're going through some outdated links like that old blog post you found and are going to add some disclaimers at the top about them being out of date. Moving forward, the documentation section on community.openatrium.com or the module project pages and readme.txt files are probably going to be the best places to look. We're going to use those since they're better venues for canonical information about our projects than blog posts or forum threads, that way in the future you can be sure you're looking at the latest version of any info about our work.

Hopefully the update helps! DM me if you have any other ideas for improving the docs once you get to read through them: @cairnsim.

Cheers,

Ian Cairns

nickbits’s picture

Hi Ian,

Thanks for the update. I for one can't wait to see the docs. I use Open Atrium for some of my community work and groups/organisations, and love it. So I know just how powerful spaces, context and features can be. I know if I had the time to delve under the hood I could figure it out, just a case of not having the time at present. I know using spaces, context and features outside of Open Atrium will be like the transition from Views 1 to 2, where by many people struggle to get the basics down, but then couldn't see why they didn't get it to start with!

Anyway, I am all up for helping test anything that is needed, tutorial wise, or any other way that I can.

Again, personally, I think the tutorials you have on DevSeed are exactly what is needed, just being up to date. I agree the first place one should look is the readme, and if you are able to put the info in there, fantastic (I love seeing video myself, but if I can get the basics, I would be up for making a video tutorial myself.=).

I think if people could get the basics, via tutorials similar to the ones on DevSeed, that is basic simple step-by-step tutorials:

  1. A blog - spaces & context (Just basics as a context and space)
  2. How to export/import that as a feature (exporting that feature to another site?)
  3. How to add a blog as a feature to OG's

then I don't think there would be too many issues in applying it to other situations.

Anyway, look forward to seeing the updated docs.
Regards,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

summit’s picture

Hi Ian, Thanks for your post and replying to my email.
Looking forward to version 3 docs, will test that version than.
greetings, Martijn

nickbits’s picture

Hi All,

Just wanted to say thank you to everyone for the help/feedback. Also to Ian who has pointed me to this tutorial:

https://community.openatrium.com/documentation-en/node/449

I ahve read it a couple of times now and looks to be just the thing that many of us are/were looking for. I have yet to actually try it, but having read it, it makes sense and shows just how dumb I was being!

Regards,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

summit’s picture

Hi Nick,

May be you yourself can then make the step by step documentation, so others can also benefit from the great new way of programming using spaces, context and features?
Would be great!

greetings,
Martijn

nickbits’s picture

Hi Martijn,

If you take a peek at the tutorial linked to it is a step-by-step, or near-as, tutorial. It is fantastic and has got just about everything I need. If it does work and I can get my head around it, I will look at doing more documentation, but to be honest, with that tutorial and more on the way by the guys over at DevSeed / OpenAtrium, not sure if mine will be needed.

Anyway, first things first, I have read the tutorial several times but I need to try it. Will take it from there.

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

Anonymous’s picture

Thank you everyone for your help and feedback, it's been very much appreciated.
I'm going to sit down and have a proper read of the features tutorial, and hopefully crack it this time.

I'm also really happy to help with the documentation and anything else.

Regards,

Matt

mxt’s picture

I don't know... may be this installation profile can help you: http://drupal.org/project/spacesdemo

nickbits’s picture

Hi All,

I found some time tonight to have a walk through the tutorial over at https://community.openatrium.com/documentation-en/node/449.

I have taken the steps in the tutorial and used it to create my own, albeit basic feature that works sitewide or in OG. The feature is simple, a blog that could be used sitewide and/or on groups. Yes I know there is a blog module and there is a demo blog as well, but I wanted to start simple.

So the tutorial works fine. The only issue I have is, having the feature as both sitewide and OG, if I decided I wanted to turn the feature off sitewide, I get a problem. I go to the site home page, click on features, and disable the blog. Now the homepage comes up "access denied." Why?

Cheers,
Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi All,

Okay, so this seems to be really easy to do now, with the aforementioned tutorial. Fantastic read and easy to follow. I did mention in my last post that I had one minor issue:

So the tutorial works fine. The only issue I have is, having the feature as both sitewide and OG, if I decided I wanted to turn the feature off sitewide, I get a problem. I go to the site home page, click on features, and disable the blog. Now the homepage comes up "access denied." Why?

I have been playing with it again today and found another minor issue. That is breadcrumbs. Lets ignore features, spaces, etc. for a minute. What I did before was to use the Custom Breadcrumbs module, applying a custom crumb to the view, apth or node type as appropriate. So for example I may have titles as:

Groups
[ogname-raw]
Blog

And paths as:

og
<pathauto>|groups/[ogname-raw]
<none>

This works fine. So the problems:

  1. Now as soon as I create a feature for say my Organic Groups, that breadcrumb no longer works.
  2. Tokens are no longer evaluated for the custom breadcrumbs module when in a context.
  3. I cannot see how to export the breadcrumb to my feature. Can you export from the custom breadcrumbs module?
  4. So is this a bug or something I am doing wrong? If it is a bug, is it with the breadcrumbs module or the context, or features?
    1. Anyway, appart from a few minor issues, the rest is straight forward.
      Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

So should have checked the context issues beforehand. Looks like the issue has been reported, well not the exact same issue but a similar one which would solve, or looks like it would, the breadcrumbs issue.

Interested, look at - http://drupal.org/node/748016

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

For anyone interested, this is easily solvable, although not sure it is the best way. Again assuming you are using the Custom Breadcrumbs module and setting the crumb for an OG, this is the code I used for the titles:

<?php $og = og_get_group_context();?>
<?php return array('Groups',$og->title,'Members'); ?>

and for the paths:

<?php $og = og_get_group_context();?>
<?php return array('og','node/'.$og->nid,'<none>'); ?>

Hope that is of some use to you.
Nick

PS No I still do not know how to export the custom breadcrumb...

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

mxt’s picture