The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm unsure if this is a hack request , or simply a php issue
I need a query that will assign a variable to the total number of replies a member has made in that thread. I want to put a entry in the postbit so that you can see how many replies the member has posted in that thread. Not a rolling total, just the total, so if he posted 4 replies to that thread, you will see "4 replies" in the postbit on everyone post he makes in that thread. Is this possible with a query ? Thanks for all assistance given ![]() |
#2
|
|||
|
|||
![]()
[sql]
SELECT COUNT(*) FROM post WHERE userid=$userid AND threadid=$threadid [/sql] |
#3
|
||||
|
||||
![]()
Be aware that is one query per post per thread. That can add up.
|
#4
|
|||
|
|||
![]()
I don't know why you'd want it in the first place, there's the Who Posted? popup...
|
#5
|
|||
|
|||
![]()
Thank-you for your comments and help. but
ok, where do I put this ?? Would it make any difference if I were to say I only really need this variable assigning if the member has more than X ammount of replies ( replies not starting post ) in that thread. I want to be able to look at a thread and see who are the main contributors to that thread. I could use logican's template hack so that the postbit changes dependant on how many replies they have. So I could say hard code a value of say 10 I would then be able to easily see which members had 10 replies to that thread and it would be obvious to the main contributers. Hope this makes sense |
#6
|
||||
|
||||
![]()
Here you go..
And it's optimized so that it wont add a SQL query per post. It just adds 1 query for thread in thread view (which is inevitable).. Enjoy.. |
#7
|
|||
|
|||
![]()
stunning m8, thanks m8
I'll give it a whirl and let you know how i get on. Once again thanks |
#8
|
||||
|
||||
![]()
Logician to the rescue once again...
![]() |
#9
|
|||
|
|||
![]()
He sure was
Its works a treat, and yes only one more query I do have one further query though, Can this now be used with your dynamic templates hack ? [[($post[howmanypost]>10])]] Major Thread Contributor [[/($post[howmanypost]>10])]] Would this be correct ? |
#10
|
||||
|
||||
![]() Quote:
![]() If you want to apply the modification in the hack code (so as not to need advanced templates hack), find: PHP Code:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|