PDA

View Full Version : Post DataManager


01satkins
02-17-2010, 12:11 AM
Hi,

I'm using the Post DataManager to insert posts into existing threads on my board. Most of the posts go in ok, but a few seem to be getting red-flagged for spam and put in the moderation queue. The script inserts one of 5 pre-defined posts substituting in only some names in each and most of them get posted just fine. The code i'm using is below. Is there any way to disable the 'spam post' flag either on a particular user account or on posts inserted this way?

Thanks
Stewart


$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);

$postuserid = '38525';

$threadinfo = fetch_threadinfo($forumthreadid);
$foruminfo = fetch_foruminfo($threadinfo['forumid']);
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', $forumthreadid);
$postdm->set('userid', $postuserid);
$postdm->set('pagetext', $postpagetext);
$postdm->set('allowsmilie', 1);
$postdm->set('showsignature', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', TIMENOW);
$postdm->save();
unset($postdm);

Marco van Herwaarden
02-17-2010, 09:48 AM
How are they flagged?

PS The content of the posts might be the trigger to consider it spam.

01satkins
02-17-2010, 02:28 PM
I think setting the is_automated flag (something completely unreferenced in the documentation from what i could see) did the trick, need to wait and see. Thanks anyway