I'm desperately trying to programmatically add a new forum (in the 194 tid specific container) on node creation with rules.
I run php script when adding new node with rules, but I'm really newbee with php. I'm trying to use form_forum_form and form_forum_submit putting this variables :
require_once 'modules/forum/forum.admin.inc';
$autoform = array(
'name' => '[node:title]',
'description' => 'Forum du projet [node:title]',
'tid' => 194,
'weight' => 0,
);
$form = forum_form_forum($form, &$form_state, $edit = $autoform);
forum_form_submit($form, &$form_state);
print_r(drupal_get_messages());
This link doesn't helped me and there is nowhere on the web where the answer is explicitely given. How to programmatically create forums and containers (not forum topics)?
Thanks for helping