Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Free Torrent Source (http://www.bvlist.com/forumdisplay.php?f=25)
-   -   Silver Download for FTS (http://www.bvlist.com/showthread.php?t=3957)

elvira 8th December 2009 15:50

Silver Download for FTS
 
1 Attachment(s)
Sql:
Code:

ALTER TABLE `torrents` ADD `silver` enum('yes','no') default 'no'
announce.php find this
Code:

$res = mysql_query( "SELECT id, name, category, banned, free....
and add this
Code:

, silver
then still in announce if you have this
Code:

if ($upthis > 0 || $downthis > 0)
        mysql_query("UPDATE users SET uploaded = uploaded + $upthis". ($torrent['free']=='no'?", downloaded = downloaded + $downthis ":' '). "WHERE id=$userid") or err("Tracker error 3");
}

change with this
Code:

if ($upthis > 0 || $downthis > 0)
    if($torrent['free']=='yes')
        mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3 (freeleech)");
    else
    if($torrent['silver']=='yes')
        {$downthis=$downthis/2;
        $upthis = $upthis*2;
        mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3 (silver)");
        }
    else
        mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");

//    mysql_query("UPDATE users SET uploaded = uploaded + $upthis". ($torrent['free']=='no'?", downloaded = downloaded + $downthis ":' '). "WHERE id=$userid") or err("Tracker error 3");

}

in browse.php add:
Code:

, torrents.silver
in edit.php
Code:

if(get_user_class()>=UC_MODERATOR)
tr("Silver torrent", " Half tracked download (only half download is recorded)", 1);

takeedit.php below Free download add
Code:

if(get_user_class()>=UC_MODERATOR)
      $updateset[] = "silver = '".($_POST["silver"]==1 ? 'yes' : 'no')."'";

open functions.php find
Code:

$timezone = $row["added"];
under that add
Code:

$silver = ($row[silver]=="yes" ? "" : "");
still in functions.php find
Code:

print("\">$dispname (NEW)  $thisisfree $silver $timezone\n");
          else
              print("\">$dispname $thisisfree $silver$timezone\n");

add
Code:

$silver
and past this picture in your root/pic

yoligim 23rd December 2009 07:48

I can,t find in functions.php

Code:

print("\">$dispname (NEW)  $thisisfree $silver $timezone\n");
          else
              print("\">$dispname $thisisfree $silver$timezone\n");


Phogo 23rd December 2009 16:15

I think he means add rather than find

yoligim 23rd December 2009 19:47

ok, then Phogo where is supposed I have to add it?
I mean after o before what code:girl:

benjaminbih 24th December 2009 01:42

i think you have to replace this:
PHP Code:

        if ($added >= $last_browse)
            print (
"\"><b>$dispname $sticky</b></a> <img src=pic/new.png border=0> $thisisfree$double " .
                
str_replace(" """$timezone) . "</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double " str_replace(" ",
                
"&nbsp;"$timezone) . "</div>"); 

by this:
PHP Code:

        if ($added >= $last_browse)
            print (
"\"><b>$dispname $sticky</b></a> <img src=pic/new.png border=0> $thisisfree$double " .
                
str_replace(" """$timezone) . "</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double$silver " str_replace(" ",
                
"&nbsp;"$timezone) . "</div>"); 

:ok:

yoligim 24th December 2009 02:08

ok done, how can I know that now is working?
I mean where can I find out this silver option?
:sos:

benjaminbih 24th December 2009 12:31

open /include/functions.php find:
PHP Code:

tr("Double Upload""<input type='checkbox' name='doubleupload'" . (($row["doubleupload"] == "yes") ? " checked='checked'" "" ) . " value='1' /> Double Upload (upload stats are recorded double)"1); 

add before:
PHP Code:

tr("Svilver download""<input type='checkbox' name='silver'" . (($row["silver"] == "yes") ? " checked='checked'" "" ) . " value='1' /> Only half download stats be recorded fo this torrent"1); 

in takeupload.php find:
PHP Code:

if ($_POST['free'] == 1
$free 'yes';
else
$free 'no'

below add:
PHP Code:

if ($_POST['silver'] == 1
$silver 'yes';
else
$silver 'no'

stilli in takeupload find in the line with mysql_insert this:
PHP Code:

numfilestypedescrori_descrcategorysave_asaddedlast_actionnfoimageurlfree

add after free,
PHP Code:

silver

and find in the near:
PHP Code:

'$free''$sticky'

and add the silver var so it looks like that:
PHP Code:

'$free''$silver''$sticky'

Now you can upload a new torrent and test if the silver setting takes effect.

@elvira, edit and complete the mod in the first post.

yoligim 24th December 2009 14:32

Ok, done,
but how can someone that browse torrents notice that the torrent is silver?
I mean when you browse and read torrent information, I can,t see a box o similar that indicates that torrent is silver...
and how for the admin to know how much silver torrents are there?
I mean for control, in the admin panel...
thanks in advance

benjaminbih 24th December 2009 23:19

Quote:

Originally Posted by yoligim (Post 18606)
Ok, done,
but how can someone that browse torrents notice that the torrent is silver?
I mean when you browse and read torrent information, I can,t see a box o similar that indicates that torrent is silver...
and how for the admin to know how much silver torrents are there?
I mean for control, in the admin panel...
thanks in advance

i must test it self. stand by

yoligim 25th December 2009 01:36

Ok, thank you, :ok:


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

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