View Full Version : In "newreply_post_complete", how can I get the post number for the given thread?
CompiledMonkey
01-22-2009, 05:43 PM
I'd like to grab the post number of the new post that has just been created. Anyone know what variable I can use to grab it? I've tried:
$post['postcount']
$postcount
$threadinfo['postcount']
$postcount_query['count']
And they each return nothing. Thoughts?
Dismounted
01-23-2009, 03:03 AM
The value is not actually calculated at that point. It would require fetching all the posts in the thread and counting it.
CompiledMonkey
01-23-2009, 12:05 PM
Yeah, I actually found it in the newreply_post_complete hook as "$threadinfo['replycount']".
Dismounted
01-24-2009, 02:50 AM
"replycount" is the total number of replies in the thread. But I guess that will work in your situation as it is the latest reply.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.