Permalink
Fetching contributors…
Cannot retrieve contributors at this time
345 lines (340 sloc) 9.21 KB
<?php
/**
* Implementation of hook_views_default_views().
*/
function atrium_profile_views_default_views() {
$views = array();
// Exported view: profile_display
$view = new view;
$view->name = 'profile_display';
$view->description = 'Atrium > Profile';
$view->tag = 'atrium';
$view->view_php = '';
$view->base_table = 'users';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'picture' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'imagecache_preset' => 'user-m',
'exclude' => 0,
'id' => 'picture',
'table' => 'users',
'field' => 'picture',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'name' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_user' => 0,
'overwrite_anonymous' => 0,
'anonymous_text' => '',
'exclude' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'uid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1',
'breadcrumb' => '',
'default_argument_type' => 'user',
'default_argument' => '',
'validate_type' => 'useringroups',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'4' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'book' => 0,
'event' => 0,
'feed_ical' => 0,
'feed_ical_item' => 0,
'casetracker_basic_case' => 0,
'casetracker_basic_project' => 0,
'group' => 0,
'profile' => 0,
'feed' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_is_member' => 0,
'validate_argument_php' => '',
),
));
$handler->override_option('access', array(
'type' => 'perm',
'perm' => 'access user profiles',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('items_per_page', 1);
$handler = $view->new_display('page', 'Profile', 'page_1');
$handler->override_option('path', 'user/%');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view->new_display('attachment', 'Profile fields', 'attachment_1');
$handler->override_option('relationships', array(
'content_profile_rel' => array(
'label' => 'Content Profile',
'required' => 1,
'type' => 'profile',
'id' => 'content_profile_rel',
'table' => 'users',
'field' => 'content_profile_rel',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'mail' => array(
'label' => 'E-mail',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_user' => 'mailto',
'exclude' => 0,
'id' => 'mail',
'table' => 'users',
'field' => 'mail',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'title' => array(
'label' => 'Full name',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Use default',
),
),
'field_profile_organization_value' => array(
'id' => 'field_profile_organization_value',
'table' => 'node_data_field_profile_organization',
'field' => 'field_profile_organization_value',
'relationship' => 'content_profile_rel',
),
'field_profile_telephone_value' => array(
'id' => 'field_profile_telephone_value',
'table' => 'node_data_field_profile_telephone',
'field' => 'field_profile_telephone_value',
'relationship' => 'content_profile_rel',
),
'field_profile_url_value' => array(
'id' => 'field_profile_url_value',
'table' => 'node_data_field_profile_url',
'field' => 'field_profile_url_value',
'relationship' => 'content_profile_rel',
),
'field_profile_address_value' => array(
'label' => 'Address',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_profile_address_value',
'table' => 'node_data_field_profile_address',
'field' => 'field_profile_address_value',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('filters', array(
'nid' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'nid',
'table' => 'node_access',
'field' => 'nid',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Use default',
),
),
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'content_profile_rel',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', FALSE);
$handler->override_option('inherit_pager', FALSE);
$handler->override_option('render_pager', TRUE);
$handler->override_option('displays', array(
'default' => 'default',
'page_1' => 'page_1',
));
$translatables['profile_display'] = array(
t('Defaults'),
t('Profile'),
t('Profile fields'),
);
$views[$view->name] = $view;
return $views;
}