PDA

View Full Version : i don't get it ?


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:

SSSlippy
Tue 26th Dec '06, 10:49am
A post to go to vbulletin be default will require a min of 10 chars. This should be changable in the options panel.

DelphiVillage
Tue 26th Dec '06, 12:28pm
A post to go to vbulletin be default will require a min of 10 chars. This should be changable in the options panel.

Yeah True it is "message posting interface options" I'm coming from the old fashioned way (directly query the database) to the datamanager classes so i must of overlooked something

Colin F
Wed 27th Dec '06, 5:01am
Echo the content of $messagecopy when it errors to debug it.

If you don't find the issue there, I think you can add this line to skip that check:

$threaddm->set_info('skip_charcount', true);