badnans |
11-18-2005 10:33 AM |
Quote:
Originally Posted by MarcoH64
Could you please try to explain what you want to achieve. This sounds like it is getting very close to the borders of the license agreement.
|
Was that message for my query? If a registered user has to create a Forum Topic, is it violation of vBulletin Agreement??? :surprised:
By the way, I figured it out:
Code:
$forum = array(
'title' => 'My Forum Topic,
'description' => '',
'link' => '',
'displayorder' => 1,
'daysprune' => -1,
'parentid' => 1,
'newthreademail' => '',
'newpostemail' => '',
'options' => array(
'moderatenewpost' => 0,
'moderatenewthread' => 0,
'moderateattach' => 0,
'warnall' => 0,
'styleoverride' => 0,
'canhavepassword' => 1,
'cancontainthreads' => 0,
'active' => 1,
'allowposting' => 0,
'indexposts' => 0,
'allowhtml' => 0,
'allowbbcode' => 1,
'allowimages' => 1,
'allowsmilies' => 1,
'allowicons' => 1,
'allowratings' => 0,
'countposts' => 0,
'showonforumjump' => 1),
'styleid' => -1,
'password' => '',
);
$forumdata =& datamanager_init('Forum', $vbulletin, ERRTYPE_CP);
foreach ($forum AS $varname => $value)
{
if ($varname == 'options')
{
foreach ($value AS $key => $val)
{
$forumdata->set_bitfield('options', $key, $val);
}
}
else
{
$forumdata->set($varname, $value);
}
}
$forumid = $forumdata->save();
|