clicked install m8 - all seems fine except for me it wont reg if someone downloads
the stats only update when they upload.Downloads stay at Zero regardless
will see if anyone else has same problems
okie, got that fixed now.
*update one instruction*
To fix your current download stats problem, open attachment.php,
FIND:
Code:
// update user download stats by tnguy3n
$filesize = $attachmentinfo['filesize']/1024;
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadno = downloadno + 1
WHERE userid = $bbuserinfo[userid]
");
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadtotal = downloadtotal + $filesize
WHERE userid = $bbuserinfo[userid]
");
Then DELETE IT!
FIND:
Code:
else
{
// or doing it once an hour
$DB_site->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid)
VALUES ($attachmentinfo[attachmentid])
");
}
BELOW IT, ADD:
Code:
// update user download stats by tnguy3n
$filesize = $attachmentinfo['filesize']/1024;
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadno = downloadno + 1
WHERE userid = $bbuserinfo[userid]
");
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadtotal = downloadtotal + $filesize
WHERE userid = $bbuserinfo[userid]
");
if i upload a file and a preview pic - it adds 3 to the count whereas the attachemnts should add 2 only.Noticed this after i did a few uploads of small pic rars.
Deffo an Error on counting up the uploaded stats - here goes
ok before i upload here is my stats
File Upload: 5 - Total Upload: 737 KB
File Download: 2 - Total Download: 6120 KB
Now i just uploaded a preview pic which was 160K and a test rar which was 5.10 meg
Now check out the stats afterwards ...................
File Upload: 8 - Total Upload: 901 KB
File Download: 2 - Total Download: 6120 KB
deffo adding an extra one somewhere and not totaling up correct
you can upload a file 5.10 MB on your server? That amazed me. Usually, ppl ai'nt set uploaded filesize > 2 MB. but if your rar file is 5.10 KB, the upload stats seems working correctly. 737 KB + 160 KB + 5.1 KB ~ 902 KB
dont figure - as 5.10 meg is not 5.10 kb
maybe its classing them as KB when there cleary not.
the total above in your thread is 902kb which is well below 1 meg yet in the downloads stats its doing em right - 2 files which make up 6 megs
also yep can upload files to a mx of 8 megs as set the max_upload to it.
Ok look at this :
Stats before :File Upload: 8 - Total Upload: 901 KB
Now im just about to upload a rar which is 1.35 MB
File Upload: 9 - Total Upload: 902 KB
so looking at that i think ive solved the problem its only counting the first attachement which in most cases is small preview pics of maps but this time i uploaded the rar without a pic and it never counted it at all