DelphiVillage
Sun 24th Dec '06, 11:51am
hi people,
I am trying to create a new thread using the datamanager class instead of directly querying the database.But vBulletin always says the message (field pagetext) is to short while i'm sure that's not true
$threaddm =& datamanager_init('Thread_FirstPost',$vbulletin,ERR TYPE_ARRAY,'threadpost');
$threaddm->set('title',$newnotes);
$threaddm->set('pagetext',$messagecopy);
$threaddm->set('forumid',$destforum);
$threaddm->set('userid',$bbuserid);
$threaddm->set('open',1);
$threaddm->set('replycount',0);
$threaddm->set('dateline',TIMENOW);
$threaddm->set('views',0);
$threaddm->set('visible',1);
$threaddm->set('allowsmilie',1);
$threaddm->set_info('forum',$newforuminfo);
$threaddm->pre_save();
if(!empty($threaddm->errors))
{
print_r($threaddm->errors);
exit;
}
else
{
$newthreadid = $threaddm->save();
}
$newnotes,$messagecopy,$bbuserid,$bbusername,$newf oruminfo are defined higher into the source.The whole sourcefile is to big to post
why do i always get my message is to short ? :confused:
I am trying to create a new thread using the datamanager class instead of directly querying the database.But vBulletin always says the message (field pagetext) is to short while i'm sure that's not true
$threaddm =& datamanager_init('Thread_FirstPost',$vbulletin,ERR TYPE_ARRAY,'threadpost');
$threaddm->set('title',$newnotes);
$threaddm->set('pagetext',$messagecopy);
$threaddm->set('forumid',$destforum);
$threaddm->set('userid',$bbuserid);
$threaddm->set('open',1);
$threaddm->set('replycount',0);
$threaddm->set('dateline',TIMENOW);
$threaddm->set('views',0);
$threaddm->set('visible',1);
$threaddm->set('allowsmilie',1);
$threaddm->set_info('forum',$newforuminfo);
$threaddm->pre_save();
if(!empty($threaddm->errors))
{
print_r($threaddm->errors);
exit;
}
else
{
$newthreadid = $threaddm->save();
}
$newnotes,$messagecopy,$bbuserid,$bbusername,$newf oruminfo are defined higher into the source.The whole sourcefile is to big to post
why do i always get my message is to short ? :confused: