Hello,

I am trying to create a custom PHP parser, but i can't get it to work.

Here my code :



/**
 * Implementation of hook_feeds_plugins().
 */
function feeds_php_parser_feeds_plugins() {
  $info = array();

  $info['FeedsPHPParser'] = array(
    'name'        => t('PHP Parser'),
    'description' => t('Parse anything using PHP custom code.'),
    'handler'     => array(
      'parent' => 'FeedsParser',
      'class'  => 'FeedsPHPParser',
      'file'   => 'FeedsPHPParser.inc',
      'path'   => drupal_get_path('module', 'feeds_php_parser'),
    ),
  );
  return $info;
}

/**
 * Implementation of hook_enable().
 *
 * Clear Feed's plugin cache so that this plugin shows up.
 */
function feeds_php_parser_enable() {
  cache_clear_all('plugins:feeds:plugins', 'cache');
}


/**
 * Example of a CTools plugin hook that needs to be implemented to make
 * hook_feeds_plugins() discoverable by CTools and Feeds. The hook specifies
 * that the hook_feeds_plugins() returns Feeds Plugin API version 1 style
 * plugins.
 */
function feeds_php_parser_ctools_plugin_api($owner, $api) {
  if ($owner == 'feeds' && $api == 'plugins') {
    return array('version' => 1);
  }
}

Do you see where the problem is ?

Comments

fishclic’s picture

Assigned: Unassigned » fishclic
Priority: Normal » Minor

Nevermind, i uninstalled the module, cleared the cache et re-actived it.
Now it works.

fishclic’s picture

Status: Active » Closed (fixed)