there is an error in the logic. At the properties you can limit displaying referrers what will be necessary to prevent from loosing your footer. If you limit to e.g. 100 referrers the amount of referrers will also be limited to 100. See the bit of code below:
Code:
if ($vbulletin->options['referrers_last_x_referrers'])
{
// Pull all the referrers and counts from the db, limiting the retrieval count if necessary
$get_referrers = $vbulletin->db->query_read("
SELECT " . $referrers_db_select . "
FROM " . TABLE_PREFIX . "referrers
ORDER BY url DESC
LIMIT " . $vbulletin->options['referrers_last_x_referrers'] . "
");
}
else
{
// Pull all the referrers and counts from the db
$get_referrers = $vbulletin->db->query_read("
SELECT " . $referrers_db_select . "
FROM " . TABLE_PREFIX . "referrers
ORDER BY url DESC
");
}
// Count the entries, wouldn't usually bother with an sql instead of just $i++ but it's used in several places plus the template.
$url_count = mysql_num_rows($get_referrers);