If you see the photo that i attach, i have organic group display to user profile page by default, but once i start to rearrange the field with user display from display suit, this field is gone because it isn't port over by user display, i trying to add organic group to user display not can't seem to getting it working. From the devel themer, i get the following data and hope someone can help me out.

theme called: user-profile-category.tpl.php
Array->element(Array)->groups(Array)->#value(String) and #attributes(Array)->class (String) og_groups

I have a similar problem with role expire but if i can get this right, i should be able to do the same to role expire.

CommentFileSizeAuthor
group.png19.91 KBspacereactor

Comments

swentel’s picture

Issue tags: +ds 1.3

Not possible either (like the role expire) - will add that this weekend.

swentel’s picture

Title: How to add custom field to user profile to display organic group » Find more stuff in $node & $user objects (preprocess) to add automatically more fields without having to create new fields

Changing title

spacereactor’s picture

looking forward to it and thank you for your time to look into the matter.

swentel’s picture

Project: Display Suite » Node displays contributions
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Miscellaneous » Other modules support
Category: support » task

Changing title - we're changing our filosofy - we'll create a nd_og module and also a patch.
Also added a patch for role expire at #806494: Role expire integration with Display Suite - let's hope it gets in!

swentel’s picture

Title: Find more stuff in $node & $user objects (preprocess) to add automatically more fields without having to create new fields » Create ND OG integration

Changing title

swentel’s picture

Issue tags: -ds 1.3

removing tag

swentel’s picture

Status: Active » Postponed
swentel’s picture

Status: Postponed » Fixed

You can create a field for this:

  return $object->content['summary']['groups']['#value'];
swentel’s picture

Status: Fixed » Closed (fixed)
davea’s picture

Status: Closed (fixed) » Active

Sorry to re-open this....

But I am unsure what path to take for Organic Groups and Display Suite. Is there going to be a nd_og ?

I understand the use of creating the fields via the UI but my preference is putting those OG fields into code. In fact, I spent a number of hours trying to do that and ran into alot of frustration getting the fields to display. I really like DS as a method of layout as it makes the templating much easier, as far as I can tell.

Here is as far as a got:

function nd_og_ds_fields($type_name, $build_mode, $extra){
  $fields = array();  
  
  // get all the build modes
  $build_modes = ds_get_build_modes('nd');
  
  //ensure that the node type is a og
  if(og_is_group_type($type_name)) {
    $og_fields = bisite_og_fields();
    foreach($og_fields as $key => $value){
      $fields[$value] = array(
        'title' => 'OG '. str_replace('og_',' ',$value)  ,
        'type' => DS_FIELD_TYPE_PREPROCESS,
        'status' => DS_FIELD_STATUS_STATIC,
        'properties' => array(
          'formatters' => array(
            'nd_og_'.$value => t('Default'),
          ),
        )      
      );
    }
  }
   return array('nd' => $fields);
}

I was able to get all of them to display on the UI and some of them to display on the node page. I tried preprocess, theming, etc, without much success. I ended up unsetting $form['og_description'] and ignoring the rest. I would be happy to complete this module and any help in pointing me in the right direction is appreciated.

Thanks for a great set of modules!
Dave

swentel’s picture

Status: Active » Postponed (maintainer needs more info)

OG is indeed a bit more frustrating as some values should be accessed by preprocess, as others are not. Can you give me the output of the bisite_og_fields() function because I don't know that one (or is that something very new in the latest OG version ?) Let me know which fields you want to have and I'll help along.

swentel’s picture

Status: Postponed (maintainer needs more info) » Postponed

Postponing again.

davea’s picture

Sorry for the delay. I never was notified that you had responded. I will get this for you.
(I still can't seem to find out how to get notified of my posts and the replies).

swentel’s picture

@davea - you can subscribe to every individual project if you like, but you'll get notified of every issue then for this project, probabaly not something what you want. Also, user/id/track shows you the history of replies and should show you new replies on posts too.

rjmackay’s picture

subscribing

donquixote’s picture

This is interesting.
It would be very useful to have the view of group posts and other things available as a field in nd for group nodes.

lloydpearsoniv’s picture

subscribing. I am definitely interested in display suite & Organic Group integration...in D7 hopefully.

swentel’s picture

Status: Postponed » Closed (won't fix)

Closing this for now. D7 support should be fairly ok already afaik since OG uses fields in D7. Reopen if someone wants more for D6, but only with patches!

donquixote’s picture

A lot of this can be done by turning the og-related views into "node content" views, using views_attach.module.