function views_atom_test_views_default_views in Views Atom 6
Implementation of hook_views_default_views().
File
- tests/
views_atom_test/ views_atom_test.views_default.inc, line 6
Code
function views_atom_test_views_default_views() {
$views = array();
// Exported view: views_atom_test
$view = new view();
$view->name = 'views_atom_test';
$view->description = 'Simple feed for testing purposes';
$view->tag = 'simpletest';
$view->base_table = 'node';
$view->core = 6;
$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(
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'teaser' => array(
'label' => 'Summary',
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'exclude' => 0,
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'path' => array(
'label' => 'URL',
'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,
'absolute' => 0,
'exclude' => 0,
'id' => 'path',
'table' => 'node',
'field' => 'path',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'changed' => array(
'label' => 'Updated date',
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'changed',
'table' => 'node',
'field' => 'changed',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'created' => array(
'label' => 'Published',
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'name' => array(
'label' => 'Author Name',
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'link_to_user' => 0,
'overwrite_anonymous' => 0,
'anonymous_text' => '',
'exclude' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'mail' => array(
'label' => 'Author E-mail',
'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' => 0,
'ellipsis' => 0,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
'link_to_user' => '0',
'exclude' => 0,
'id' => 'mail',
'table' => 'users',
'field' => 'mail',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'uid' => array(
'label' => 'Author URL',
'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_user' => 0,
'exclude' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'none',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler = $view
->new_display('feed', 'Feed', 'feed_1');
$handler
->override_option('style_plugin', 'atom_fields');
$handler
->override_option('style_options', array(
'mission_description' => FALSE,
'description' => array(
'feed_description' => '',
),
'entry_type' => 'text',
'entry_type_custom' => '',
'fields' => array(
'atom_title' => 'title',
'atom_summary' => 'teaser',
'atom_url' => 'path',
'atom_updated' => 'changed',
'atom_published' => 'created',
'atom_author' => 'name',
'atom_author_email' => 'mail',
'atom_author_url' => 'uid',
),
'guid' => array(
'use_existing_from_feed' => 0,
),
));
$handler
->override_option('row_plugin', 'rdf_node');
$handler
->override_option('path', 'views_atom_test/feed.xml');
$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());
$handler
->override_option('sitename_title', FALSE);
$views[$view->name] = $view;
return $views;
}