Quote:
Originally Posted by kh99
I'm not sure what you're trying to do, but if you put that code at hook threaddata_start then you're creating a Thread datamanager in the Thread datamanager constructor, which isn't good.
What are you doing, adding a field to the thread creation page, then trying to get the value to the database when the thread is created?
|
Sory, I confused, i have hook code to hook
misc_start
Code:
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('custom_field', $custom_field);
$threadman->save();
and hook
threaddata_start with code:
Code:
$this->validfields['custom_field'] = array(TYPE_INI, REQ_NO);
Now, i have create temp with link to update custom field. No error when click link but database not update. ???
P/S: I do not want use
Code:
UPDATE " . TABLE_PREFIX . "thread
.....