You are here

function fb_views_views_data in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_views/fb_views.module \fb_views_views_data()
  2. 6.2 fb_views/fb_views.module \fb_views_views_data()

File

fb_views/fb_views.module, line 44
Facebook-specific views arguments, filters, etc...

Code

function fb_views_views_data() {

  // fb_user table will only exists when fb_user.module enabled.
  $data['fb_user'] = array(
    'table' => array(
      'group' => t('Drupal for Facebook'),
      'join' => array(
        'node' => array(
          'left_field' => 'uid',
          'field' => 'uid',
        ),
        'users' => array(
          'left_field' => 'uid',
          'field' => 'uid',
        ),
      ),
    ),
    'picture' => array(
      'real field' => 'fbu',
      'title' => t('Picture'),
      'field' => array(
        'handler' => 'fb_views_handler_profile_pic',
      ),
      'help' => t('FBML to show a picture on Facebook Connect or Canvas pages.'),
    ),
    'fb_user_author' => array(
      'real field' => 'fbu',
      'title' => t('Author is friend'),
      'argument' => array(
        'handler' => 'fb_views_handler_author_is_friend',
      ),
      'help' => t('Limit results to Facebook friends of a user.'),
    ),
    'fb_views_filter_friends' => array(
      'real field' => 'fbu',
      // Does this do anything?
      'title' => t('Friend of current user'),
      'filter' => array(
        'handler' => 'fb_views_handler_filter_friends',
      ),
      'help' => t('Limit results to friends of the current user.  This filter will succeed when users are logged into Facebook Connect or Canvas pages.'),
    ),
    'fb_views_filter_profile_tab' => array(
      'title' => t('Profile Tab Owner'),
      'filter' => array(
        'handler' => 'fb_views_handler_filter_profile_tab',
      ),
      'help' => t('Limit results to profile tab user.  Only works on Facebook Profile Tabs.'),
    ),
  );
  return $data;
}