like_and_dislike.views_default.inc in Like & Dislike 7
File
like_and_dislike.views_default.inc
View source
<?php
function like_and_dislike_views_default_views() {
$views = array();
$view = new view();
$view->name = 'like_and_dislike_node_votes';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = t('Node Likes/Dislikes');
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE;
$handler = $view
->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = t('Node Likes/Dislikes');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'manage like dislike';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['relationships']['votingapi_vote']['id'] = 'votingapi_vote';
$handler->display->display_options['relationships']['votingapi_vote']['table'] = 'node';
$handler->display->display_options['relationships']['votingapi_vote']['field'] = 'votingapi_vote';
$handler->display->display_options['relationships']['votingapi_vote']['required'] = TRUE;
$handler->display->display_options['relationships']['votingapi_vote']['votingapi'] = array(
'value_type' => '',
'tag' => '',
);
$handler->display->display_options['relationships']['votingapi_vote']['current_user'] = 0;
$handler->display->display_options['relationships']['uid']['id'] = 'uid';
$handler->display->display_options['relationships']['uid']['table'] = 'votingapi_vote';
$handler->display->display_options['relationships']['uid']['field'] = 'uid';
$handler->display->display_options['relationships']['uid']['relationship'] = 'votingapi_vote';
$handler->display->display_options['relationships']['uid']['required'] = TRUE;
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'users';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['relationship'] = 'uid';
$handler->display->display_options['fields']['tag']['id'] = 'tag';
$handler->display->display_options['fields']['tag']['table'] = 'votingapi_vote';
$handler->display->display_options['fields']['tag']['field'] = 'tag';
$handler->display->display_options['fields']['tag']['relationship'] = 'votingapi_vote';
$handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
$handler->display->display_options['fields']['timestamp']['table'] = 'votingapi_vote';
$handler->display->display_options['fields']['timestamp']['field'] = 'timestamp';
$handler->display->display_options['fields']['timestamp']['relationship'] = 'votingapi_vote';
$handler->display->display_options['fields']['timestamp']['label'] = 'When it happened';
$handler->display->display_options['fields']['timestamp']['date_format'] = 'long';
$handler->display->display_options['fields']['timestamp']['second_date_format'] = 'long';
$handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['table'] = 'votingapi_vote';
$handler->display->display_options['sorts']['timestamp']['field'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['relationship'] = 'votingapi_vote';
$handler->display->display_options['sorts']['timestamp']['order'] = 'DESC';
$handler->display->display_options['filter_groups']['groups'] = array(
1 => 'OR',
);
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
$handler->display->display_options['arguments']['nid']['table'] = 'node';
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
$handler->display->display_options['arguments']['nid']['default_action'] = 'default';
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
$handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['filter_groups']['groups'] = array(
1 => 'OR',
);
$handler->display->display_options['filters']['tag']['id'] = 'tag';
$handler->display->display_options['filters']['tag']['table'] = 'votingapi_vote';
$handler->display->display_options['filters']['tag']['field'] = 'tag';
$handler->display->display_options['filters']['tag']['relationship'] = 'votingapi_vote';
$handler->display->display_options['filters']['tag']['value'] = 'like';
$handler->display->display_options['filters']['tag']['group'] = 1;
$handler->display->display_options['filters']['tag']['expose']['operator_id'] = 'tag_op';
$handler->display->display_options['filters']['tag']['expose']['label'] = 'Tag';
$handler->display->display_options['filters']['tag']['expose']['operator'] = 'tag_op';
$handler->display->display_options['filters']['tag']['expose']['identifier'] = 'tag';
$handler->display->display_options['filters']['tag']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
$handler->display->display_options['filters']['tag_1']['id'] = 'tag_1';
$handler->display->display_options['filters']['tag_1']['table'] = 'votingapi_vote';
$handler->display->display_options['filters']['tag_1']['field'] = 'tag';
$handler->display->display_options['filters']['tag_1']['relationship'] = 'votingapi_vote';
$handler->display->display_options['filters']['tag_1']['value'] = 'dislike';
$handler->display->display_options['filters']['tag_1']['group'] = 1;
$handler = $view
->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'node/%/likes-dislikes';
$handler->display->display_options['menu']['type'] = 'tab';
$handler->display->display_options['menu']['title'] = t('Likes/Dislikes');
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['context'] = 1;
$handler->display->display_options['menu']['context_only_inline'] = 0;
$views[$view->name] = $view;
return $views;
}