Log in

View Full Version : getting threadid immediately after new thread created


SDB
08-23-2007, 12:32 PM
Hi

I want to run a query as soon as anyone creates a new thread, the query will include the ID of the newly created thread.

Which hook should I use, and how do I access the threadid?

TIA

calorie
08-23-2007, 12:56 PM
Look in the newthread.php file for the following:

// ### NOT PREVIEW - ACTUAL POST ###
$threadinfo = fetch_threadinfo($newpost['threadid']);

SDB
08-23-2007, 01:01 PM
thank you, perfect.

a hook immediately after that line is : newthread_post_complete

which works a treat :)