![]() |
Help update using datamanager
pls help me Update custom field in Thread using datamanager. I have user code
PHP Code:
|
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? |
Quote:
Code:
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost'); Code:
$this->validfields['custom_field'] = array(TYPE_INI, REQ_NO); P/S: I do not want use Code:
UPDATE " . TABLE_PREFIX . "thread |
Try replacing all instances of "custom field" with "custom_field"...you cannot have spaces embedded in variable names. :D
|
Quote:
|
Hmm...ok. Well, there is no TYPE_INI, maybe you mean TYPE_INT. But I don't know if that would stop it from working. Are you sure $threadinfo is set? You might have to set that yourself. Or it might be enough to just do something like
Code:
$threadman->set_existing(array('threadid' => $threadid)); |
All times are GMT. The time now is 02:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|