-Add field to databaseSee KirbyDE's post above (best done with install code though)
-Add the form element to newthread...Edit the newthread template and add your field.
-Clean data, place into GPC array:Hook: newthread_post_start
PHP Code:
$vbulletin->input->clean_array_gpc('p', array(
'fieldname' => TYPE_UINT
));
$newpost['fieldname'] = $vbulletin->GPC['fieldname'];
-Set datamanager value:Hook: newpost_process
PHP Code:
if ($type == 'thread')
{
$dataman->setr('fieldname', $post['fieldname']);
}
-Validate the field for the datamanger (if you don't you get an error):
Hook: threadfpdata_start
PHP Code:
$this->validfields['fieldname'] = array(TYPE_UINT, REQ_NO);
-Replace every occurance of "fieldname" with your form element name (preferably have it the same as the database field you make), and also replace every occurance of TYPE_UINT with how you want to clean your data.