function commons_subgroups_views_default_views in Drupal Commons 6.2
Implementation of hook_views_default_views().
File
- modules/
features/ commons_subgroups/ commons_subgroups.views_default.inc, line 6
Code
function commons_subgroups_views_default_views() {
$views = array();
// Exported view: subgroups_main_listing
$view = new view();
$view->name = 'subgroups_main_listing';
$view->description = 'The main listing of all groups (optimized for subgroups)';
$view->tag = '';
$view->base_table = 'node';
$view->core = 0;
$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(
'nid' => array(
'label' => 'Nid',
'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,
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_group_image_fid' => 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,
'link_to_node' => 0,
'label_type' => 'custom',
'format' => 'group_images_medium_linked',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_group_image_fid',
'table' => 'node_data_field_group_image',
'field' => 'field_group_image_fid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'title' => array(
'label' => 'Title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'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,
'hide_alter_empty' => 1,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'tid' => array(
'label' => '',
'alter' => array(
'alter_text' => 1,
'text' => '<em>[tid]</em>',
'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' => 1,
'empty_zero' => 0,
'type' => 'separator',
'separator' => ', ',
'link_to_taxonomy' => 1,
'limit' => 0,
'vids' => array(
2 => 0,
1 => 0,
3 => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'child_count' => array(
'label' => 'Subgroups',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'groups/sub/[nid]',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'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,
'hide_alter_empty' => 1,
'exclude' => 0,
'id' => 'child_count',
'table' => 'og_subgroups',
'field' => 'child_count',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'deep' => 1,
),
'posts_count' => array(
'label' => 'Posts',
'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,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'posts_count',
'table' => 'og_statistics',
'field' => 'posts_count',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'members_count' => array(
'label' => 'Members',
'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,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'members_count',
'table' => 'og_statistics',
'field' => 'members_count',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'description' => array(
'label' => 'Description',
'alter' => array(
'alter_text' => 0,
'text' => '<div class="title">[title]</div>
<div class="tags">Tags: [tid] Sub-groups: [child_count]</div>
<div class="description">[description] </div>',
'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,
'exclude' => 0,
'id' => 'description',
'table' => 'og',
'field' => 'description',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'created' => array(
'label' => 'Created',
'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,
'date_format' => 'custom',
'custom_date_format' => 'Y-m-d',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'subscribe' => 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' => 1,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'subscribe',
'table' => 'og',
'field' => 'subscribe',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'leave_group' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'absolute' => 0,
'link_class' => '',
'alt' => '',
'rel' => '',
'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,
'hide_alter_empty' => 1,
'text' => 'Leave',
'exclude' => 0,
'id' => 'leave_group',
'table' => 'og_uid',
'field' => 'leave_group',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('sorts', array(
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'exposed' => TRUE,
'identifier' => 'unsorted',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'expose' => array(
'label' => 'Created',
'identifier' => 'created_sort',
'order' => 'unsorted',
),
),
'title' => array(
'order' => 'ASC',
'exposed' => TRUE,
'identifier' => 'unsorted',
'id' => 'title',
'table' => 'node',
'field' => 'title',
'expose' => array(
'label' => 'Title',
'identifier' => 'title_sort',
'order' => 'unsorted',
),
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'posts_count' => array(
'order' => 'DESC',
'exposed' => TRUE,
'identifier' => 'unsorted',
'id' => 'posts_count',
'table' => 'og_statistics',
'field' => 'posts_count',
'expose' => array(
'label' => 'Posts',
'identifier' => 'posts_count_sort',
'order' => 'unsorted',
),
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$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',
),
),
'type_groups_all' => array(
'id' => 'type_groups_all',
'table' => 'og',
'field' => 'type_groups_all',
'operator' => '=',
'value' => '',
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'directory' => array(
'id' => 'directory',
'table' => 'og',
'field' => 'directory',
'operator' => '=',
'value' => 1,
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'keys' => array(
'operator' => 'optional',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'keys_op',
'identifier' => 'keys',
'label' => 'Search',
'optional' => 1,
'remember' => 0,
),
'id' => 'keys',
'table' => 'search_index',
'field' => 'keys',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'selective' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'selective_op',
'identifier' => 'selective',
'label' => 'Access',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'selective',
'table' => 'og',
'field' => 'selective',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'tid_op',
'identifier' => 'tid',
'label' => 'Tags',
'optional' => 1,
'single' => 0,
'remember' => 0,
),
'type' => 'textfield',
'limit' => TRUE,
'vid' => '1',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'has_parent' => array(
'id' => 'has_parent',
'table' => 'og_subgroups',
'field' => 'has_parent',
),
));
$handler
->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('title', 'Groups');
$handler
->override_option('header_format', '1');
$handler
->override_option('header_empty', 1);
$handler
->override_option('empty', 'There are currently no groups');
$handler
->override_option('empty_format', '1');
$handler
->override_option('use_pager', '1');
$handler
->override_option('distinct', 1);
$handler
->override_option('style_plugin', 'table');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'desc',
'summary' => '',
'columns' => array(
'nid' => 'nid',
'field_group_image_fid' => 'field_group_image_fid',
'title' => 'title',
'tid' => 'title',
'child_count' => 'child_count',
'posts_count' => 'posts_count',
'members_count' => 'members_count',
'description' => 'description',
'created' => 'created',
'subscribe' => 'subscribe',
'leave_group' => 'subscribe',
),
'info' => array(
'nid' => array(
'sortable' => 1,
'separator' => '',
),
'field_group_image_fid' => array(
'separator' => '',
),
'title' => array(
'sortable' => 1,
'separator' => '<br />',
),
'tid' => array(
'separator' => '',
),
'child_count' => array(
'separator' => '',
),
'posts_count' => array(
'sortable' => 1,
'separator' => '',
),
'members_count' => array(
'sortable' => 1,
'separator' => '',
),
'description' => array(
'separator' => '',
),
'created' => array(
'sortable' => 1,
'separator' => '',
),
'subscribe' => array(
'separator' => '',
),
'leave_group' => array(
'separator' => '',
),
),
'default' => 'created',
));
$handler = $view
->new_display('feed', 'Feed', 'feed');
$handler
->override_option('sorts', array(
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$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',
),
),
'type_groups_all' => array(
'id' => 'type_groups_all',
'table' => 'og',
'field' => 'type_groups_all',
'operator' => '=',
'value' => '',
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'directory' => array(
'id' => 'directory',
'table' => 'og',
'field' => 'directory',
'operator' => '=',
'value' => 1,
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'private' => array(
'operator' => '=',
'value' => '0',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'private',
'table' => 'og',
'field' => 'private',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'view content rss feeds',
));
$handler
->override_option('items_per_page', 20);
$handler
->override_option('style_plugin', 'rss');
$handler
->override_option('style_options', array(
'mission_description' => FALSE,
'description' => '',
));
$handler
->override_option('row_plugin', 'node_rss');
$handler
->override_option('row_options', array(
'item_length' => 'default',
));
$handler
->override_option('path', 'groups/all/feed');
$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
->override_option('displays', array(
'page' => 'page',
'page_1' => 'page_1',
'default' => 0,
));
$handler
->override_option('sitename_title', FALSE);
$handler = $view
->new_display('page', 'Page', 'page_1');
$handler
->override_option('sorts', array());
$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',
),
),
'type_groups_all' => array(
'id' => 'type_groups_all',
'table' => 'og',
'field' => 'type_groups_all',
'operator' => '=',
'value' => '',
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'directory' => array(
'id' => 'directory',
'table' => 'og',
'field' => 'directory',
'operator' => '=',
'value' => 1,
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'has_parent' => array(
'operator' => '=',
'value' => '0',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'has_parent',
'table' => 'og_subgroups',
'field' => 'has_parent',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler
->override_option('path', 'groups');
$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('page', 'Subgroups', 'page_2');
$handler
->override_option('sorts', array());
$handler
->override_option('arguments', array(
'parent' => array(
'default_action' => 'not found',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => 'Groups in %1',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'og_group_types',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => FALSE,
'include_parent' => 0,
'id' => 'parent',
'table' => 'og_subgroups',
'field' => 'parent',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
2 => 0,
3 => 0,
4 => 0,
5 => 0,
),
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_activity_log_stream_owner_type' => 'user',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'discussion' => 0,
'document' => 0,
'event' => 0,
'wiki' => 0,
'group' => 0,
'notice' => 0,
'page' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
3 => 0,
2 => 0,
4 => 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' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP',
'validate_argument_group_node_type' => array(
'group' => 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',
),
),
'type_groups_all' => array(
'id' => 'type_groups_all',
'table' => 'og',
'field' => 'type_groups_all',
'operator' => '=',
'value' => '',
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
'directory' => array(
'id' => 'directory',
'table' => 'og',
'field' => 'directory',
'operator' => '=',
'value' => 1,
'group' => 0,
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'relationship' => 'none',
'expose_button' => array(
'button' => 'Expose',
),
),
));
$handler
->override_option('empty', 'There are currently no groups inside this parent group.');
$handler
->override_option('path', 'groups/sub/%');
$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',
));
$views[$view->name] = $view;
return $views;
}