123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?php
- /**
- * @file
- * Views export of duplicate mail user blocks.
- */
- /**
- * Implementation of hook_views_default_views().
- */
- function duplicatemail_views_default_views() {
- $view = new view();
- $view->name = 'duplicatesview';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'users';
- $view->human_name = 'Duplicate Mail';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['title'] = 'Duplicate Mail: Block from views, for individual accounts';
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['access']['perm'] = 'access user profiles';
- $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'] = 'some';
- $handler->display->display_options['pager']['options']['items_per_page'] = '10';
- $handler->display->display_options['style_plugin'] = 'table';
- $handler->display->display_options['style_options']['columns'] = array(
- 'mail' => 'mail',
- 'edit_node' => 'edit_node',
- 'name' => 'name',
- 'uid' => 'uid',
- );
- $handler->display->display_options['style_options']['default'] = '-1';
- $handler->display->display_options['style_options']['info'] = array(
- 'mail' => array(
- 'sortable' => 0,
- 'default_sort_order' => 'asc',
- 'align' => '',
- 'separator' => '',
- 'empty_column' => 0,
- ),
- 'edit_node' => array(
- 'align' => '',
- 'separator' => '',
- 'empty_column' => 0,
- ),
- 'name' => array(
- 'sortable' => 0,
- 'default_sort_order' => 'asc',
- 'align' => '',
- 'separator' => '',
- 'empty_column' => 0,
- ),
- 'uid' => array(
- 'sortable' => 0,
- 'default_sort_order' => 'asc',
- 'align' => '',
- 'separator' => '',
- 'empty_column' => 0,
- ),
- );
- /* Field: User: E-mail */
- $handler->display->display_options['fields']['mail']['id'] = 'mail';
- $handler->display->display_options['fields']['mail']['table'] = 'users';
- $handler->display->display_options['fields']['mail']['field'] = 'mail';
- /* Field: User: Edit link */
- $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
- $handler->display->display_options['fields']['edit_node']['table'] = 'users';
- $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
- /* Field: User: Name */
- $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']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE;
- /* Field: User: Uid */
- $handler->display->display_options['fields']['uid']['id'] = 'uid';
- $handler->display->display_options['fields']['uid']['table'] = 'users';
- $handler->display->display_options['fields']['uid']['field'] = 'uid';
- /* Contextual filter: User: E-mail */
- $handler->display->display_options['arguments']['mail']['id'] = 'mail';
- $handler->display->display_options['arguments']['mail']['table'] = 'users';
- $handler->display->display_options['arguments']['mail']['field'] = 'mail';
- $handler->display->display_options['arguments']['mail']['default_action'] = 'default';
- $handler->display->display_options['arguments']['mail']['default_argument_type'] = 'php';
- $handler->display->display_options['arguments']['mail']['default_argument_options']['code'] = 'if ($account = menu_get_object(\'user\')) {
- return $account->mail;
- }
- ';
- $handler->display->display_options['arguments']['mail']['summary']['number_of_records'] = '0';
- $handler->display->display_options['arguments']['mail']['summary']['format'] = 'default_summary';
- $handler->display->display_options['arguments']['mail']['summary_options']['items_per_page'] = '25';
- $handler->display->display_options['arguments']['mail']['limit'] = '0';
- /* Display: Block */
- $handler = $view->new_display('block', 'Block', 'block');
- $views[$view->name] = $view;
- return $views;
- }
|