XFileSharing Pro - How the delay timer working for free users ?

Message
Author
Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

How the delay timer working for free users ?

#1 Postby Dellow » Sep 17, 2008 6:22 pm

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,

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Sep 18, 2008 8:27 am

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.

Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

#3 Postby Dellow » Sep 19, 2008 12:25 pm

PilgrimX182 wrote:You're talking about Download Delay caused by previuos download?
Yes
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 ?


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,

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Sep 22, 2008 10:07 am

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: Select all

Wait <TMPL_VAR wait> seconds
2) In index.cgi find

Code: Select all

$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: Select all

$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.