Log in

View Full Version : Automatic Thread Creation


atrljoe
04-25-2008, 11:09 PM
I am trying to have thread automatically created when it is someones birthday. Right now it just updates the Title and doesnt add a reply to the thread this is code the I have for the reply part:
build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);

$dataman =& datamanager_init('Post', $vbulletin, ERRTYPE_CP, 'threadpost');
$dataman->set_info('forum', $foruminfo);
$dataman->set_info('thread', $threadinfo);
$dataman->set('threadid', $birthdaythreadid);
$dataman->set('parentid', 677708);
$dataman->setr('userid', $userinfo['userid']);
$dataman->setr('pagetext', $message);
$dataman->set('visible', 1);
$dataman->set('allowsmilie', 1);
$postid = $dataman->save();

Any help is greatly accepted :)

Opserty
04-26-2008, 09:09 AM
Thread Creation: https://vborg.vbsupport.ru/showthread.php?t=102418&page=3#39
Post Creation: Create Posts (https://vborg.vbsupport.ru/showthread.php?t=102418)

atrljoe
04-27-2008, 02:22 PM
Does this work for 3.7?

Opserty
04-27-2008, 03:04 PM
Should do.