Quote:
Originally Posted by Boofo
Ok, change this query:
PHP Code:
// <!-- TOP THREAD STARTER -->
$topstarter=$DB_site->query_first("
SELECT COUNT(*) AS count,postuserid,postusername
FROM " . TABLE_PREFIX . "thread
GROUP BY postuserid
ORDER BY count
DESC LIMIT 1
");
to this:
PHP Code:
// <!-- TOP THREAD STARTER -->
$topstarter=$DB_site->query_first("
SELECT COUNT(*) AS count,postuserid,postusername
FROM " . TABLE_PREFIX . "thread
WHERE postuserid <> 0
GROUP BY postuserid
ORDER BY count
DESC LIMIT 1
");
As far as the uderids going to an error page, delete the following from the index.php:
PHP Code:
$statscache['topposterid'] = vb_number_format($statscache['topposterid']);
$statscache['topstartid'] = vb_number_format($statscache['topstartid']);
$statscache['getfileviewsid'] = vb_number_format($statscache['getfileviewsid']);
$statscache['topreferrerid'] = vb_number_format($statscache['topreferrerid']);
$statscache['toprepid'] = vb_number_format($statscache['toprepid']);
I forgot to take that code out when I released the hack. Sorry about that. That should fix everything. Let me know for sure.
|
Now I get this:
Code:
Database error in vBulletin 3.0.0:
Invalid SQL:
SELECT COUNT(*) AS count,postuserid,postusername
FROM thread
WHERE usergroupid IN (2,5,6,7)
GROUP BY postuserid
ORDER BY count
DESC LIMIT 1
mysql error: Unknown column 'usergroupid' in 'where clause'
mysql error number: 1054
Date: Wednesday 24th of March 2004 03:03:48 AM
Script: http://www.spassforen.de/forum/index.php?
Username: Alex
IP Address: xxx.xxx.xxx.xxx