function node_gallery_views_default_views in Node Gallery 6.3
Same name and namespace in other branches
- 7 includes/views/node_gallery.views_default.inc \node_gallery_views_default_views()
Implements hook_views_default_views().
File
- views2inc/
node_gallery.views_default.inc, line 12 - Installs all default views included in node_gallery.
Code
function node_gallery_views_default_views() {
/*
* View 'node_gallery_blocks'
*/
$view = new view();
$view->name = 'node_gallery_blocks';
$view->description = 'Blocks for Node Gallery';
$view->tag = 'node_gallery';
$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(
'gid' => array(
'id' => 'gid',
'table' => 'node_gallery_images',
'field' => 'gid',
),
));
$handler
->override_option('fields', array(
'title' => array(
'label' => 'Gallery',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'gid',
),
'title_1' => array(
'label' => 'Image',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title_1',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_node_gallery_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_linked',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'gid' => array(
'operator' => '>',
'value' => array(
'value' => '0',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'gid',
'table' => 'node_gallery_images',
'field' => 'gid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'status_1' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_1',
'table' => 'node',
'field' => 'status',
'relationship' => 'gid',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'view node gallery',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('style_plugin', 'grid');
$handler
->override_option('style_options', array(
'grouping' => '',
'columns' => '4',
'alignment' => 'horizontal',
));
$handler = $view
->new_display('block', 'Node Gallery Random Image Block', 'block_1');
$handler
->override_option('sorts', array(
'random' => array(
'order' => 'ASC',
'id' => 'random',
'table' => 'views',
'field' => 'random',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler
->override_option('title', 'Random Image');
$handler
->override_option('items_per_page', 1);
$handler
->override_option('block_description', 'Random image (Node Gallery)');
$handler
->override_option('block_caching', -1);
$handler = $view
->new_display('block', 'Node Gallery Latest Image Block', 'block_2');
$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('title', 'Latest Image');
$handler
->override_option('items_per_page', 1);
$handler
->override_option('block_description', 'Latest image (Node Gallery)');
$handler
->override_option('block_caching', -1);
$views[$view->name] = $view;
/*
* View 'node_gallery_gallery_image_views'
*/
$view = new view();
$view->name = 'node_gallery_gallery_image_views';
$view->description = 'Views of images meant to be attached to a gallery parent view';
$view->tag = 'node_gallery_images';
$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', 'Default', 'default');
$handler
->override_option('relationships', array(
'gid' => array(
'label' => 'Parent Gallery',
'required' => 1,
'id' => 'gid',
'table' => 'node_gallery_images',
'field' => 'gid',
'relationship' => 'none',
),
));
$handler
->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 1,
'max_length' => '10',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'field_node_gallery_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_linked',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'relationship' => 'none',
),
));
$handler
->override_option('sorts', array(
'weight' => array(
'order' => 'ASC',
'id' => 'weight',
'table' => 'node_gallery_images',
'field' => 'weight',
'relationship' => 'none',
),
'nid' => array(
'order' => 'DESC',
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'none',
),
));
$handler
->override_option('arguments', array(
'nid' => array(
'default_action' => 'not found',
'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' => 'node',
'field' => 'nid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'4' => 0,
'3' => 0,
),
'relationship' => 'gid',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'product' => 0,
'photograph' => 0,
'product_kit' => 0,
'cck_gallery' => 0,
'cck_image' => 0,
'event' => 0,
'node_gallery_gallery' => 0,
'node_gallery_image' => 0,
'page' => 0,
'story' => 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_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_php' => '',
),
));
$handler
->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'view node gallery',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('items_per_page', 0);
$handler
->override_option('use_pager', '0');
$handler
->override_option('style_plugin', 'grid');
$handler
->override_option('style_options', array(
'grouping' => '',
'columns' => '6',
'alignment' => 'horizontal',
));
$handler = $view
->new_display('page', 'View all image thumbnails', 'page_1');
$handler
->override_option('use_ajax', TRUE);
$handler
->override_option('items_per_page', 24);
$handler
->override_option('use_pager', '1');
$handler
->override_option('path', 'gallery_grid/%');
$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', 'View images teaser', 'page_2');
$handler
->override_option('items_per_page', 6);
$handler
->override_option('use_pager', FALSE);
$handler
->override_option('path', 'gallery_image_teaser/%');
$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', 'View images teaser with AJAX pager', 'page_3');
$handler
->override_option('use_ajax', TRUE);
$handler
->override_option('items_per_page', 6);
$handler
->override_option('use_pager', '1');
$handler
->override_option('path', 'gallery_image_teaser_ajax/%');
$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', 'View all image thumbnails -> Lightbox2 display', 'page_4');
$handler
->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'field_node_gallery_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'imagefield__lightbox2__node-gallery-thumbnail__node-gallery-display',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
));
$handler
->override_option('path', 'gallery_lightbox2/%');
$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', 'View images teaser (cover only)', 'page_5');
$handler
->override_option('relationships', array(
'gid' => array(
'label' => 'Parent Gallery',
'required' => 1,
'id' => 'gid',
'table' => 'node_gallery_images',
'field' => 'gid',
'relationship' => 'none',
),
'cover_image' => array(
'label' => 'Gallery Cover Image',
'required' => 0,
'id' => 'cover_image',
'table' => 'node_gallery_galleries',
'field' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'gid',
),
));
$handler
->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 1,
'max_length' => '10',
'word_boundary' => 0,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
),
'field_node_gallery_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' => 0,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_linked',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'relationship' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
),
));
$handler
->override_option('items_per_page', 1);
$handler
->override_option('path', 'gallery_image_teaser_cover/%');
$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', 'View cover image', 'page_6');
$handler
->override_option('relationships', array(
'gid' => array(
'label' => 'Parent Gallery',
'required' => 1,
'id' => 'gid',
'table' => 'node_gallery_images',
'field' => 'gid',
'relationship' => 'none',
),
'cover_image' => array(
'label' => 'Gallery Cover Image',
'required' => 0,
'id' => 'cover_image',
'table' => 'node_gallery_galleries',
'field' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'gid',
),
));
$handler
->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 1,
'max_length' => '10',
'word_boundary' => 0,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
),
'field_node_gallery_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' => 0,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_linked',
'multiple' => array(
'group' => 0,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'relationship' => 'cover_image',
'override' => array(
'button' => 'Use default',
),
),
));
$handler
->override_option('items_per_page', 1);
$handler
->override_option('path', 'gallery_cover/%');
$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', 'Image Sort', 'page_7');
$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' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler
->override_option('path', 'ng_sort');
$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;
/*
* View 'node_gallery_gallery_summaries'
*/
$view = new view();
$view->name = 'node_gallery_gallery_summaries';
$view->description = 'Various views of your galleries';
$view->tag = 'node_gallery_galleries';
$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(
'cover_image' => array(
'label' => 'Gallery Cover Image',
'required' => 0,
'id' => 'cover_image',
'table' => 'node_gallery_galleries',
'field' => 'cover_image',
'override' => array(
'button' => 'Override',
),
'relationship' => 'gid',
),
));
$handler
->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'none',
),
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]',
'link_class' => '',
'alt' => 'View [title]',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 1,
'max_length' => '10',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'image_count' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '(',
'suffix' => ' Photos)',
'exclude' => 0,
'id' => 'image_count',
'table' => 'node_gallery_galleries',
'field' => 'image_count',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_node_gallery_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]',
'link_class' => '',
'alt' => 'View [title]',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'relationship' => 'cover_image',
'override' => array(
'button' => 'Override',
),
),
));
$handler
->override_option('sorts', array(
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('arguments', array(
'uid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'Everyone',
'title' => '%1\'s Galleries',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'user',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'validate_user_argument_type' => 'either',
'validate_user_roles' => array(
'2' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => 'all',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'node_gallery_gallery' => 0,
'node_gallery_image' => 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_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_php' => '',
'override' => array(
'button' => 'Override',
),
),
'type' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => '',
'title' => '%1\'s %2 Galleries',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'type',
'table' => 'node',
'field' => 'type',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => 'all',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'node_gallery_gallery' => 0,
'node_gallery_image' => 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_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_php' => '',
),
));
$handler
->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'gid' => array(
'operator' => '>',
'value' => array(
'value' => '0',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'gid',
'table' => 'node_gallery_galleries',
'field' => 'gid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'view node gallery',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('items_per_page', 20);
$handler
->override_option('use_pager', '1');
$handler
->override_option('distinct', 0);
$handler
->override_option('style_options', array(
'grouping' => 'title_1',
));
$handler
->override_option('row_options', array(
'inline' => array(),
'separator' => '',
));
$handler = $view
->new_display('page', 'Galleries Teaser List', 'page_1');
$handler
->override_option('relationships', array());
$handler
->override_option('title', 'Gallery List');
$handler
->override_option('style_options', array(
'grouping' => 'title',
));
$handler
->override_option('row_plugin', 'node');
$handler
->override_option('row_options', array(
'relationship' => 'gid',
'build_mode' => 'teaser',
'links' => 1,
'comments' => 0,
));
$handler
->override_option('path', 'node_galleries');
$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', 'Galleries Cover Grid', 'page_4');
$handler
->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'gid',
'override' => array(
'button' => 'Use default',
),
),
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => 'node/[nid]',
'link_class' => '',
'alt' => 'View [title]',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 1,
'max_length' => '10',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
'image_count' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '(',
'suffix' => ' images)',
'exclude' => 0,
'id' => 'image_count',
'table' => 'node_gallery_galleries',
'field' => 'image_count',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_node_gallery_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]',
'link_class' => '',
'alt' => 'View the [title] gallery',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 0,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'node-gallery-thumbnail_default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_node_gallery_image_fid',
'table' => 'node_data_field_node_gallery_image',
'field' => 'field_node_gallery_image_fid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'cover_image',
),
));
$handler
->override_option('title', 'Gallery Summary');
$handler
->override_option('style_plugin', 'grid');
$handler
->override_option('style_options', array(
'grouping' => '',
'columns' => '4',
'alignment' => 'horizontal',
));
$handler
->override_option('row_options', array(
'inline' => array(
'title' => 'title',
'image_count' => 'image_count',
),
'separator' => ' ',
));
$handler
->override_option('path', 'node_galleries_grid');
$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', 'My Galleries Grid', 'page_2');
$handler
->override_option('title', 'My Galleries');
$handler
->override_option('style_plugin', 'grid');
$handler
->override_option('style_options', array(
'grouping' => '',
'columns' => '4',
'alignment' => 'horizontal',
));
$handler
->override_option('path', 'my_galleries_grid');
$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', 'My Galleries List', 'page_3');
$handler
->override_option('title', 'My Galleries');
$handler
->override_option('row_plugin', 'node');
$handler
->override_option('row_options', array(
'relationship' => 'none',
'build_mode' => 'teaser',
'links' => 1,
'comments' => 0,
));
$handler
->override_option('path', 'my_galleries');
$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;
}