Use article as default content type for common operations.
[project/feeds.git] / feeds_import / feeds_import.feeds_importer_default.inc
CommitLineData
7f33f0c4
AB
1<?php
2
3/**
4 * Implementation of hook_feeds_importer_default().
5 */
6function feeds_import_feeds_importer_default() {
7 $export = array();
8 $feeds_importer = new stdClass;
9 $feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
10 $feeds_importer->api_version = 1;
11 $feeds_importer->id = 'node';
12 $feeds_importer->config = array(
13 'name' => 'Node import',
14 'description' => 'Import nodes from CSV file.',
15 'fetcher' => array(
16 'plugin_key' => 'FeedsFileFetcher',
17 'config' => array(
18 'direct' => FALSE,
19 ),
20 ),
21 'parser' => array(
22 'plugin_key' => 'FeedsCSVParser',
23 'config' => array(
24 'delimiter' => ',',
25 ),
26 ),
27 'processor' => array(
28 'plugin_key' => 'FeedsNodeProcessor',
29 'config' => array(
c2d476c3 30 'content_type' => 'article',
7f33f0c4
AB
31 'update_existing' => 1,
32 'expire' => '-1',
33 'mappings' => array(
34 '0' => array(
35 'source' => 'title',
36 'target' => 'title',
37 'unique' => FALSE,
38 ),
39 '1' => array(
40 'source' => 'body',
41 'target' => 'body',
42 'unique' => FALSE,
43 ),
44 '2' => array(
45 'source' => 'published',
46 'target' => 'created',
47 'unique' => FALSE,
48 ),
49 '3' => array(
50 'source' => 'guid',
51 'target' => 'guid',
52 'unique' => 1,
53 ),
54 ),
55 'input_format' => 0,
56 'author' => 0,
57 ),
58 ),
59 'content_type' => '',
60 'update' => 0,
61 'import_period' => '-1',
62 'expire_period' => 3600,
63 'import_on_create' => 1,
64 );
65
66 $export['node'] = $feeds_importer;
67 $feeds_importer = new stdClass;
68 $feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
69 $feeds_importer->api_version = 1;
70 $feeds_importer->id = 'user';
71 $feeds_importer->config = array(
72 'name' => 'User import',
73 'description' => 'Import users from CSV file.',
74 'fetcher' => array(
75 'plugin_key' => 'FeedsFileFetcher',
76 'config' => array(
77 'direct' => FALSE,
78 ),
79 ),
80 'parser' => array(
81 'plugin_key' => 'FeedsCSVParser',
82 'config' => array(
83 'delimiter' => ',',
84 ),
85 ),
86 'processor' => array(
87 'plugin_key' => 'FeedsUserProcessor',
88 'config' => array(
89 'roles' => array(),
90 'update_existing' => FALSE,
91 'status' => 1,
92 'mappings' => array(
93 '0' => array(
94 'source' => 'name',
95 'target' => 'name',
96 'unique' => 0,
97 ),
98 '1' => array(
99 'source' => 'mail',
100 'target' => 'mail',
101 'unique' => 1,
102 ),
103 '2' => array(
104 'source' => 'created',
105 'target' => 'created',
106 'unique' => FALSE,
107 ),
108 ),
109 ),
110 ),
111 'content_type' => '',
112 'update' => 0,
113 'import_period' => '-1',
114 'expire_period' => 3600,
115 'import_on_create' => 1,
116 );
117
118 $export['user'] = $feeds_importer;
119 return $export;
120}