PDA

View Full Version : Get threadid once thread is created?


encryption
06-30-2010, 09:32 PM
I'm still a modder noob and am having a hard time figuring this out... I have added a new field to my newthread template, and what I want to do is update a custom table with once the thread has been created with the new threa'ds threadid and the value from that custom field.

I think I've narrowed the hook down to the newthread_post_complete hook, and I'm a pretty decent php programmer and can handle the SQL update once I get the value, but I just don't know enough about vbulletin to grab that new thread id once it is added. Can someone help me here?

I have looked at the article How to: Add additional fields (http://www.vbulletin.com/forum/showthread.php?344984-How-to-Add-additional-fields) but it seems add your field to the main thread table via the internal query update... it says nothing about grabbing data for your own table. :confused:

I hope this makes sense, and thanks!

encryption
07-05-2010, 11:46 PM
Anybody? :erm:

COL NIL SATIS
07-06-2010, 12:52 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=245608" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=245608</a>

its the number in the url m8

so this thread id is 245608

encryption
07-06-2010, 07:23 PM
I understand that part... but how can I grab that number with some custom php code in a plugin at the newthread_post_complete hook?

Thanks!

Adrian Schneider
07-06-2010, 07:25 PM
$newpost['threadid']
$threadinfo['threadid']

encryption
07-08-2010, 01:43 AM
$newpost worked. Thank you!