[support] Automatically creating nodes.

Gottwig, Jeremy M. (GSFC-272.0)[ZIMMERMAN & ASSOC.] jeremy.m.gottwig at nasa.gov
Tue Jul 13 20:02:12 UTC 2010


What about:

$nodeArray = array(
    'type' => 'nodetype',
    'status' => '1',
    'promote' => '0',
    'uid' => $user->uid,
);
node_validate($nodeArray);
$node = node_submit($nodeArray);
node_save($node);

You could run your data through a function like that; should work for what you're trying to do (if I'm reading your question right).

From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Mutuku Ndeti
Sent: Tuesday, July 13, 2010 3:44 PM
To: support
Subject: [support] Automatically creating nodes.

Hello,

I have an application that I want to link to a drupal site. I want to have nodes autocreated using data from the application. Is there an API for autocreating nodes in drupal?

Mutuku
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100713/b8edb9ed/attachment.html 


More information about the support mailing list