Posted by rlhawk on April 5, 2015 at 3:26am
Start:
2015-04-16 18:00 - 19:30 America/Los_Angeles Event type:
User group meeting
We will meet at 6 pm on Thursday, April 16.
Learn about Drupal and meet local Drupal enthusiasts.
Agenda
- Introductions
- Drupal news
- Building a Drupal Graphic Engine from Scratch, by Rhett Pritchard: Post mortem of the construction of a new visualization engine for Drupal, prioritizing speed and flexible datasources.
Post a comment if you have a proposal or request for another presentation related to working with external data in Drupal.
Event Details:
Thursday, April 16, 6:00pm - 7:30pm.
Northwest Worklofts, 3131 Western Ave (at Denny), Seattle
Sponsored by Fuse IQ
Coworking is available from 3 p.m. to 6 p.m. at Drip City (2929 1st Avenue (between Broad and Eagle); Map)

Comments
Meeting tonight!
Join us tonight for the Seattle Drupal User Group meeting at Northwest Worklofts. We'll be discussing how to work with external content in Drupal.
Code snip
Hey @rlhawk can you kindly post that view_alter code you showed us for integrating non-drupal tables?
Sure thing
Here you go:
/
* Implements hook_views_data().
*/
function seadug_views_data() {
$data = array();
$data['users_sales_data']['table']['group'] = t('SeaDUG');
$data['users_sales_data']['table']['base'] = array(
'field' => 'id',
'title' => t('Non-Drupal Sales Data'),
'help' => t('Some sales data not managed by Drupal.'),
);
$data['users_sales_data']['table']['join']['users'] = array(
'left_field' => 'name',
'field' => 'name',
);
$data['users_sales_data']['sales'] = array(
'title' => t('Sales'),
'help' => t('Number of sales YTD.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
);
return $data;
}
/
* Implements hook_views_data_alter().
*/
function seadug_views_data_alter(&$data) {
$data['users']['users_sales_data'] = array(
'title' => t('Non-Drupal Sales Data'),
'help' => t('Some sales data not managed by Drupal.'),
'relationship' => array(
'group' => t('SeaDUG'),
'label' => t('Non-Drupal Sales Data'),
'title' => t('Non-Drupal Sales Data'),
'help' => t('Some sales data not managed by Drupal.'),
'base' => 'users_sales_data',
'base field' => 'name',
'relationship field' => 'name',
'handler' => 'views_handler_relationship',
),
);
}