| View previous topic :: View next topic |
| Author |
Message |
Dellow
Joined: 11 Oct 2007 Posts: 26
|
Posted: Sep 17, 2008 6:22 pm Post subject: How the delay timer working for free users ? |
|
|
Hello,
1-i would like to know how the delay timer working for free users so i can set it correctly as i want.
2- how can i make the remaining time to download apears like countdown rather than letting user reload the page from time to time ?
Regards, |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Sep 18, 2008 8:27 am Post subject: |
|
|
You're talking about Download Delay caused by previuos download?
When user download file, we calculate the delay and put it to database according to user IP. Then check by IP when user can download file and show the difference (estimation time).
2) I can give you quick hack to put seconds delay to page instead of text, so u can create JS countdown if you need. No time to write this countdown for you. |
|
| Back to top |
|
 |
Dellow
Joined: 11 Oct 2007 Posts: 26
|
Posted: Sep 19, 2008 12:25 pm Post subject: |
|
|
| PilgrimX182 wrote: | | You're talking about Download Delay caused by previuos download? |
Yes
| Quote: | | When user download file, we calculate the delay and put it to database according to user IP. Then check by IP when user can download file and show the difference (estimation time). |
but how can i control this time?
when user try to down load 100 mb file but not complete the download then try to download another file he must wait 4 hours +
what if i want to make this time only 1 hour or 30 minuts ?
| Quote: | | 2) I can give you quick hack to put seconds delay to page instead of text, so u can create JS countdown if you need. No time to write this countdown for you. |
yes please and i will try to do something with it.
Regards, |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Sep 22, 2008 10:07 am Post subject: |
|
|
You control this delay with "BW Per Day" limit. We calculate delay dividing this limit by 24 hours. So higher limit - shorter delay.
Hack:
1) create new file wait.html in Templates with content like this:
| Code: | | Wait <TMPL_VAR wait> seconds |
2) In index.cgi find
| Code: | | $ses->message("You have reached the download-limit for free-users.<br>Get your own Premium-account now!<br>(Or wait $elapsed)"); |
and replace it with
| Code: | | $ses->PrintTemplate("wait.html",'wait'=>$wait); |
That's it. In wait variable you'll get number of seconds to wait. Now you can implement your own JS code. |
|
| Back to top |
|
 |
|