$view = new view; $view->name = 'ur_associates'; $view->description = 'Shows user\'s associates'; $view->tag = ''; $view->view_php = ''; $view->base_table = 'user_relationships'; $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('relationships', array( 'requestee_id' => array( 'label' => 'requestee', 'required' => 0, 'id' => 'requestee_id', 'table' => 'user_relationships', 'field' => 'requestee_id', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'name' => array( 'label' => '', 'link_to_user' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'relationship' => 'requestee_id', 'override' => array( 'button' => 'Override', ), ), 'rtype' => array( 'label' => 'Relationship type', '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, ), 'name_field' => 'name', 'exclude' => 0, 'id' => 'rtype', 'table' => 'user_relationships', 'field' => 'rtype', 'relationship' => 'none', ), 'updated_at' => array( 'label' => 'Added', 'date_format' => 'time ago', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'updated_at', 'table' => 'user_relationships', 'field' => 'updated_at', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'picture' => array( 'label' => 'Picture', '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, ), 'exclude' => 0, 'id' => 'picture', 'table' => 'users', 'field' => 'picture', 'relationship' => 'requestee_id', ), )); $handler->override_option('sorts', array( 'name' => array( 'order' => 'ASC', 'id' => 'name', 'table' => 'users', 'field' => 'name', 'relationship' => 'requestee_id', ), )); $handler->override_option('arguments', array( 'requester_id' => array( 'default_action' => 'default', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'default_argument_type' => 'user', 'default_argument' => '', 'validate_type' => 'numeric', 'validate_fail' => 'not found', 'break_phrase' => 0, 'not' => 0, 'id' => 'requester_id', 'table' => 'user_relationships', 'field' => 'requester_id', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'blog' => 0, 'page' => 0, 'story' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array(), 'validate_argument_type' => 'tid', 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'approved' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'approved', 'table' => 'user_relationships', 'field' => 'approved', 'relationship' => 'none', ), 'rtype' => array( 'operator' => 'in', 'value' => array( '0' => '1', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'rtype', 'table' => 'user_relationships', 'field' => 'rtype', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'Relationships'); $handler->override_option('items_per_page', 30); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'grouping' => 'plural_name', 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array( 'name_1' => 'name_1', ), 'separator' => ', ', )); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'user/%/myassociates'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'Associates', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Block by user', 'block_2'); $handler->override_option('title', 'Related users'); $handler->override_option('style_options', array( 'grouping' => '', 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array(), 'separator' => '', )); $handler->override_option('block_description', 'Display user\'s relationships grouped by user'); $handler->override_option('block_caching', -1);