PDA

View Full Version : Total Submission Recieved Hack?


SaintDog
11-13-2001, 06:31 PM
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.

Palmer ofShinra
11-14-2001, 09:01 AM
$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.

Admin
11-14-2001, 09:42 AM
$totalhacks = number_format($counthacks[threads]);
Use number_format() to improve readability. :)

squawell
11-14-2001, 01:16 PM
Originally posted by Palmer ofShinra
$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.

what place input this$counthacks=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread WHERE forumid=1');
$totalhacks=$counthacks['threads'];

can make it clear~~~thanks

sorry~ i already done!!

SaintDog
11-14-2001, 09:58 PM
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.

Palmer ofShinra
11-15-2001, 09:50 AM
index.php

Just stick it anywhere underneath
require('./global.php');

Right under would work fine.

You also have to edit your forumhome template.

SaintDog
11-15-2001, 05:56 PM
Thanks palmer, I will try this tonight, it has been pretty busy around here latley.

SaintDog
11-15-2001, 11:04 PM
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?

SaintDog
11-15-2001, 11:07 PM
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.

squawell
11-16-2001, 04:50 PM
i want to ask if not in same forum and the code should be change

to??

forumid=1'); --this part

SaintDog
11-17-2001, 02:55 AM
Anyone know how to make it work in the main forum and all sub-forums?

Help is appreciated,

Thanks,