The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Thread count
Hello
I need mod that show in the profil hiw mach Thread (not post) the user have can someone help? |
#2
|
||||
|
||||
SELECT COUNT(*) FROM thread WHERE postuserid=$userinfo[user]
That's it - basically. Just wrap it in a few Bits of PHP to format it nicely, put the Variable in Template MEMBERINFO and you're done. Note: This does not care for deleted or moderated Threads. If you don't want to count them a few more conditions are required for the query. |
#3
|
|||
|
|||
I came looking for something like this.
But I think I'm in over my head. I want to display a particular thread count on the forum index - forumhome I guess it's called. I'm new to php. I can follow someone's code and figure out what it does and modify it to suit my needs, but I can't really start my own. Could I impose on you or someone else to supply an example? Much appreciated. |
#4
|
||||
|
||||
Quote:
|
#5
|
|||
|
|||
Sorry, I guess I was vague because I understand how the query should look from your earlier post.
The part I'm having trouble with is the code to make it all show up on a page.. Anyway, what I would like to be able to do is have something that says, "There are ## open posts in the XYZ forum." And have that placed somewhere just under the navbar... but once I see the code, I'll know how to move it where I need it - or at least I'll figure it out - eventually... I went and looked through code to see how things are "printed to the screen" but got lost... is it the show command? Time for some php lessons I guess... Thanks again for any help. oh, and the query I'm thinking I will need is: SELECT COUNT(*) FROM thread WHERE forumid=## AND open=1 Where ## is the forum id number of interest. Is that close? |
#6
|
|||
|
|||
In php (put it in a plugin):
PHP Code:
HTML Code:
$mydata[mycount] |
#7
|
|||
|
|||
Thanks, this helps a lot.
I'm pretty good at figuring out the behind the scenes system stuff, but as soon as I have to format something for output... I get lost. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|