View Single Post
  #1  
Old 05-02-2005, 12:44 AM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change stats in attachments.php

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

PHP Code:
    $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'], 1true);
        
$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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01080 seconds
  • Memory Usage 1,789KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete