file size to get points

Powerfull XFileSharing version

Moderator: admin

Message
Author
Kay
Posts: 18
Joined: Apr 12, 2009 6:41 pm

file size to get points

#1 Postby Kay » Jun 01, 2009 1:40 pm

In the mean time we can set minimum file size eligible for points, like this:
Add points only when size > 5 MB (for example)

but I want to change it to set maximum file size instead of minimum,
Add points only when size < 50 MB (for example)

Is it possible? how can I do it?

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » Jun 02, 2009 6:53 am

Everything is Possible :)
Use the same option in Settings. Find this line in index.cgi:

Code: Select all

$points=0 if $file->{file_size} < $c->{points_filesize_limit}*1024*1024;

and replace '<' with '>'

jeyul
Posts: 51
Joined: Feb 17, 2009 8:14 am

#3 Postby jeyul » Jun 02, 2009 6:57 am

Can you make the same thing but with the deletion of files? I mean to delete a file only if it has more than 30 Kb or something like that.

Kay
Posts: 18
Joined: Apr 12, 2009 6:41 pm

#4 Postby Kay » Jun 03, 2009 2:16 am

I've got "software error" and the website went down.. I just changed it from > to < in one place
can you tell me how the new line should be to copy and paste it.

PilgrimX182 wrote:Everything is Possible :)
Use the same option in Settings. Find this line in index.cgi:

Code: Select all

$points=0 if $file->{file_size} < $c->{points_filesize_limit}*1024*1024;

and replace '<' with '>'

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#5 Postby PilgrimX182 » Jun 03, 2009 7:09 am

I bet you used windows editor and it added windows linebreaks, not linux ones. Use any editor supporting linux(unix) linebreaks and use FTP binary mode to upload file to server. (Notepad++ looks like it) Or PM me FTP details, I will do this quick fix for free.

Kay
Posts: 18
Joined: Apr 12, 2009 6:41 pm

#6 Postby Kay » Jun 05, 2009 6:53 pm

Thank you Pilgrim for fixing that for me I really appreciate it.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests