Fix for facebook_status.views.inc

  1. <?php
  2. //$Id$
  3.  
  4. /**
  5.  * @file
  6.  *   Views integration.
  7.  */
  8.  
  9. /**
  10.  * Implementation of hook_views_data().
  11.  */
  12. function facebook_status_hook_views_data() {
  13.   $data = array(
  14.     'facebook_status' => array(
  15.       'table' => array(
  16.         'group' => t('User'),
  17.         'base' => array(
  18.           'field' => 'sid',
  19.           'title' => t('Facebook-style Statuses'),
  20.           'help' => t('Each user can have a status.'),
  21.         ),
  22.       ),
  23.       'status_time' => array(
  24.         'title' => t('Status Time'),
  25.         'help' => t('The time the status was submitted.'),
  26.         'field' => array('handler' => 'views_handler_field_date', 'click sortable' => TRUE),
  27.         'argument' => array('handler' => 'views_handler_argument_date'),
  28.       ),
  29.       'status_fb' => array(
  30.         'title' => t('Status'),
  31.         'help' => t('The status text.'),
  32.         'field' => array('handler' => 'views_handler_field_markup', 'click sortable' => TRUE),
  33.       ),
  34.     ),
  35.   );
  36.   $data['users']['table']['join']['facebook_status'] = array(
  37.     'field' => 'uid',
  38.     'left_field' => 'uid',
  39.     'type' => 'INNER',
  40.   );
  41. }
  42.  
  43. //In the actual module file, not in facebook_status.views.inc.
  44. /**
  45.  * Implementation of hook_views_api().
  46.  */
  47. function facebook_status_views_api() {
  48.   return array(
  49.     'api' => 2.000,
  50.   );
  51. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.