Advertisement
ccamara

disqus_importer

Dec 30th, 2015
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.28 KB | None | 0 0
  1. $feeds_importer = new stdClass();
  2. $feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
  3. $feeds_importer->api_version = 1;
  4. $feeds_importer->id = 'disqus_comments';
  5. $feeds_importer->config = array(
  6.   'name' => 'disqus comments',
  7.   'description' => '',
  8.   'fetcher' => array(
  9.     'plugin_key' => 'FeedsFileFetcher',
  10.     'config' => array(
  11.       'allowed_extensions' => 'txt csv tsv xml opml html htm',
  12.       'direct' => FALSE,
  13.       'directory' => 'private://feeds',
  14.       'allowed_schemes' => array(
  15.         0 => 'public',
  16.         1 => 'private',
  17.       ),
  18.     ),
  19.   ),
  20.   'parser' => array(
  21.     'plugin_key' => 'FeedsXPathParserXML',
  22.     'config' => array(
  23.       'sources' => array(
  24.         'xpathparser:0' => 'thread/dsq:id',
  25.         'xpathparser:1' => 'post/dsq:id',
  26.         'xpathparser:2' => 'name',
  27.         'xpathparser:5' => 'email',
  28.         'xpathparser:6' => 'createdAt',
  29.         'xpathparser:7' => 'parent/dsq:id',
  30.         'xpathparser:8' => 'message',
  31.       ),
  32.       'rawXML' => array(
  33.         'xpathparser:0' => 0,
  34.         'xpathparser:1' => 0,
  35.         'xpathparser:2' => 0,
  36.         'xpathparser:5' => 0,
  37.         'xpathparser:6' => 0,
  38.         'xpathparser:7' => 0,
  39.         'xpathparser:8' => 0,
  40.       ),
  41.       'context' => '',
  42.       'exp' => array(
  43.         'errors' => 1,
  44.         'debug' => array(
  45.           'context' => 'context',
  46.           'xpathparser:0' => 'xpathparser:0',
  47.           'xpathparser:1' => 'xpathparser:1',
  48.           'xpathparser:2' => 'xpathparser:2',
  49.           'xpathparser:5' => 'xpathparser:5',
  50.           'xpathparser:6' => 'xpathparser:6',
  51.           'xpathparser:7' => 'xpathparser:7',
  52.           'xpathparser:8' => 'xpathparser:8',
  53.         ),
  54.       ),
  55.       'allow_override' => 1,
  56.     ),
  57.   ),
  58.   'processor' => array(
  59.     'plugin_key' => 'FeedsCommentProcessor',
  60.     'config' => array(
  61.       'mappings' => array(
  62.         0 => array(
  63.           'source' => 'xpathparser:0',
  64.           'target' => 'nid',
  65.           'unique' => FALSE,
  66.         ),
  67.         1 => array(
  68.           'source' => 'xpathparser:1',
  69.           'target' => 'cid',
  70.           'unique' => FALSE,
  71.         ),
  72.         2 => array(
  73.           'source' => 'xpathparser:2',
  74.           'target' => 'name',
  75.           'unique' => FALSE,
  76.         ),
  77.         3 => array(
  78.           'source' => 'xpathparser:5',
  79.           'target' => 'user_mail',
  80.           'unique' => FALSE,
  81.         ),
  82.         4 => array(
  83.           'source' => 'xpathparser:6',
  84.           'target' => 'created',
  85.           'unique' => FALSE,
  86.         ),
  87.         5 => array(
  88.           'source' => 'xpathparser:7',
  89.           'target' => 'pid',
  90.           'unique' => FALSE,
  91.         ),
  92.         6 => array(
  93.           'source' => 'xpathparser:8',
  94.           'target' => 'thread',
  95.           'unique' => FALSE,
  96.         ),
  97.       ),
  98.       'update_existing' => '0',
  99.       'update_non_existent' => 'skip',
  100.       'input_format' => 'plain_text',
  101.       'skip_hash_check' => 0,
  102.       'bundle' => 'comment_node_articles',
  103.       'expire' => '-1',
  104.       'author' => 0,
  105.       'authorize' => 0,
  106.     ),
  107.   ),
  108.   'content_type' => '',
  109.   'update' => 0,
  110.   'import_period' => 1800,
  111.   'expire_period' => 3600,
  112.   'import_on_create' => TRUE,
  113.   'process_in_background' => FALSE,
  114. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement