Quote:
Originally Posted by ragtek
with this code:
PHP Code:
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$forumid = $vbulletin->GPC['fid']; // can also be a number ;) $forumdid= 12;
$foruminfo = fetch_foruminfo($forumid);
$threaddm->set_info('forum', $foruminfo);
$threaddm->set('forumid', $foruminfo['forumid']);
$threaddm->set('userid', 1234);
$threaddm->set('title', 'Testtitle');
$threaddm->set('pagetext', 'a little test');
$threaddm->set('allowsmilie', 1);
$threaddm->set('visible', 1);
$threaddm->set('dateline', TIMENOW);
$threaddm->save();
if you need the threadid save it with
PHP Code:
$id = $threaddm->save();
|
this works but how can I also set the prefix? added a prefix line returns an error
--------------- Added [DATE]1241372989[/DATE] at [TIME]1241372989[/TIME] ---------------
found it. you have to use "prefixid" & you set it to the prefix var. like this
$threaddm->set('prefixid', 'report');
I'm using this for our mod forum so alerted posts or pms have prefixes