The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
This forum has it on it's main page but it uses a different name and all but I was wondering if someone could help me out with this.
This forum has a "Total Hacks: ....." - Does anyone know how to do this? If so please contact me, I would like to have it on my forums. Thanks ahead of time. |
#2
|
||||
|
||||
$counthacks=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread WHERE forumid=1');
$totalhacks=$counthacks['threads']; Change the forumid and variable names to match then stick $totalhacks into your forumhome template somewhere. |
#3
|
||||
|
||||
Code:
$totalhacks = number_format($counthacks[threads]); |
#4
|
||||
|
||||
Quote:
$totalhacks=$counthacks['threads']; can make it clear~~~thanks sorry~ i already done!! |
#5
|
|||
|
|||
I am sorry it has been a long week (even though the week is not over), could you please specify where I need to place this?
Thanks. |
#6
|
||||
|
||||
index.php
Just stick it anywhere underneath require('./global.php'); Right under would work fine. You also have to edit your forumhome template. |
#7
|
|||
|
|||
Thanks palmer, I will try this tonight, it has been pretty busy around here latley.
|
#8
|
|||
|
|||
What variables do I need to change, I have added the coding to index.php and I have edited the forumhome template but I only see a 0 - what do I need to change in the above coding?
|
#9
|
|||
|
|||
Ok nevermind the above post, I have a different problem, not the one above. Sorry about this.....
I have subforums in the forum I need this forum, when I place this to the main forum, it records '0' - how can I make it include all subforums as well?? Thanks ahead of time. |
#10
|
||||
|
||||
i want to ask if not in same forum and the code should be change
to?? forumid=1'); --this part |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|