simplenews_statistics.views.inc in Simplenews Statistics 6.3
Same filename and directory in other branches
Main simplenews statistics views integration file.
File
includes/views/simplenews_statistics.views.incView source
<?php
/**
* @file
* Main simplenews statistics views integration file.
*/
/**
* Implements hook_views_data().
*/
function simplenews_statistics_views_data() {
$data['simplenews_statistics']['table']['group'] = t('Simplenews statistics');
$data['simplenews_statistics']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
),
);
$data['simplenews_statistics']['send'] = array(
'title' => t('Sent mails'),
'help' => t('The number of sent mails.'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics']['total_opens'] = array(
'title' => t('Total opens'),
'help' => t('Total number of opens'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics']['unique_opens'] = array(
'title' => t('Unique opens'),
'help' => t('Total number of user-unique opens'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics']['total_clicks'] = array(
'title' => t('Total clicks'),
'help' => t('Total number of clicks'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics']['user_unique_click_through'] = array(
'title' => t('User unique click through'),
'help' => t('Total number of user-unique click through'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics_opens']['table']['group'] = t('Simplenews statistics Opens');
$data['simplenews_statistics_opens']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
),
);
$data['simplenews_statistics_opens']['email'] = array(
'title' => t('E-mail'),
'help' => t('The email address.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics_opens']['timestamp'] = array(
'title' => t('Timestamp'),
'help' => t('The time the user opened the mail.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_date',
),
'sort' => array(
'handler' => 'views_handler_sort_date',
),
);
$data['simplenews_statistics_clicks']['table']['group'] = t('Simplenews statistics Clicks');
$data['simplenews_statistics_clicks']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
),
);
$data['simplenews_statistics_clicks']['email'] = array(
'title' => t('E-mail'),
'help' => t('The email address.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics_clicks']['url'] = array(
'title' => t('URL'),
'help' => t('The clicked URL.'),
'field' => array(
'handler' => 'views_handler_field_url',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['simplenews_statistics_clicks']['timestamp'] = array(
'title' => t('Timestamp'),
'help' => t('The time the user clicked this link.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
'allow empty' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_date',
),
'sort' => array(
'handler' => 'views_handler_sort_date',
),
);
return $data;
}
Functions
Name![]() |
Description |
---|---|
simplenews_statistics_views_data | Implements hook_views_data(). |