Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=117)
-   -   FreeLeech & Sort Torrents by Size (http://www.bvlist.com/showthread.php?t=5741)

lafouine022 20th November 2010 12:40

FreeLeech & Sort Torrents by Size
 
1 Attachment(s)
detail.php

PHP Code:

elseif ($torrent["banned"] == "yes" && !$is_mod)
    
stderr($lang->global['error'], $lang->global['torrentbanned']); 

after add

PHP Code:

         /*
+--------------------------------------------------------------------------
|   Fouini auto free
+---------------------------------------------------------------------------
*/
 
$q mysql_query("SELECT size FROM torrents WHERE id = $id");
    if (
mysql_num_rows($q) > 0)
    {
        
$rf mysql_fetch_array($q);
        
        if (
$rf["size"] >= 18253611008)     /* remplace for auto freeleech 18253611008 octet= 17 go for me. use staff tool calculette ;)*/
        
{
            
mysql_query("UPDATE torrents SET free = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 15032385536)   /* remplace for auto silver 15032385536 octet= 14 go for me. use staff tool calculette ;)*/
           
mysql_query("UPDATE torrents SET silver = 'yes' WHERE id = $id");
        }
    } 

but remplace '18253611008' for your octet and '15032385536' ;)

for me auto free in 17 go and auto silver in 14 go

Attachment 2630

Marco 24th January 2011 22:12

thank you :)

i really don't understand what to do?

first i thought maybe if the torrent is bigger than x then could be downloaded for free and bigger then y is silver ...but this is need on download php or upload or takeupload not on details ????

second i thougt is sort out something like bigger torrent from smaller but in that case it's have to be on browse

so i am in the cloud :)

please tell me for this little noob what's this



PS. i do it exactly (just modify the values ) in my details nothing shows



Later edit.. but i wish a mod what automatize the torrent freeleech >10GB and silverleech when > 4GB

lafouine022 24th January 2011 23:05

for you Marco autofree torrent size >10go else autosilver torrent size> 4go ;)

PHP Code:

      /*
+--------------------------------------------------------------------------
|   Fouini auto free
+---------------------------------------------------------------------------
*/
 
$q mysql_query("SELECT size FROM torrents WHERE id = $id");
    if (
mysql_num_rows($q) > 0)
    {
        
$rf mysql_fetch_array($q);
        
        if (
$rf["size"] >= 10737418240)     /* free 10Go ;)*/
        
{
            
mysql_query("UPDATE torrents SET free = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 4294967296)   /* silver 4Go ;)*/
           
mysql_query("UPDATE torrents SET silver = 'yes' WHERE id = $id");
        }
    } 


Marco 25th January 2011 10:05

you don't understand my issue:)

why is this on details.php ?


off course i modified the values :D:friend:

lafouine022 25th January 2011 13:42

why is this on details.php ?

because in details.php is works :bubble:

Marco 25th January 2011 22:39

honestly i can't explain why in details but it's working :D:drink:
thank you very much ....

btw... did u can make it an extra?:sorry:

after X days to be free (60days)
after Y days to be silver (30silver)


or something a lil'bit complicated
if the torrent have 30days free
if the torrent older than 60day 2up
if the torrent older than 90day 4up

if you need a sample (pic) i will send you


Your the best:) :friend:

lafouine022 26th January 2011 00:23

lol look the sql query and create what you want ;)

nikosuk 17th March 2011 22:39

and if i need free too??
 
hello
nice mod, i am using it ..

Please add the section to set torrents x2 when size is 15 GB please
thank you in advance

lafouine022 17th March 2011 23:51

No testing...

PHP Code:

      /*
+--------------------------------------------------------------------------
|   Fouini auto free
+---------------------------------------------------------------------------
*/
 
$q mysql_query("SELECT size FROM torrents WHERE id = $id");
    if (
mysql_num_rows($q) > 0)
    {
        
$rf mysql_fetch_array($q);
        
        if (
$rf["size"] >= 16106127360)     /* x2 15Go ;)*/
        
{
            
mysql_query("UPDATE torrents SET doubleupload = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 10737418240)     /* free 10Go ;)*/
        
{
            
mysql_query("UPDATE torrents SET free = 'yes' WHERE id = $id");
        }else{
        if (
$rf["size"] >= 4294967296)   /* silver 4Go ;)*/
           
mysql_query("UPDATE torrents SET silver = 'yes' WHERE id = $id");
        }
    } 


nikosuk 18th March 2011 08:09

thank you very much


;)


going to test it now..


All times are GMT +2. The time now is 22:24.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.