1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* feeds_news.feeds_importer_default.inc
|
5
|
*/
|
6
|
|
7
|
/**
|
8
|
* Implements hook_feeds_importer_default().
|
9
|
*/
|
10
|
function feeds_news_feeds_importer_default() {
|
11
|
$export = array();
|
12
|
|
13
|
$feeds_importer = new stdClass();
|
14
|
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
|
15
|
$feeds_importer->api_version = 1;
|
16
|
$feeds_importer->id = 'feed';
|
17
|
$feeds_importer->config = array(
|
18
|
'name' => 'Feed',
|
19
|
'description' => 'Import RSS or Atom feeds, create nodes from feed items.',
|
20
|
'fetcher' => array(
|
21
|
'plugin_key' => 'FeedsHTTPFetcher',
|
22
|
'config' => array(
|
23
|
'auto_detect_feeds' => 1,
|
24
|
'use_pubsubhubbub' => 0,
|
25
|
'designated_hub' => '',
|
26
|
),
|
27
|
),
|
28
|
'parser' => array(
|
29
|
'plugin_key' => 'FeedsSyndicationParser',
|
30
|
'config' => array(),
|
31
|
),
|
32
|
'processor' => array(
|
33
|
'plugin_key' => 'FeedsNodeProcessor',
|
34
|
'config' => array(
|
35
|
'bundle' => 'feed_item',
|
36
|
'update_existing' => '0',
|
37
|
'expire' => '-1',
|
38
|
'mappings' => array(
|
39
|
0 => array(
|
40
|
'source' => 'title',
|
41
|
'target' => 'title',
|
42
|
'unique' => FALSE,
|
43
|
),
|
44
|
1 => array(
|
45
|
'source' => 'timestamp',
|
46
|
'target' => 'created',
|
47
|
'unique' => FALSE,
|
48
|
),
|
49
|
2 => array(
|
50
|
'source' => 'url',
|
51
|
'target' => 'url',
|
52
|
'unique' => 1,
|
53
|
),
|
54
|
3 => array(
|
55
|
'source' => 'guid',
|
56
|
'target' => 'guid',
|
57
|
'unique' => 1,
|
58
|
),
|
59
|
4 => array(
|
60
|
'source' => 'description',
|
61
|
'target' => 'field_feed_item_description',
|
62
|
'unique' => FALSE,
|
63
|
),
|
64
|
),
|
65
|
'input_format' => 'filtered_html',
|
66
|
'author' => 0,
|
67
|
),
|
68
|
),
|
69
|
'content_type' => 'feed',
|
70
|
'update' => 0,
|
71
|
'import_period' => '1800',
|
72
|
'expire_period' => 3600,
|
73
|
'import_on_create' => 1,
|
74
|
'process_in_background' => FALSE,
|
75
|
);
|
76
|
$export['feed'] = $feeds_importer;
|
77
|
|
78
|
$feeds_importer = new stdClass();
|
79
|
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
|
80
|
$feeds_importer->api_version = 1;
|
81
|
$feeds_importer->id = 'opml';
|
82
|
$feeds_importer->config = array(
|
83
|
'name' => 'OPML import',
|
84
|
'description' => 'Import subscriptions from OPML files. Use together with "Feed" configuration.',
|
85
|
'fetcher' => array(
|
86
|
'plugin_key' => 'FeedsFileFetcher',
|
87
|
'config' => array(
|
88
|
'direct' => FALSE,
|
89
|
),
|
90
|
),
|
91
|
'parser' => array(
|
92
|
'plugin_key' => 'FeedsOPMLParser',
|
93
|
'config' => array(),
|
94
|
),
|
95
|
'processor' => array(
|
96
|
'plugin_key' => 'FeedsNodeProcessor',
|
97
|
'config' => array(
|
98
|
'bundle' => 'feed',
|
99
|
'update_existing' => 0,
|
100
|
'expire' => '-1',
|
101
|
'mappings' => array(
|
102
|
0 => array(
|
103
|
'source' => 'title',
|
104
|
'target' => 'title',
|
105
|
'unique' => FALSE,
|
106
|
),
|
107
|
1 => array(
|
108
|
'source' => 'xmlurl',
|
109
|
'target' => 'feeds_source',
|
110
|
'unique' => 1,
|
111
|
),
|
112
|
),
|
113
|
),
|
114
|
),
|
115
|
'content_type' => '',
|
116
|
'update' => 0,
|
117
|
'import_period' => '-1',
|
118
|
'expire_period' => 3600,
|
119
|
'import_on_create' => 1,
|
120
|
);
|
121
|
$export['opml'] = $feeds_importer;
|
122
|
|
123
|
return $export;
|
124
|
}
|