You, sir, are a gentleman and a scholar. This worked beautifully:
Code:
$tdm =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$threadinfo = verify_id('thread', $threadid, 0, 1);
$foruminfo = fetch_foruminfo($threadinfo['forumid']);
$userinfo = fetch_userinfo($userid);
$tdm->set_info('user', $userinfo);
$tdm->set_info('forum', $foruminfo);
$tdm->set_info('thread', $threadinfo);
$tdm->set('userid', $userid);
$tdm->set('pagetext', $text);
$tdm->set('allowsmilie', 1);
$tdm->set('visible', 1);
$tdm->set('threadid', $threadid);
$tdm->set('dateline', $date);
$tdm->save();
require_once(DIR . '/includes/functions_databuild.php');
build_thread_counters($threadid);
build_forum_counters(19);