Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Attachment Statistics Details »»
Attachment Statistics
Version: 1.00, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-21-2004 Last Update: 12-21-2004 Installs: 14
DB Changes
Is in Beta Stage  
No support by the author.

This modification will add a new collapsable box thingie just below your forum stats. Great if your site focuses on attachments. Most of this was by request here https://vborg.vbsupport.ru/showthread.php?t=73023

Please backup your database before installing.


Includes:
Total files on the server
Space used by Attachments
Total Downoads
Total Downloaded Today

2 Files to edit: vbroot/index.php, vbtroot/attachment.php
1 Queries: (pulled from cache)
1 Templates to edit: FORUMHOME

Update: The query for Total Downloads Today was not functioning correctly so I had to update it. If you've installed this already, go into your phpmyadmin and remove the timestamp table from attachmentviews then re-edit your attachments.php and add the updated query according to the updated readme.txt

I had this moved to beta as I am still working on the query, keep in mind that I may have to change this again. If you want to help test though, that's great.

See attached file, please click install if you find it useful

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-22-2004, 12:45 AM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cheers m8 seen it to late so will install 2morow and report back.
Thanks for all your help on this as well m8
Reply With Quote
  #3  
Old 12-22-2004, 01:55 AM
N8's Avatar
N8 N8 is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack

*installs*
Reply With Quote
  #4  
Old 12-22-2004, 02:34 PM
ChrisSy ChrisSy is offline
 
Join Date: Mar 2002
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this *install*
Reply With Quote
  #5  
Old 12-22-2004, 03:03 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simple and useful.

[high]* dndog clicks install. [/high]
Reply With Quote
  #6  
Old 12-22-2004, 08:43 PM
PcFreak's Avatar
PcFreak PcFreak is offline
 
Join Date: May 2003
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to show the traffic, too.
Use this query:

PHP Code:
//Traffic            
    
$transfer $DB_site->query("
            SELECT SUM( counter * filesize )
            FROM " 
TABLE_PREFIX "attachment
            "
);        
    
$transferall = @substr($transfer 104857603); 
The var $transferall show you all traffic (download traffic) for the attachments in the database in MB:

PcFreak
Reply With Quote
  #7  
Old 12-22-2004, 09:17 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! Great addition

Anyway I can use that same formatting to get this query to pull the last 24 hours correctly? This is currently not working right, the timestamp is a table I added to the attachmentviews.

Code:
//Total Downloads Today
$total_today = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'attachmentviews
WHERE timestamp >= "' . strtotime("-1day") . '"
');
$total_today = number_format($total_today['count']);
//Total Downloads today
Reply With Quote
  #8  
Old 01-18-2005, 09:23 PM
Snatch Snatch is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack do not count the downloads tody. Why this ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03973 seconds
  • Memory Usage 2,266KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete