Hi Nodestroy...I've modified the buddy_api_buddies_content successfully to show new content type activity with the following view code.

  $view = new stdClass();
  $view->name = 'FriendsActivity';
  $view->description = 'Show activity from friends';
  $view->access = array (
);
  $view->view_args_php = 'global $user;
if(arg(0) == "user" && is_numeric(arg(1))){
  $args[0] = arg(1);
}else{
  $args[0] = $user->uid;
}
return $args;';
  $view->page = FALSE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'table';
  $view->url = '';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '0';
  $view->block = TRUE;
  $view->block_title = 'Mini-Feed';
  $view->block_header = '';
  $view->block_header_format = '2';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'list';
  $view->nodes_per_block = '10';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => 'normal',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'buddylist2_buddies',
      'argdefault' => '7',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'users',
      'field' => 'uid',
      'label' => '',
    ),
    array (
      'tablename' => 'users',
      'field' => 'name',
      'label' => '',
    ),
    array (
      'tablename' => 'node_data_field_activity_blog',
      'field' => 'field_activity_blog_value',
      'label' => '',
      'handler' => 'content_views_field_handler_group',
      'options' => 'plain',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'blog',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node, users, node_data_field_activity_blog);
  $views[$view->name] = $view;

I've attached a picture how this looks like on my site. I would love to figure how I can show more within this view than just buddies content, for example "newly posted comments" and "users that became friends". I've tried to use the 'activity' module, but it is not functioning very well.

Is this possible to do with views? If not...are you planning to further enhance the buddy api to include a wider set of activity than just content type? I'd love to know what is possible.

Kind regards,

Marius

CommentFileSizeAuthor
#2 activity.jpg48.77 KBmariusooms
mini-feed.jpg48.63 KBmariusooms

Comments

criz’s picture

Hi Marius,

your view looks nice! How did you accomplish that? Are you listing teasers or do you have themed the view?

We plan to do such a minifeed with the help of workflow-ng. But of course, there could be other solutions too.

regards,
chris

mariusooms’s picture

StatusFileSize
new48.77 KB

Hi Criz...sorry for the late reply. I themed the view using fields and css. At first I was using nodes for views. Than when I saw workflow-ng could create content as well, I thought I could use that to create custom notifications, but it didn't work well enough. Currently I'm using the per-user-log messages for fields in views. This way I can use the tokens in workflow-ng that log messages have available and display custom messages for almost anything you can think off. There's one HUGE drawback. Since logs are stripped from all html you can not use url tokens, which is a shame since you can't link to the actual activity events. Only the user picture links to the profile, that's it.

Either way, it at least allows you to show all activity you desire, using resources that are already created. Maybe there are better ways to use workflow-ng, e.g. using custom execution of php.

Attached is a picture of messages I'm using as an example as off now.

Regards,

Marius

nodestroy’s picture

Assigned: Unassigned » nodestroy

hi,

html tags would be great in log-messages, we also need this. a solution will be available soon:
http://drupal.org/node/238998

regards,
dominik