PDA

View Full Version : Thread Numbers!


lordofgun
03-02-2002, 05:06 PM
We recently purged some of our older threads, and we lost about 50,000 thread counts. is there any way to adjust the number of total threads and posts on the forum home page?

HELP IS APPRECIATED!

BB Insider
03-02-2002, 09:02 PM
This is the reply I received which isnt any help...
We left that box alone and still lost post and thread totals when we purged. How can we go into the index to re-add these numbers?
Anyone here?

Hello Rick,

Purging or pruning threads, as you know, removes them from the database. Since there are less threads in the database, the counts that show how many threads there are in the database are naturally going to be lower.

We allow you to prune or delete threads because it would be rather silly if you couldn't delete threads, wouldn't it? Most people never need to prune; vBulletin can handle in excess of 3 million posts with no problems.

As to post counts, there is a warning near the Update Post Counts item that warns you that your users will drop counts if you run it after pruning. As you have found out, we are not kidding. We only provide it because some users asked for it, especially when importing. Under normal circumstances you should not run it.

You can edit index.php and forumdisplay.php to "fudge" the numbers but you will need to seek assistance at vBulletin.org with this because it is hacking.

Please let me know if you require any further assistance.

All the best,
Kevin Schumacher
Support Team, vBulletin

Admin
03-03-2002, 08:55 AM
Replace this in index.php:
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
with this:
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']+100000);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']+50000);
This'll add 100,000 more posts and 50,000 more threads.

BB Insider
03-03-2002, 05:45 PM
Anyone?

The Realist
03-03-2002, 05:53 PM
Can this be done with how many members a forum has? can that be incresed?

Thanks,

Brian


Originally posted by FireFly
Replace this in index.php:
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
with this:
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']+100000);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']+50000);
This'll add 100,000 more posts and 50,000 more threads.

BB Insider
03-03-2002, 06:02 PM
I did this and it broke my board.
www.BuffaloRange.com

The Realist
03-03-2002, 06:09 PM
Did you make a backup of the original index file. I always copy any files that need hacking to my computer and then rename the one on the server to I.E.

index.php
to
index.php1

and then upload the changed file back to the server.

If it does not work then all I gota do is rename the original file back yo E.G. index.php and you back to were you started.

Did you do a backup?

Brian
Originally posted by BB Insider
I did this and it broke my board.
www.BuffaloRange.com

Admin
03-03-2002, 06:18 PM
Originally posted by BB Insider
I did this and it broke my board.
www.BuffaloRange.com
Nothing to do with this hack, look at the error message.

BB Insider
03-03-2002, 07:05 PM
There is no error message, no back up either. I did what fly said, changed the numbers and refreshed the index and now theres no home page.

The Realist
03-03-2002, 08:03 PM
Have you the original zipped files from VB. Install the index file from that and it should work.

The only drawback is that any hacks that need changes to that index file will have to be re done.

There are 2 lines that look very similar in the index.php (not admin index.php) so make sure you have changed the correct area.



Originally posted by BB Insider
There is no error message, no back up either. I did what fly said, changed the numbers and refreshed the index and now theres no home page.

lordofgun
03-04-2002, 01:22 AM
thanks guys! Firefly, you are a mother hacker!

Admin
03-04-2002, 11:28 AM
Originally posted by lordofgun
Firefly, you are a mother hacker!
:eek: