Log in

View Full Version : Can't get info for custom thread field to save to DB


wholemama
02-27-2006, 06:53 PM
Ok...searched like a good little girl, found this https://vborg.vbsupport.ru/showthread.php?t=95343&highlight=thread+field, followed it...and nada. It always adds the DB default value of '0', not the radio buttons.

What am I doing wrong??

1. Added field to DB
2. Added radio buttons to template for new thread (haven't even begun on edits
3. Added hooks:

newpost_process

if ($type == 'thread')
{
$dataman->setr('newfield', $post['newfield']);
}

newreply_post_start

$vbulletin->input->clean_array_gpc('p', array('newfield', TYPE_INT));
$newpost['newfield'] =& $vbulletin->GPC['newfield'];

threaddata_start

$this->validfields['newfield'] = array(TYPE_INT, REQ_YES);

threadpfdata_start

$this->validfields['newfield'] = array(TYPE_INT, REQ_YES);

Marco van Herwaarden
02-28-2006, 01:18 PM
Where are you setting the value for $post['newfield']?