Found a bug when sorting the logs by ip address:
Quote:
Invalid SQL:
SELECT * FROM vbstopforumspam_log AS logs
ORDER BY ip ASC, date DESC
LIMIT 0, 15;
MySQL Error : Unknown column 'ip' in 'order clause'
|
Here's the fix:
Inside /admincp/vbstopforumspam.php:
Find:
Quote:
switch($vbulletin->GPC['orderby'])
{
case 'ip':
$order = 'ip ASC, date DESC';
break;
case 'email':
$order = 'email ASC, date DESC';
break;
case 'username':
$order = 'username ASC, date DESC';
break;
case 'date':
default:
$order = 'date DESC';
}
|
and change like this:
Quote:
switch($vbulletin->GPC['orderby'])
{
case 'ipaddress':
$order = 'ipaddress ASC, date DESC';
break;
case 'email':
$order = 'email ASC, date DESC';
break;
case 'username':
$order = 'username ASC, date DESC';
break;
case 'date':
default:
$order = 'date DESC';
}
|
Then find this line:
Quote:
$headings[] = "<a href=\"vbstopforumspam.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&pp=" . $vbulletin->GPC['perpage'] . "&orderby=ip&page=" . $vbulletin->GPC['pagenumber'] . "\">IP Address</a>";
|
and change it to this:
Quote:
$headings[] = "<a href=\"vbstopforumspam.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&pp=" . $vbulletin->GPC['perpage'] . "&orderby=ipaddress&page=" . $vbulletin->GPC['pagenumber'] . "\">IP Address</a>";
|
Works perfect now. Great add on by the way.