What's the status of the views2 integration? I tried to look in CVS to see if this was being worked on, but the buddylist_api.views.inc file appears to be empty. So I take it that means it's still very early stages?

I need to filter nodes based on if they were created by a friend of the current logged in user.

It took me several hours to get my head around what Views2 is doing with Handlers etc, but I worked out that adding this code to buddylist_api.views.inc and then clearing the views cache gives me the filter I require:

function buddylist_api_views_data() {
  $data = array();

  $data['buddylist_relations']['table']['group'] = t('Buddylist');

  $data['buddylist_relations']['requester_id'] = array(
    'title' => t('Your Buddy'),
    'help' => t('A link if your buddy did create the node'),
    'filter' => array(
      'handler' => 'views_handler_filter_user_current',
    ),
  );

  $data['buddylist_relations']['table']['join']['node'] = array(
    'left_field' => 'uid',
    'field' => 'requestee_id',
  );
  return $data;
}

Is this useful for anyone? I'm going to have to keep developing this anyway - unless someone is working on a more complete views2 integration.

Comments

darrenmothersele’s picture

Category: feature » support
criz’s picture

Status: Needs work » Closed (won't fix)

there will be no supported d6 version...