function smart_ip_views_bridge_views_data in Smart IP 7.2
Same name and namespace in other branches
- 6.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge.views.inc \smart_ip_views_bridge_views_data()
- 6 modules/smart_ip_views_bridge/views/smart_ip_views_bridge.views.inc \smart_ip_views_bridge_views_data()
Implements hook_views_data().
Return value
array
File
- modules/
smart_ip_views_bridge/ views/ smart_ip_views_bridge.views.inc, line 93 - Views hooks implementation.
Code
function smart_ip_views_bridge_views_data() {
$data['smartip']['table']['group'] = t('Smart IP');
$data['smartip']['table']['join'] = array(
'#global' => array(),
);
$data['smartip']['latitude'] = array(
'title' => t('Latitude'),
'help' => t("Display visitor's latitude."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_latitude',
'click sortable' => FALSE,
),
);
$data['smartip']['longitude'] = array(
'title' => t('Longitude'),
'help' => t("Display visitor's longitude."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_longitude',
'click sortable' => FALSE,
),
);
$data['smartip']['coordinates'] = array(
'title' => t('Coordinates'),
'help' => t("Display visitor's coordinates."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_coordinates',
'click sortable' => FALSE,
),
);
$data['smartip']['country'] = array(
'title' => t('Country'),
'help' => t("Display visitor's country."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_country',
'click sortable' => FALSE,
),
);
$data['smartip']['region'] = array(
'title' => t('Region'),
'help' => t("Display visitor's region."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_region',
'click sortable' => FALSE,
),
);
$data['smartip']['city'] = array(
'title' => t('City'),
'help' => t("Display visitor's city."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_city',
'click sortable' => FALSE,
),
);
$data['smartip']['zip'] = array(
'title' => t('ZIP code'),
'help' => t("Display visitor's ZIP code."),
'field' => array(
'handler' => 'smart_ip_views_bridge_handler_field_zip',
'click sortable' => FALSE,
),
);
if (module_exists('openlayers_proximity')) {
$data['smartip']['distance'] = array(
'title' => t('Openlayers proximity distance'),
'help' => t('Distance from a give point.'),
'sort' => array(
'handler' => 'smart_ip_views_bridge_openlayers_proximity_handler_sort',
),
'field' => array(
'handler' => 'smart_ip_views_bridge_openlayers_proximity_handler_field',
'click sortable' => TRUE,
),
);
$data['smartip']['flat'] = array(
'title' => t('Openlayers proximity square'),
'help' => t('Gives locations contained within a square derived by a simple latitude/longitude comparison.'),
'filter' => array(
'handler' => 'smart_ip_views_bridge_openlayers_proximity_handler_filter_square',
),
);
$data['smartip']['circle'] = array(
'title' => t('Openlayers proximity great-circle'),
'help' => t('Uses the Great-circle distance formula to return locations within a circular area.'),
'filter' => array(
'handler' => 'smart_ip_views_bridge_openlayers_proximity_handler_filter_circle',
),
);
}
return $data;
}