Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 22 Jan 2009, 19:43
CompiledMonkey CompiledMonkey is offline
 
Join Date: Jan 2003
Real name: Chris Stewart
In "newreply_post_complete", how can I get the post number for the given thread?

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?
Reply With Quote
  #2  
Old 23 Jan 2009, 05:03
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
The value is not actually calculated at that point. It would require fetching all the posts in the thread and counting it.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 23 Jan 2009, 14:05
CompiledMonkey CompiledMonkey is offline
 
Join Date: Jan 2003
Real name: Chris Stewart
Yeah, I actually found it in the newreply_post_complete hook as "$threadinfo['replycount']".
Reply With Quote
  #4  
Old 24 Jan 2009, 04:50
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
"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.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Thread Enhancements Show Adsense After post number "x" and "x" mcyates vBulletin 3.7 Add-ons 11 13 Jul 2009 21:45
Show Thread Enhancements Show Adsense After post number "x" and "x" mcyates vBulletin 3.6 Template Modifications 17 08 Jul 2008 19:25



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:50.

Layout Options | Width: Wide Color: