vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Upload/Download Stats in Postbit (https://vborg.vbsupport.ru/showthread.php?t=74335)

lasto 01-14-2005 05:07 PM

Quote:

Originally Posted by ChrisSy
you installed and works fine?

Well downloads works but for me im having problems still as its counting up 3 for every 2 files i upload + the KB aint matching up.

So far ive uploaded 28 small rar files but it thinks ive upped 56
Download bit seems fine by what i can tell.

kudos 01-14-2005 09:04 PM

I'm having a bit of a problem, don't know if anyone can help? I can't semm to get it to work at all as I recieve the error message below when running the first query...

"An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'myforumsname.user' doesn't exist"

Any help would be appreciated:)

Lethal 01-15-2005 08:45 AM

nice forums u have there

tnguy3n 01-15-2005 07:58 PM

sorry guys, my mysql server on localhost ain't let me upload files bigger than 600 KB (get error says localhost server has been gone for any big file :rolleyes: ) and I can't test those big uploaded files now. I'll check with my *nix server and fix that upload stats problem. :)

lasto 01-15-2005 11:03 PM

Quote:

Originally Posted by tnguy3n
sorry guys, my mysql server on localhost ain't let me upload files bigger than 600 KB (get error says localhost server has been gone for any big file :rolleyes: ) and I can't test those big uploaded files now. I'll check with my *nix server and fix that upload stats problem. :)

cheers m8

Joe Pimms 02-16-2005 04:29 AM

hey nice hack i did a little moding and i made one for the memberslist area aswell the only problem im having is the data base hope u can help here is the template code for the memberslist display.

PHP Code:

Edit MEMBERLISTlook for this :

<if 
condition="$show['emailcol']"><td class="thead" nowrap="nowrap">$vbphrase[contact]</td></if>

and 
replace with :
<
td class="thead">File Upload</td>
<
td class="thead">Total Uploaded in (KB)</td>
<
td class="thead">File Download</td>
<
td class="thead">Total Download in (KB)</td>

<if 
condition="$show['emailcol']"><td class="thead" nowrap="nowrap">$vbphrase[contact]</td></if> 

then:

PHP Code:

Edit memberlist_resultsbitlook for this :

<
td class="alt1Active" align="$stylevar[left]id="u$userinfo[userid]">
        <
a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a>
        <if 
condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
    </
td>


and 
replace with :

<
td class="alt1Active" align="$stylevar[left]id="u$userinfo[userid]">
        <
a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a>
        <if 
condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
    </
td>
<
td class="$bgclass">$numupload</td>
<
td class="$bgclass">$uploadtotal</td>
<
td class="$bgclass">$numdownload</td>
<
td class="$bgclass">$totaltotal</td

if u can come up with the code to work in memberlist.php that would be awsome, im useing this one here:

PHP Code:

        $getuserstats $DB_site->query("SELECT * FROM " TABLE_PREFIX "user WHERE userid = $post[userid]");
        while (
$userstats $DB_site->fetch_array($getuserstats)) {
            
$numupload $userstats['uploadno'];
            
$uploadtotal $userstats['uploadtotal'];
            
$numdownload $userstats['downloadno'];
            
$totaltotal $userstats['downloadtotal'];    
        } 

when i use the top code i get this error:
HTML Code:

Database error in vBulletin 3.0.6:

Invalid SQL: SELECT * FROM user WHERE userid =
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

well i hope u can help plus can this hack use MB and not KB ?

tnguy3n 02-17-2005 04:30 AM

sorry, i haven't had time to fix the bug in upload stats yet. I'll look into it later this weekend, hopefully, as to release new updated version of the hack. :sleep:

for your query, use this following instead:
Code:

$getuserstats = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = $userinfo[userid]");
        while ($userstats = $DB_site->fetch_array($getuserstats)) {
            $numupload = $userstats['uploadno'];
            $uploadtotal = $userstats['uploadtotal'];
            $numdownload = $userstats['downloadno'];
            $totaltotal = $userstats['downloadtotal'];   
        }


Joe Pimms 02-17-2005 04:46 AM

sweet bro it worked with my code and your database connection worked nice

i was hoping insted of useing KB cant you use MB ?

all people need to do is edit memberlist.php and look for
PHP Code:

// format posts number
$post['posts'] = vb_number_format($post['posts']); 

and put under:

PHP Code:

$getuserstats $DB_site->query("SELECT * FROM " TABLE_PREFIX "user WHERE userid = $userinfo[userid]");
        while (
$userstats $DB_site->fetch_array($getuserstats)) {
            
$numupload $userstats['uploadno'];
            
$uploadtotal $userstats['uploadtotal'];
            
$numdownload $userstats['downloadno'];
            
$totaltotal $userstats['downloadtotal'];    
        } 

thats it for the hole hack

PET 02-21-2005 10:06 PM

dos this hack show Total download/uploads from the start of the counter of from the begining of the forum ?

Joe Pimms 02-21-2005 10:08 PM

yes but it is a little buggie tho


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01048 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete