scoutz
08-10-2008, 08:10 PM
I'm trying to set the bitfield options for a script im writing that creates new forums from non-vb pages.
$userdata =& datamanager_init('Forum', $vbulletin, ERRTYPE_SILENT);
$userdata->set('title', $serie['name']);
$userdata->set('title_clean', $serie['name']);
$userdata->set('description', 'Discuss the '.$serie['name']);
$userdata->set('description_clean', 'Discuss the '.$serie['name'];
$userdata->set('parentid', $forumnumber);
//this does not work
$vars = array('active' => 1);
$userdata->set('options', $vars);
$userdata->save();
unset($userdata);
I'm trying to set the options data which I want to be set at 97991 (Act as Forum=1, Forum is Active =1, Forum is Open =1,Index New Posts=1 etc.).
I've tried several values for the options field, nothing worked.
As described in the class_dm_forum.php datamanager class for forum.
var $validfields = array(
'options' => array(TYPE_ARRAY_BOOL, REQ_AUTO),
Anyone knows how to get the options bitfield working here?
Kind regards,
vincent
$userdata =& datamanager_init('Forum', $vbulletin, ERRTYPE_SILENT);
$userdata->set('title', $serie['name']);
$userdata->set('title_clean', $serie['name']);
$userdata->set('description', 'Discuss the '.$serie['name']);
$userdata->set('description_clean', 'Discuss the '.$serie['name'];
$userdata->set('parentid', $forumnumber);
//this does not work
$vars = array('active' => 1);
$userdata->set('options', $vars);
$userdata->save();
unset($userdata);
I'm trying to set the options data which I want to be set at 97991 (Act as Forum=1, Forum is Active =1, Forum is Open =1,Index New Posts=1 etc.).
I've tried several values for the options field, nothing worked.
As described in the class_dm_forum.php datamanager class for forum.
var $validfields = array(
'options' => array(TYPE_ARRAY_BOOL, REQ_AUTO),
Anyone knows how to get the options bitfield working here?
Kind regards,
vincent