In a custom module for drupal 4.7 I hacked together a node object and passed it to node_save($node) to create nodes. This hack appears to no longer work in drupal 6. While I’m sure this hack could be fixed I’m curious if there is a standard solution to create nodes without a form. In this case the data is pulled in from a custom feed on another website.
Share
I don’t know of a standard API for creating a node pragmatically. But this is what I’ve gleaned from building a module that does what you’re trying to do.
node_add()andnode_form())node_object_prepare()so other modules can add to the $node object.