The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Very easy question - for someone who knows :-)
I have added a field ['newfield_id'] onto the threads table and can happily save data to it from the 'newpost_complete' hook/plugin.
My problem is i cant work out how to retrieve the data using the data manager: I want to assign the value in the ['newfield_id'] field to the var $newfield for the current thread (attached to showthread_start hook) Heres what I have so far: $thread =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost'); if ($type == 'thread') { $thread->set_existing($dataman->thread); } else { $thread->set_existing($threadinfo); } // this is my problem line - tried allsort and clearly this doesnt work $newfield=$thread->$existing['newfield_id']; Any any appreciated. Terry sorted - although I guess not very elegant. $postdm =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); $threadarray = $vbulletin->db->query_read(" SELECT newfield_id FROM thread WHERE threadid = ".$threadid." limit 1"); while($thread = $vbulletin->db->fetch_array($threadarray)) { $newfield = $thread['newfield_id']; } |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|