$view = new view; $view->name = 'export'; $view->description = ''; $view->tag = ''; $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( 'path' => array( 'id' => 'path', 'table' => 'node', 'field' => 'path', ), 'body' => array( 'id' => 'body', 'table' => 'node_revisions', 'field' => 'body', ), 'moderate' => array( 'id' => 'moderate', 'table' => 'node', 'field' => 'moderate', ), 'nid' => array( 'id' => 'nid', 'table' => 'node', 'field' => 'nid', ), 'created' => array( 'id' => 'created', 'table' => 'node', 'field' => 'created', ), 'promote' => array( 'id' => 'promote', 'table' => 'node', 'field' => 'promote', ), 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', ), 'teaser' => array( 'id' => 'teaser', 'table' => 'node_revisions', 'field' => 'teaser', ), 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', ), 'type' => array( 'id' => 'type', 'table' => 'node', 'field' => 'type', ), 'changed' => array( 'id' => 'changed', 'table' => 'node', 'field' => 'changed', ), 'last_updated' => array( 'id' => 'last_updated', 'table' => 'node_comment_statistics', 'field' => 'last_updated', ), 'field_image_fid' => array( 'label' => 'Image', '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' => 0, 'label_type' => 'widget', 'format' => 'url_plain', 'multiple' => array( 'group' => 1, 'multiple_number' => '', 'multiple_from' => '', 'multiple_reversed' => 0, ), 'exclude' => 0, 'id' => 'field_image_fid', 'table' => 'node_data_field_image', 'field' => 'field_image_fid', 'relationship' => 'none', ), 'format_name' => array( 'label' => 'Format d\'entrée', '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, 'exclude' => 0, 'id' => 'format_name', 'table' => 'node_revisions', 'field' => 'format_name', 'relationship' => 'none', ), 'log' => array( 'label' => 'Message de journal', '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, 'exclude' => 0, 'id' => 'log', 'table' => 'node_revisions', 'field' => 'log', 'relationship' => 'none', ), 'title_1' => array( 'label' => 'Titre', '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' => 0, 'link_to_node_revision' => 0, 'exclude' => 0, 'id' => 'title_1', 'table' => 'node_revisions', 'field' => 'title', 'relationship' => 'none', ), 'vid' => array( 'label' => 'Vid', '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, 'exclude' => 0, 'id' => 'vid', 'table' => 'node_revisions', 'field' => 'vid', 'relationship' => 'none', ), 'language' => array( 'label' => 'Langue', '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' => 0, 'native_language' => 0, 'exclude' => 0, 'id' => 'language', 'table' => 'node', 'field' => 'language', 'relationship' => 'none', ), 'tid' => array( 'label' => 'All terms', '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, 'type' => 'separator', 'separator' => ', ', 'link_to_taxonomy' => 1, 'limit' => 0, 'vids' => array( 1 => 0, ), 'exclude' => 0, 'id' => 'tid', 'table' => 'term_node', 'field' => 'tid', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'perm', 'perm' => 'administer nodes', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('items_per_page', 0); $handler = $view->new_display('views_data_export', 'Data export', 'views_data_export_1'); $handler->override_option('items_per_page', '0'); $handler->override_option('style_plugin', 'views_data_export_xml'); $handler->override_option('style_options', array( 'mission_description' => FALSE, 'description' => '', 'attach_text' => 'XML', 'provide_file' => 0, 'filename' => '%view.xml', 'help' => '', 'parent_sort' => 0, 'transform' => 1, 'transform_type' => 'dash', 'root_node' => 'nodes', 'item_node' => 'node', )); $handler->override_option('row_plugin', ''); $handler->override_option('path', 'export/data'); $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_1' => 'page_1', 'default' => 0, )); $handler->override_option('sitename_title', FALSE); $handler->override_option('use_batch', 'no_batch'); $handler->override_option('segment_size', '100'); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('filters', array( 'nid' => array( 'operator' => '>', 'value' => array( 'value' => '0', 'min' => '', 'max' => '', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'nid_op', 'identifier' => 'nid', 'label' => 'Node: Nid', 'optional' => 1, 'remember' => 0, ), 'id' => 'nid', 'table' => 'node', 'field' => 'nid', 'relationship' => 'none', ), 'created' => array( 'operator' => '=', 'value' => array( 'type' => 'offset', 'value' => '', 'min' => '', 'max' => '', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'created_op', 'identifier' => 'created', 'label' => 'Node: Post date', 'optional' => 1, 'remember' => 1, ), 'id' => 'created', 'table' => 'node', 'field' => 'created', 'relationship' => 'none', ), 'status' => array( 'operator' => '=', 'value' => FALSE, 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => FALSE, 'operator' => '', 'identifier' => 'status', 'label' => 'Publié', 'remember' => FALSE, 'single' => TRUE, 'optional' => FALSE, ), 'id' => 'status', 'table' => 'node', 'field' => 'status', ), 'title' => array( 'operator' => 'allwords', 'value' => '', 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'title_op', 'identifier' => 'title', 'label' => 'Node: Titre', 'remember' => 1, ), 'case' => 1, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', ), 'type' => array( 'operator' => 'in', 'value' => array( 'story' => 'story', 'page' => 'page', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 0, 'operator' => 'type_op', 'identifier' => 'type', 'label' => 'Node: Type', 'optional' => 1, 'single' => 1, 'remember' => 1, 'reduce' => 0, ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), 'changed' => array( 'operator' => '=', 'value' => array( 'type' => 'offset', 'value' => '', 'min' => '', 'max' => '', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 1, 'operator' => 'changed_op', 'identifier' => 'changed', 'label' => 'Node: Updated date', 'optional' => 1, 'remember' => 0, ), 'id' => 'changed', 'table' => 'node', 'field' => 'changed', 'relationship' => 'none', ), )); $handler->override_option('path', 'export'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Export', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler = $view->new_display('page', 'JSON', 'page_2'); $handler->override_option('arguments', array( 'nid' => array( 'id' => 'nid', 'table' => 'node', 'field' => 'nid', ), )); $handler->override_option('style_plugin', 'views_json'); $handler->override_option('style_options', array( 'root_object' => 'nodes', 'top_child_object' => 'node', 'field_output' => 'raw', 'plaintext_output' => 0, 'format' => 'simple', 'jsonp_prefix' => '', 'content_type' => 'default', 'using_views_api_mode' => 0, )); $handler->override_option('path', 'export/json'); $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', ));