Log in

View Full Version : Change stats in attachments.php


0ptima
05-02-2005, 12:44 AM
In admincp/attachments.php, you can see the top 5 attachment stats for largest pictures, users who use the most space, etc. I want to change this to the top 25.

Here is the code I modified. The 25s in bold were originally a 5. After making the change from 5 to 25, it still shows five. Im on VB 307


$largestuser=$DB_site->query("
SELECT COUNT(postid) AS count, SUM(filesize) AS totalsize, user.userid, username
FROM " . TABLE_PREFIX . "attachment AS attachment, " . TABLE_PREFIX . "user AS user
WHERE user.userid= attachment.userid
GROUP BY attachment.userid
HAVING totalsize > 0
ORDER BY totalsize DESC
LIMIT 25
");
$position = 0;

print_table_header($vbphrase['five_users_most_attachment_space'], 25);
print_cells_row(array($vbphrase['user_rank'], $vbphrase['username'], $vbphrase['attachments'], $vbphrase['total_size'], ' '), 1);
while($thispop=$DB_site->fetch_array($largestuser))
{
$position++;
$cell = array();
$cell[] = $position . '.';
$cell[] = "<a href=\"user.php?$session[sessionurl]do=edit&amp;userid=$thispop[userid]\">$thispop[username]</a>";
$cell[] = vb_number_format($thispop['count']);
$cell[] = vb_number_format($thispop['totalsize'], 1, true);
$cell[] = '<span class="smallfont">' . construct_link_code($vbphrase['view_attachments'], "attachment.php?$session[sessionurl]do=search&amp;search[attachedby]=" . urlencode($thispop['username'])) . '</span>';
print_cells_row($cell);
}
print_table_footer();


The bold does not work. The 25 used to be a 5