Hi, Thanks for this great module.
I am playing with the og functionality now. What I would like to have is a microblog page listing all the statuses in the og; so from og-members and within a specific group. Is that possible with the current version?

Some info:
To test it I cloned the default context aware view and added three new blocks and changed the css to user, node and og. In admin/settings/facebook_status/contexts I changed the view to the new view and the three specific dom selectors (user, node, og). I added these blocks at every page (using the Context module) and tested it at a user, node, og-view and og-node. After posting a status the right block refreshed so it looks like the right context is triggered. Posting a status at a node within an og gives a "[user] » [node-title] [message]", so not showing up in the statuses listing.
Then, after a page-refresh every block has the new status, and also on every page (user, outside group, in different groups).
Am I doing something wrong, am I trying something that is not yet possible or should it work?
btw, it seems related to #1066234: Facebook-style status block not recognizing it's on a OG or on a node

thanks!

Comments

avdp’s picture

ok, some further testing:
Node: new status at a node updates the block with div.status-node automatically. After page refresh all three blocks list only statuses of this node [user] » [node-title] [message]
View: new status at a view updates the block with div.status-user automatically. After page refresh all three bocks list user-stream.
OG views-listing-page: new status at an og-view updates the block with div.status-og automatically. After page refresh all three blocks list og-stream with all statuses from all og's.
OG-node: new status at an og-node updates the block with div.status-node automatically. After page refresh all three blocks list node-stream with statuses from this node.

I am interested in a views page and block listing all statuses within one specific group.The page extensive with a pager and the block the last 5. Adding a status should be possible at every page within the group (views listing and node) and added to the og-specific stream... possible?

mastermtg’s picture

I am having the same problem as the original post.

totocol’s picture

Clone recent members block and change content to facebook status updates

icecreamyou’s picture

Category: bug » support
Status: Active » Fixed

The part about your views being different when you refresh just seems like a problem with your Views configuration to me, and not a bug in the module.

I am interested in a views page and block listing all statuses within one specific group.

To do this, you just need a status View with the "Recipient type" filter set to "og" and a "Recipient ID" argument.

totocol’s picture

This is my view code if it helps in any way.Just need to make sure when you read it to ensure you use the same field names that you sue on your views or the code will not work.


$view = new view;
$view->name = 'og_facebook_status_block';
$view->description = 'Facebook status block';
$view->tag = 'og';
$view->view_php = '';
$view->base_table = 'users';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'nid' => array(
    'label' => 'Group',
    'required' => 1,
    'id' => 'nid',
    'table' => 'og_uid',
    'field' => 'nid',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('fields', array(
  'crosspost_users_pics' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'imagecache_preset' => 'facebook_pictures',
    'exclude' => 0,
    'id' => 'crosspost_users_pics',
    'table' => 'facebook_status',
    'field' => 'crosspost_users_pics',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'status' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'status',
    'table' => 'facebook_status',
    'field' => 'status',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'status_time' => array(
    'id' => 'status_time',
    'table' => 'facebook_status',
    'field' => 'status_time',
  ),
));
$handler->override_option('arguments', array(
  'nid' => array(
    'id' => 'nid',
    'table' => 'og_uid',
    'field' => 'nid',
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(
      'count' => TRUE,
      'override' => FALSE,
      'items_per_page' => 25,
    ),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'og_group_types',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'add_table' => 0,
    'relationship' => 'none',
    'default_argument_fixed' => '39',
    'default_argument_php' => 'if ($node = og_get_group_context()) {
                return $node->nid;
              }
              else {
                return NULL;
              }',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'poll' => 0,
      'book' => 0,
      'group1' => 0,
      'group2' => 0,
      'page' => 0,
      'story' => 0,
    ),
    'validate_argument_php' => '',
    'require_value' => 0,
    'reduce_duplicates' => 0,
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
      '3' => 0,
      '4' => 0,
    ),
    'validate_argument_type' => 'tid',
    'default_argument_user' => 0,
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'not' => 0,
    'validate_argument_is_member' => 1,
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'id' => 'status',
    'table' => 'users',
    'field' => 'status',
    'operator' => '=',
    'value' => 1,
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
  ),
  'is_active' => array(
    'id' => 'is_active',
    'table' => 'og_uid',
    'field' => 'is_active',
    'operator' => '=',
    'value' => 1,
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
  ),
  'rid' => array(
    'operator' => 'not',
    'value' => array(
      '3' => '3',
      '5' => '5',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'rid',
    'table' => 'users_roles',
    'field' => 'rid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Recent statuses');
$handler->override_option('empty_format', '1');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 9);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'picture' => 'picture',
    'name' => 'name',
    'message' => 'message',
  ),
  'info' => array(
    'picture' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'name' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'message' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'name' => 'name',
    'is_admin' => 'is_admin',
  ),
  'separator' => ' ',
));
$handler = $view->new_display('block', 'Block ', 'block');
$handler->override_option('filters', array(
  'status' => array(
    'id' => 'status',
    'table' => 'users',
    'field' => 'status',
    'operator' => '=',
    'value' => 1,
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
  ),
  'is_active' => array(
    'id' => 'is_active',
    'table' => 'og_uid',
    'field' => 'is_active',
    'operator' => '=',
    'value' => 1,
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
  ),
  'is_admin' => array(
    'operator' => 'in',
    'value' => array(
      '1' => '1',
    ),
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'is_admin',
    'table' => 'og_uid',
    'field' => 'is_admin',
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
    'override' => array(
      'button' => 'Use default',
    ),
  ),
));
$handler->override_option('title', 'Class status updates');
$handler->override_option('block_description', 'Group admins');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('block', 'Block Admins, Members', 'block_1');
$handler->override_option('block_description', 'Group members');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('block', 'Block', 'block_2');
$handler->override_option('sorts', array(
  'status_time' => array(
    'order' => 'DESC',
    'id' => 'status_time',
    'table' => 'facebook_status',
    'field' => 'status_time',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('items_per_page', 6);
$handler->override_option('use_pager', 'mini');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.