Active
Project:
FeedAPI
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2008 at 14:36 UTC
Updated:
20 Nov 2008 at 14:36 UTC
I can't seem to find a way to interact with the node submission that happens when a new node is created from feed items.
I've got my own module with an implementation of hook_nodeapi, but when the node is created, the submit-action is not taken - thus I can't change things for that node when it is created.
I hacked it so that I put my code to the insert-case and modified the $node object there, but the insert is not called when the items are refreshed/updated.
Here's an example of Mailhandler module - this way I could add my ownmodule_mailhandler function and change the node before it is created.
// modules may override node elements before submitting. they do so by returning the node.
foreach (module_list() as $name) {
if (module_hook($name, 'mailhandler')) {
$function = $name .'_mailhandler';
if (!($node = $function($node, $result, $i, $header, $mailbox))) {
// Exit if a module has handled the submitted data.
break;
}
}
}