$view = new view; $view->name = 'og_my_titles'; $view->description = 'List user\'s subscribed groups, provide link to manage subscription and member title'; $view->tag = 'og_titles'; $view->view_php = ''; $view->base_table = 'node'; $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( 'nid' => array( 'label' => 'Group node', 'required' => 0, 'id' => 'nid', 'table' => 'og_uid_titles', 'field' => 'nid', 'relationship' => 'none', ), 'uid' => array( 'label' => 'Group Member', 'required' => 0, 'id' => 'uid', 'table' => 'og_uid_titles', 'field' => 'uid', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Group', 'relationship' => 'none', 'link_to_node' => 1, ), 'managelinkmy' => array( 'label' => 'Manage', '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' => 'managelinkmy', 'table' => 'og_uid', 'field' => 'managelinkmy', 'relationship' => 'uid', ), )); $handler->override_option('sorts', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', ), )); $handler->override_option('arguments', array( 'nid' => array( 'default_action' => 'ignore', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'breadcrumb' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', 'break_phrase' => 0, 'not' => 0, 'id' => 'nid', 'table' => 'og_uid', 'field' => 'nid', 'validate_user_argument_type' => 'uid', 'validate_user_roles' => array( '2' => 0, '3' => 0, ), 'relationship' => 'uid', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'product' => 0, 'destination' => 0, 'group' => 0, 'page' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '1' => 0, '2' => 0, ), 'validate_argument_type' => 'tid', 'validate_argument_transform' => 0, 'validate_user_restrict_roles' => 0, 'validate_argument_node_flag_name' => '*relationship*', 'validate_argument_node_flag_test' => 'flaggable', 'validate_argument_node_flag_id_type' => 'id', 'validate_argument_user_flag_name' => '*relationship*', 'validate_argument_user_flag_test' => 'flaggable', 'validate_argument_user_flag_id_type' => 'id', 'validate_argument_is_member' => 0, 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', 'operator' => '=', 'value' => 1, 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'relationship' => 'none', 'expose_button' => array( 'button' => 'Expose', ), ), 'uid' => array( 'operator' => '=', 'value' => '1', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'uid', 'table' => 'og_uid', 'field' => 'uid', 'relationship' => 'uid', 'expose_button' => array( 'button' => 'Expose', ), 'override' => array( 'button' => 'Override', ), ), )); $handler->override_option('access', array( 'type' => 'role', 'role' => array( '2' => 2, '1' => 0, ), 'perm' => 'view advanced help topic', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'My groups'); $handler->override_option('empty', 'Not a member of any groups.'); $handler->override_option('empty_format', '1'); $handler->override_option('items_per_page', 50); $handler->override_option('use_pager', '1'); $handler->override_option('use_more', 1); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'override' => 1, 'order' => 'asc', 'columns' => array( 'title' => 'title', 'name' => 'name', 'managelink' => 'managelink', ), 'info' => array( 'title' => array( 'sortable' => 1, 'separator' => '', ), 'name' => array( 'sortable' => 1, 'separator' => '', ), 'managelink' => array( 'separator' => '', ), ), 'default' => 'title', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'og/my'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'My groups', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Block', 'block_1'); $handler->override_option('fields', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Group', 'relationship' => 'none', 'link_to_node' => 1, ), 'post_count_new' => array( 'label' => 'New', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => '', 'exclude' => 0, 'id' => 'post_count_new', 'table' => 'og', 'field' => 'post_count_new', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'title' => array( 'order' => 'ASC', 'id' => 'title', 'table' => 'node', 'field' => 'title', 'override' => array( 'button' => 'Use default', ), 'relationship' => 'none', ), )); $handler->override_option('use_pager', '0'); $handler->override_option('block_description', 'My groups'); $handler->override_option('block_caching', -1);