Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
access to download
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Requests

2020-11-02 09:38:52
french:
Bonjour, j'ai besoin d'une nouvelle fonction et demande une aide..

ma demande est que quand les membres avec un ratio inférieur a 0.5 ne puisse plus télécharger les torrents mais qu'il puisse toujours rester en seed afin d'augmenter leur ratio afin de revenir a un ratio de 0.5 et avoir a nouveau accès au téléchargement, merci d'avance.


english:
Hello, I need a new function and ask for help...

my request is that when the members with a ratio lower than 0.5 can't download torrents anymore but can always stay in seed to increase their ratio in order to come back to 0.5 and have access to download again, thanks in advance.






french:
peut être serait t'il possible de faire un code de mise à jour automatique pour le fichier cleanup.php pour que quand un membre a un ratio inférieur a 0.5 soit automatiquement basculer sur un nouveau User Groups et sur ce nouveau user groupe la case du download n'est pas cocher comme sa il na pas accès au download et quand sont ratio reviens a un ratio supérieur a 0.5 le membre est automatiquement remis a la classe membres.



english:
maybe it would be possible to make an automatic update code for the file cleanup.php so that when a member has a ratio lower than 0.5 is automatically switched to a new User Groups and on this new user group the download box is not checked as it does not have access to the download and when his ratio returns to a ratio higher than 0.5 the member is automatically returned to the class members.
2020-11-02 16:00:26
This has been a problem for me before, if you ban member there can not seed to improve ratio
I had leechers group for user with 0.5 ratio but you still have same problem.
I will look at this,  you can restrict download in download.php then members can still seed, the problem is any current torrents will be finished - you can use slots mod this stops members downloading x torrents
2020-11-02 16:02:40
The problem I had with this is members can not upload with ratio 0.5
Well you can upload but can not download torrent with your own passkey when upload is complete
2020-11-02 16:04:58
thanks for the support I will wait for the update
2020-11-02 16:38:00
Here is what I did with pdo one
Ban download
[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/mod-stop-user-downloading.1651/[/url]

Available slots
[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/slot-peer-class.10022/#post-68594[/url]

That just leaves cleanup, if ratio below 0.5 user download banned, see of you are able to get these two mods working I have them installed so should be able to help
2020-11-02 18:21:56
thanks for the help but you want me to modify to install the Ban download function if I understand your answer well ?
2020-11-02 19:26:26
The ban download mod is important so staff can change in account details, it also adds ban on download.php, i use this with available slots - to piece together that just leaves cleanup.php

something like this in cleanup.php

// ban download if ratio 0.5
$minratio = 0.5;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded < $minratio");
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'yes' WHERE id = $arr[id]");
}
2020-11-02 20:01:49
Thanks for your help it works perfectly and can you tell me if the member will have access to download once his ratio is above 0.5?
2020-11-02 20:19:12
I just tested and it works, the member with a ratio lower than 0.5 can't download anymore but when the member has recovered a ratio higher than 0.5 his account doesn't update to have the authorization to download ??
2020-11-03 15:34:38
"niki, post: 69499, member: 20338":

I just tested and it works, the member with a ratio lower than 0.5 can't download anymore but when the member has recovered a ratio higher than 0.5 his account doesn't update to have the authorization to download ??


it depends why you would ban someone from downloading

it could be banned for ratio only - which would be simple
// allow download if ratio 0.6
$minratio = 0.6;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded > $minratio");
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'no' WHERE id = $arr[id]");
}


if you ban download for various things - eg bad comments - it becomes more difficult
2020-11-03 16:00:33
Hello and thank you for your help ;), I'm just trying to make the modification for the wrong ratio of 0.5

below 0.5 no download access allowed
above 0.5 download access allowed
2020-11-03 16:43:00
many thanks to you for your help my-jay now everything is working properly without any errors (y)(y):D






##########################
# BANN DOWNLOAD FAIBLE RATIO#
##########################

// ban download if ratio 0.49
$minratio = 0.49;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded < $minratio");
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'yes' WHERE id = $arr[id]");
}

##########################
# END BANN DOWNLOAD FAIBLE RATIO#
##########################




##########################
# NO DOWNLOAD FAIBLE RATIO#
##########################

// allow download if ratio 0.50
$minratio = 0.50;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded > $minratio");
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'no' WHERE id = $arr[id]");
}

##########################
# END NO DOWNLOAD FAIBLE RATIO#
##########################
2020-11-04 10:50:36
Hello, now I'm looking if it's possible that the member is no longer disabled from downloading even with a ratio lower than 0.50 once you change his rank to vip member, thanks in advance for the help for this function.  :rolleyes:
2020-11-04 17:19:55
Try this mate
// ban download if ratio 0.49
$minratio = 0.49;
$vipnumber = 3; // or $site_config['vip'];
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded < $minratio AND class < $vipnumber");


I added option for class color mod, you vip class maybe different number than 3
2020-11-04 18:20:30
thanks for the support and I just put it in the cleanup.php file but it doesn't work vip members are still blocked and when it has a ratio of 0.49 it can't download :rolleyes:

##########################
# BANN DOWNLOAD FAIBLE RATIO#
##########################

// ban download if ratio 0.49
$minratio = 0.49;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded < $minratio");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'yes' WHERE id = $arr[id]");
}

##########################
# END BANN DOWNLOAD FAIBLE RATIO#
##########################




##########################
# NO DOWNLOAD FAIBLE RATIO#
##########################

// allow download if ratio 0.50
$minratio = 0.50;
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded > $minratio");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($stmt)) {
     // now we link download banned mod
      SQL_Query_exec("UPDATE users SET downloadbanned = 'no' WHERE id = $arr[id]");
}

##########################
# END NO DOWNLOAD FAIBLE RATIO#
##########################





##########################
# END NO VIP DOWNLOAD FAIBLE RATIO#
##########################

// ban download if ratio 0.49
$minratio = 0.49;
$vipnumber = 3; // or $site_config['vip'];
$stmt = SQL_Query_exec("SELECT id FROM users WHERE uploaded / downloaded < $minratio AND class < $vipnumber");

##########################
# END NO VIP DOWNLOAD FAIBLE RATIO#
##########################
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728