PDA

View Full Version : time to download this attchment


all-the-vb
01-07-2004, 10:00 PM
Hello Everyone ,
time to download this attchment by All-the-vb

This a very small but usefull Hack!
What this hack does?
show a size attachment with KB or Mb ----> And the time you want to download this attachment.
and see a Screenshot in the a next reply

Files to edit: 1 (showthread.php)
Templates to edit: 1 (postbit_attachment)

Time to install: 2 min

romanticyao
01-08-2004, 03:25 PM
installed. good job.

MindTrix
01-08-2004, 03:58 PM
Now that my friend, is beautiful :) Thanks for sharing.

Kentaurus
01-08-2004, 05:01 PM
Hello Everyone ,
time to download this attchment by All-the-vb

This a very small but usefull Hack!
What this hack does?
show a size attachment with KB or Mb ----> And the time you want to download this attachment.
and see a Screenshot in the a next reply

Files to edit: 1 (showthread.php)
Templates to edit: 1 (postbit_attachment)

Time to install: 2 min
What is the "time to download this attachment"? What does it do? Is it the time that I take to download it? For that you would need to know what my connection speed is, something that you cannot easily know, and guessing is just wrong since there can be both modem, dsl and other broadband users.

MindTrix
01-08-2004, 05:03 PM
Pretty sure it is an estimated time for download.

gmarik
01-08-2004, 05:49 PM
Very nice hack - does it detects my connection automaticly?

all-the-vb
01-09-2004, 08:57 AM
romanticyao & MindTrix

welcome
-----------------------------

kentaurus & gmarik

the time you need to download attachment with ISDN

Rein Masamuri
01-09-2004, 11:28 AM
Very nice hack - does it detects my connection automaticly?
It probably factors in the speed it took to load the page on your browser and aproximates the speed you're running

eXtremeTim
01-11-2004, 07:09 PM
It probably factors in the speed it took to load the page on your browser and aproximates the speed you're running
maybe you should read above ;)

wolfman
01-12-2004, 07:01 PM
Maybe an option can be added so that the user can pick the speed they are on to get the estimated time to download.

Ryan Ashbrook
01-12-2004, 07:40 PM
Nice hack, thanks. :)

eXtremeTim
01-12-2004, 10:08 PM
Nice hack, thanks. :)
I think the option would be a good one.

gmarik
01-17-2004, 07:39 AM
the old way +
an option can be added so that the user can pick the speed they are on to get the estimated time to download = !!!

draculanowaday
03-28-2004, 06:29 AM
didn't work for VBB 3.0.0 :( Anyone fixed this?

ChuanSE
03-30-2004, 11:34 AM
Works great

* ChuanSE clicks install :D

https://vborg.vbsupport.ru/external/2004/04/1.php (http://forums.puredj.com)

draculanowaday
04-10-2004, 09:04 AM
Works great

* ChuanSE clicks install :D

http://puredj.net/pdj.php (http://forums.puredj.com)
what version of VBB did you install?

maresi
04-25-2004, 01:29 PM
hi
very usefull hack!
I got an small error with larger files.

https://vborg.vbsupport.ru/

thx
maresi

sketch42
06-09-2004, 06:51 AM
hi
very usefull hack!
I got an small error with larger files.

http://www.setup-guru.com/error.gif

thx
maresi

i get the same error on larger files.... anyway to correct this???

Mu5icMan
06-09-2004, 09:19 AM
where would i need to put the connection speed e.g.

download time: 2.00 sec @ 64 Kbps, 1 view

Also at what size of file does the time start to go wrong?

And could this be corrected?

sketch42
06-09-2004, 09:28 AM
Also at what size of file does the time start to go wrong?

And could this be corrected?

it seems once it gets into MB it goes wrong... im sure it can be corrected, how?? i have no clue

Mu5icMan
06-09-2004, 09:36 AM
how about keeping it as KB, like 2000KB, that might work, i'll try and mod it myself and post it if it works

sketch42
06-09-2004, 09:55 AM
:classic:

Mu5icMan
06-09-2004, 10:07 AM
i've just tried to install it normally on my vb 3.0.1 board and it doesn't work cause in postbit_attachment there is no reference of $attachment[filesize] bytes. If i leave this field blank or add it in afterwards the attachments in my board come up as 0.00KB

Mu5icMan
06-09-2004, 11:24 AM
i got this to work but can't upload attachments bigger than 1MB at the moment. I should have this figurered out later today

sketch42
06-10-2004, 12:33 AM
any word?

Mu5icMan
06-10-2004, 11:06 AM
i got it to work for seconds, e.g.

size: 1.65 MB, download time: 216.63 sec, 2 views

now trying minutes. If needed i'll try hours also.

sketch42
06-11-2004, 05:42 AM
i got it to work for seconds, e.g.

size: 1.65 MB, download time: 216.63 sec, 2 views

now trying minutes. If needed i'll try hours also.
can you post the code you have so far?

Mu5icMan
06-11-2004, 07:27 AM
I've changed when it regisiters the format from Kb to MB to 800000. And i've taken out the code for minutes cause there's something wrong with it. I've also added @ 64 Kbps at the end. If you don't want it for the timing of a 64Kb connection just change 64000 to whatever you want.

$attachment[time] = round(($attachment[filesize] * 8)/64000,2);
if ($attachment[filesize] > 800000) {
$attachment[filesize] = round(($attachment[filesize]/1024)/1024,2);
$attachment[filesize] = "$attachment[filesize] MB";
} else {
$attachment[filesize] = round($attachment[filesize]/1024,2);
$attachment[filesize] = "$attachment[filesize] kB";
}

{
$attachment[downtime] = "size: $attachment[filesize], download time: $attachment[time] secconds @ 64 Kbps";
}

sketch42
06-11-2004, 07:33 AM
I've changed when it regisiters the format from Kb to MB to 800000. And i've taken out the code for minutes cause there's something wrong with it. I've also added @ 64 Kbps at the end. If you don't want it for the timing of a 64Kb connection just change 64000 to whatever you want.


$attachment[time] = round(($attachment[filesize] * 8)/64000,2);
if ($attachment[filesize] > 800000) {
$attachment[filesize] = round(($attachment[filesize]/1024)/1024,2);
$attachment[filesize] = "$attachment[filesize] MB";
} else {
$attachment[filesize] = round($attachment[filesize]/1024,2);
$attachment[filesize] = "$attachment[filesize] kB";
}

{
$attachment[downtime] = "size: $attachment[filesize], download time: $attachment[time] secconds @ 64 Kbps";
}
so place this instead of the one in the first post?

Mu5icMan
06-11-2004, 09:00 AM
yes and also change the template is in the first post

sketch42
06-11-2004, 09:25 AM
yes and also change the template is in the first post
good job .. thanks for the update.. alls well now.. hopefully someone can get the minutes fixed and we'll be good

Deska
07-16-2004, 01:13 PM
Any updates for this hack?
I really like it :D

DWard
08-09-2004, 07:14 AM
Well, can the hack not be developed by finding the users average ping (v3arcade does it), then base the time round their ping?

I ask this because the times are out of sync with my net connection, if their based on ISDN (around 100kbps). Im on a 1.5mbps connection at home and the times are completely wrong.

Mu5icMan
08-09-2004, 07:20 AM
actually ISDN is 64Kpbs originally, that's what this hack calculates

DWard
08-09-2004, 07:53 AM
Thats even worse!

Blam Forumz
08-19-2004, 07:17 AM
/me clicks install

rodriguez
01-20-2005, 02:15 AM
I got some download time issues like someone talked about here.

I changed$attachment[time] = round(($attachment[filesize] * 8)/64000,2);

to$attachment[time] = round(($attachment[filesize] * 8)/512000,2);

Which equal at a internet connection capable of 64K/sec.

Closer to reality