Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 7th January 2010, 21:00
poiuy6789's Avatar
poiuy6789 poiuy6789 is offline
Member
 
Join Date: Jul 2009
P2P
Posts: 7
Arrow TBDEv Freeleech mod ?
Does anyone know where I can find a mod for TBDEv |freeleech|, but this mod to apper in Upload.php page and if you want a torrent to be freeleech, just have the opportunity "Set FreeLech"
Reply With Quote
  #2  
Old 8th January 2010, 16:06
Phogo's Avatar
Phogo Phogo is offline
VIP
 
Join Date: Jan 2008
United Kingdom
Posts: 902
Default
There are many free leech mods over at TBDEV.NET - Community forum
Reply With Quote
  #3  
Old 25th March 2010, 22:32
helvijs13's Avatar
helvijs13 helvijs13 is offline
Senior Member
 
Join Date: Sep 2008
Posts: 23
Default
http://www.tbdev.net/index.php?showtopic=5237
Reply With Quote
  #4  
Old 4th April 2010, 10:19
soluicius's Avatar
soluicius soluicius is offline
Member
 
Join Date: Mar 2010
P2P
Posts: 3
Default
Quote:
Originally Posted by poiuy6789 View Post
Does anyone know where I can find a mod for TBDEv |freeleech|, but this mod to apper in Upload.php page and if you want a torrent to be freeleech, just have the opportunity "Set FreeLech"

Look here.... it works
http://www.tbdev.net/index.php?showtopic=22625
Reply With Quote
  #5  
Old 5th July 2012, 01:48
j4v1's Avatar
j4v1 j4v1 is offline
Member
 
Join Date: Jul 2012
P2P
Posts: 6
Default
anyone have TBDEv Freeleech mod?? website are down and I can't find code :(
Reply With Quote
  #6  
Old 26th February 2013, 18:51
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
freeleech
credit to kami.

sql
PHP Code:
1 ALTER TABLE `torrentsADD `freeleechENUM('0''1') DEFAULT '0' NOT NULL
2 Now we need to edit announce.php

Find this :
PHP Code:
 if ($upthis || $downthis 0)
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3"); 
And replace it with this:

i
PHP Code:
($upthis || $downthis 0)
 {
 
$freelech mysql_query("SELECT * FROM torrents WHERE id = '$torrentid' AND freeleech = '1'");
 
 if (
mysql_num_rows($freelech) == 1)
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3");
 }
 else
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");
 }
 } 
3. Now make file called freeleech.php in your root dir and put this in it:

PHP Code:
<?php

ob_start
("ob_gzhandler");
require_once(
"include/bittorrent.php");

dbconn();
loggedinorreturn();

$akcija $_GET['akcija'];
$napaka = (int)$_GET['napaka'];
$odstraniid = (int)$_GET['odstraniid'];

stdhead("Free Leech");

begin_main_frame();

if (
get_user_class() < UC_MODERATOR)
{
 
stdmsg("Error""No access.");
 
end_main_frame();
 
stdfoot();
 exit;
}

echo 
"<h1 align=center>Free Leech</h1>\n";

if (
$napaka == 1)
{
 echo 
"<br /><font color=\"red\">Torrent with this ID doesn't exist!</font><br />";
}

if (
$napaka == 2)
{
 echo 
"<br /><font color=\"red\">This torrent is now free leech!</font><br />";
}

if (
$napaka == 3)
{
 echo 
"<br /><font color=\"red\">This torrent isn't free leech anymore!</font><br />";
}

if (
$napaka == 4)
{
 echo 
"<br /><font color=\"red\">This torren't isn't freeleech!</font><br />";
}

echo 
"<br /><form name=\"freeleech\" method=\"post\" action=\"freeleech.php?akcija=poslji\">

 Torrent ID: 

 <input name=\"id\" type=\"text\" value=\"\" /> 

 (You need to enter id of the torrent you want to make free leech)

<br /><br />

<input type=\"submit\" value=\"Send\"></form>"
;

if (
$akcija == "poslji")
{
 
$id = (int)$_POST['id'];
 
$rezultat mysql_query("SELECT * FROM torrents WHERE id = '$id'");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=1");
 die();
 }
 else
 {
 
mysql_query("UPDATE torrents SET freeleech = '1' WHERE id = '$id'");
 }
 
 
header("Location: freeleech.php?napaka=2");
}

echo 
"<br /><div align=\"center\"><h1>Free leech torrents</h1><br />";

$rezultat mysql_query("SELECT * FROM torrents WHERE freeleech = '1'");

if (
mysql_num_rows($rezultat) > 0)
{
 echo 
"<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" class=\"main\">
 <tr>
 <td class=rowhead><center>Id</center></td>
 <td class=rowhead><center>Name</center></td>
 <td class=rowhead><center>freeleech</center></td>
 </tr>"
;

 while (
$vrstica mysql_fetch_array($rezultat))
 {
 echo 
"
 <tr>
 <td><center>
$vrstica[id]</center></td>
 <td><center><a href=\"details.php?id=
$vrstica[id]\" target=\"_blank\">".format_comment($vrstica[name])."</a></center></td>
 <td><center><a href=\"freeleech.php?akcija=odstrani&odstraniid=
$vrstica[id]\">Remove</a></center></td>
 </tr>"
;
 }
}
else
{
 echo 
"No free leech torrents!";
}

echo 
"</table><br /><br />Copyrights © for free leech by Kami</div>";

if (
$akcija == "odstrani")
{
 
$rezultat mysql_query("SELECT * FROM torrents WHERE id = '$odstraniid' AND freeleech = '1'");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=4");
 die();
 }
 else
 {
 
mysql_query("UPDATE torrents SET freeleech = '0' WHERE id = '$odstraniid'");
 }
 
 
header("Location: freeleech.php?napaka=3");
}

end_main_frame();
stdfoot();
die();
?>

4. Now we also need to edit details.php (this is required if you want to have text "This torrent is freeleech so only upload counts" in torrent description)

Find this

PHP Code:
if (!empty($row["descr"]))
 
tr("Description"str_replace(array("\n"" "), array("<br>\n"" "), format_urls(htmlspecialchars($row["descr"]))), 1); 

And replace it with this:

PHP Code:
if (!empty($row["descr"]))
 {
 
$rezultat mysql_num_rows(mysql_query("SELECT * FROM torrents WHERE id = '$id' AND freeleech = '1'"));
 
 if (
$rezultat == 1)
 {
 
$row["descr"] .= "\n[color=red]This torrent is freeleech so only upload counts![/color]";
 }
 
tr("Description"str_replace(array("\n"" "), array("<br>\n"" "), format_comment(format_urls(htmlspecialchars($row["descr"])))), 1);
 } 

Image instead of [Freeleech] text:

If you want to use image instead of freeleech text, you should drop step 4.

Then, replace this (line 767):

PHP Code:
 print("\"><b>$dispname</b></a>\n"); 

with this:

PHP Code:
$freeleech mysql_result(mysql_query("SELECT freeleech FROM torrents WHERE id = '$id'"), 0);
 
 if (
$freeleech == 1)
 {
 
$freeimage "<img src=\"images/YOUR_IMAGE.gif\" />";
 }
 else
 {
 
$freeimage "";
 }

 print(
"\"><b>$dispname</b></a> $freeimage\n"); 
Old version (obsolete - make all torrents free addon won't work properly with this version)

1. We need to make another column in table "torrents":

PHP Code:
ALTER TABLE `torrentsADD `freeleechVARCHAR) DEFAULT 'no' NOT NULL

2. Now we need to edit announce.php

Find this

PHP Code:
 if ($upthis || $downthis 0)
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3"); 
And replace it with this:

PHP Code:
if ($upthis || $downthis 0)
 {
 
$freelech mysql_query("SELECT * FROM torrents WHERE id='$torrentid' AND freeleech='yes'");
 if (
mysql_num_rows($freelech) == 1)
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3");
 }
 else
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");
 }
 } 

3. Now make file called freeleech.php in your root dir and put this in it:

PHP Code:
<?php

ob_start
("ob_gzhandler");
require_once(
"include/bittorrent.php");
dbconn();
loggedinorreturn();

$akcija $_GET['akcija'];
$napaka $_GET['napaka'];
$odstraniid $_GET['odstraniid'];

stdhead("Free Leech");

begin_main_frame();

if (
get_user_class() < UC_ADMINISTRATOR)
{
 
stdmsg("Napaka""Nimate dostopa.)"); // You don't have access
 
stdfoot();
 exit;
}

echo 
"<h1 align=center>Free Leech</h1>\n";

if (
$napaka == 1)
{
 echo 
"<br /><font color=\"red\">Torrent z tem ID-jem ne obstaja!</font><br />"// Torrent with this ID doesn't exist
}



if (
$napaka == 2)
{
 echo 
"<br /><font color=\"red\">Torrent je uspešno postal free leech!</font><br />"// This torrent is now free leech
}

if (
$napaka == 3)
{
 echo 
"<br /><font color=\"red\">Ta torrent več sedaj ni free leech!</font><br />"// This torrent isn't free leech anymore
}

echo 
"<br /><form name=\"\" method=\"post\" action=\"freeleech.php?akcija=poslji\">

 Id torrenta: 

 <input name=\"idtorrenta\" type=\"text\" value=\"\" /> 

 (vnesite ID torrenta za kategera hocete nastavit da je free leech, ce ne vete ki najdete ID niste vredni svojega statusa!

<br /><br />

<input type=\"submit\" value=\"Poslji\"></form>"
// You need to enter id of the torrent you want to make free leech



if ($akcija == "poslji")
{
 
$idtorrenta $_POST['idtorrenta'];
 
$rezultat mysql_query("SELECT * from torrents WHERE id='$idtorrenta'");
 
$ime mysql_query("SELECT name from torrents WHERE id='$idtorrenta' LIMIT 1");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=1");
 die();
 }

 

 while (
$vrstica mysql_fetch_array($ime))
 {
 
$ime1 $vrstica[name] . " [[color="red"]freeleech[/color]]";
 
mysql_query("UPDATE torrents SET freeleech='yes', name='$ime1' WHERE id='$idtorrenta'");
 }
 
header("Location: freeleech.php?napaka=2");

}

echo 
"<br /><div align=\"center\"><h1>Free leech torrenti</h1><br />";

$rezultat mysql_query("SELECT * from torrents WHERE freeleech='yes'");

echo 
"<table width=\"500\" border=\"0\">
 <tr>
 <td class=rowhead><center>Id</center></td>
 <td class=rowhead><center>Ime</center></td>
 <td class=rowhead><center>freeleech</center></td>
 </tr>"
// Ime = Name

 

while ($vrstica mysql_fetch_array($rezultat))
{
 echo 
"
 <tr>
 <td><center>
$vrstica[id]</center></td>
 <td><center><a href=\"http://www.slo-scene.net/details.php?id=
$vrstica[id]\" target=\"_blank\">".format_comment($vrstica[name])."</a></center></td>
 <td><center><a href=\"freeleech.php?akcija=odstrani&odstraniid=
$vrstica[id]\">Odstrani</a></center></td>
 </tr>"
// Odstrani = Remove
}
echo 
"</table><br /><br />Copyrights © for free leech by Kami</div>";

if (
$akcija == "odstrani")
{
 
$rezultat mysql_query("SELECT * from torrents WHERE id='$odstraniid'");
 
mysql_query("UPDATE torrents SET freeleech='no' WHERE id='$odstraniid'");
 
 while (
$vrstica mysql_fetch_array($rezultat))
 {
 
$ime str_replace(" [[color="red"]freeleech[/color]]"" "$vrstica[name]);
 
mysql_query("UPDATE torrents SET name='$ime' WHERE id='$odstraniid'");
 }
 
 
header("Location: freeleech.php?napaka=3");
}
stdfoot();
die();
?>
4. Now we need to edit bittorrent.php (this is required if we want to have [FreeLech] after the torrent name in red color)

Find this:

PHP Code:
$dispname htmlspecialchars($row["name"]); 

And replace it with this:

PHP Code:
$dispname format_comment(htmlspecialchars($row["name"])); 
(torrent name is now formated same as comments - color tags etc.)

5. Now we also need to edit userdetails.php (this is required if we want to have [FreeLech] after the torrent name in red color)

Find this:
PHP Code:
 while ($a mysql_fetch_assoc($r))
 {
 
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
 
$a2 mysql_fetch_assoc($r2);
 
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";
 
$torrents .= "<tr><td style='padding: 0px'>$cat</td><td><a href=details.php?id=" $a["id"] . "&hit=1><b>" htmlspecialchars($a["name"]) . "</b></a></td>" .
 
"<td align=right>$a[seeders]</td><td align=right>$a[leechers]</td></tr>\n";
 } 
and replace it with this:
PHP Code:
 while ($a mysql_fetch_assoc($r))
 {
 
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
 
$a2 mysql_fetch_assoc($r2);
 
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";
 
$torrents .= "<tr><td style='padding: 0px'>$cat</td><td><a href=details.php?id=" $a["id"] . "&hit=1><b>" .

format_comment(htmlspecialchars($a["name"])) . "</b></a></td>" .
 
"<td align=right>$a[seeders]</td><td align=right>$a[leechers]</td></tr>\n";
 } 
Find this:
PHP Code:
 $ret .= "<tr><td style='padding: 0px'><img src=\"pic/$catimage\" alt=\"$catname\" width=42 height=42></td>\n" .
 
"<td><a href=details.php?id=$arr[torrent]&hit=1><b>" htmlspecialchars($arr["torrentname"]) .
 
"</b></a></td><td align=center>$ttl</td><td align=center>$size</td><td align=right>$seeders</td><td align=right>$leechers</td><td align=center>$uploaded</td>\n" .
 
"<td align=center>$downloaded</td><td align=center>$ratio</td></tr>\n"
and replace it with this:
PHP Code:
$ret .= "<tr><td style='padding: 0px'><img src=\"pic/$catimage\" alt=\"$catname\" width=42 height=42></td>\n" .
 
"<td><a href=details.php?id=$arr[torrent]&hit=1><b>" format_comment(htmlspecialchars($arr["torrentname"])) .
 
"</b></a></td><td align=center>$ttl</td><td align=center>$size</td><td align=right>$seeders</td><td align=right>$leechers</td><td align=center>$uploaded</td>\n" .
 
"<td align=center>$downloaded</td><td align=center>$ratio</td></tr>\n"
With this script you can make torrent free leech.

Free leech means, that only upload count at specified torrent.

Bump: freeleech
credit to kami.

sql
PHP Code:
1 ALTER TABLE `torrentsADD `freeleechENUM('0''1') DEFAULT '0' NOT NULL
2 Now we need to edit announce.php

Find this :
PHP Code:
 if ($upthis || $downthis 0)
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3"); 
And replace it with this:

i
PHP Code:
($upthis || $downthis 0)
 {
 
$freelech mysql_query("SELECT * FROM torrents WHERE id = '$torrentid' AND freeleech = '1'");
 
 if (
mysql_num_rows($freelech) == 1)
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3");
 }
 else
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");
 }
 } 
3. Now make file called freeleech.php in your root dir and put this in it:

PHP Code:
<?php

ob_start
("ob_gzhandler");
require_once(
"include/bittorrent.php");

dbconn();
loggedinorreturn();

$akcija $_GET['akcija'];
$napaka = (int)$_GET['napaka'];
$odstraniid = (int)$_GET['odstraniid'];

stdhead("Free Leech");

begin_main_frame();

if (
get_user_class() < UC_MODERATOR)
{
 
stdmsg("Error""No access.");
 
end_main_frame();
 
stdfoot();
 exit;
}

echo 
"<h1 align=center>Free Leech</h1>\n";

if (
$napaka == 1)
{
 echo 
"<br /><font color=\"red\">Torrent with this ID doesn't exist!</font><br />";
}

if (
$napaka == 2)
{
 echo 
"<br /><font color=\"red\">This torrent is now free leech!</font><br />";
}

if (
$napaka == 3)
{
 echo 
"<br /><font color=\"red\">This torrent isn't free leech anymore!</font><br />";
}

if (
$napaka == 4)
{
 echo 
"<br /><font color=\"red\">This torren't isn't freeleech!</font><br />";
}

echo 
"<br /><form name=\"freeleech\" method=\"post\" action=\"freeleech.php?akcija=poslji\">

 Torrent ID: 

 <input name=\"id\" type=\"text\" value=\"\" /> 

 (You need to enter id of the torrent you want to make free leech)

<br /><br />

<input type=\"submit\" value=\"Send\"></form>"
;

if (
$akcija == "poslji")
{
 
$id = (int)$_POST['id'];
 
$rezultat mysql_query("SELECT * FROM torrents WHERE id = '$id'");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=1");
 die();
 }
 else
 {
 
mysql_query("UPDATE torrents SET freeleech = '1' WHERE id = '$id'");
 }
 
 
header("Location: freeleech.php?napaka=2");
}

echo 
"<br /><div align=\"center\"><h1>Free leech torrents</h1><br />";

$rezultat mysql_query("SELECT * FROM torrents WHERE freeleech = '1'");

if (
mysql_num_rows($rezultat) > 0)
{
 echo 
"<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" class=\"main\">
 <tr>
 <td class=rowhead><center>Id</center></td>
 <td class=rowhead><center>Name</center></td>
 <td class=rowhead><center>freeleech</center></td>
 </tr>"
;

 while (
$vrstica mysql_fetch_array($rezultat))
 {
 echo 
"
 <tr>
 <td><center>
$vrstica[id]</center></td>
 <td><center><a href=\"details.php?id=
$vrstica[id]\" target=\"_blank\">".format_comment($vrstica[name])."</a></center></td>
 <td><center><a href=\"freeleech.php?akcija=odstrani&odstraniid=
$vrstica[id]\">Remove</a></center></td>
 </tr>"
;
 }
}
else
{
 echo 
"No free leech torrents!";
}

echo 
"</table><br /><br />Copyrights © for free leech by Kami</div>";

if (
$akcija == "odstrani")
{
 
$rezultat mysql_query("SELECT * FROM torrents WHERE id = '$odstraniid' AND freeleech = '1'");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=4");
 die();
 }
 else
 {
 
mysql_query("UPDATE torrents SET freeleech = '0' WHERE id = '$odstraniid'");
 }
 
 
header("Location: freeleech.php?napaka=3");
}

end_main_frame();
stdfoot();
die();
?>

4. Now we also need to edit details.php (this is required if you want to have text "This torrent is freeleech so only upload counts" in torrent description)

Find this

PHP Code:
if (!empty($row["descr"]))
 
tr("Description"str_replace(array("\n"" "), array("<br>\n"" "), format_urls(htmlspecialchars($row["descr"]))), 1); 

And replace it with this:

PHP Code:
if (!empty($row["descr"]))
 {
 
$rezultat mysql_num_rows(mysql_query("SELECT * FROM torrents WHERE id = '$id' AND freeleech = '1'"));
 
 if (
$rezultat == 1)
 {
 
$row["descr"] .= "\n[color=red]This torrent is freeleech so only upload counts![/color]";
 }
 
tr("Description"str_replace(array("\n"" "), array("<br>\n"" "), format_comment(format_urls(htmlspecialchars($row["descr"])))), 1);
 } 

Image instead of [Freeleech] text:

If you want to use image instead of freeleech text, you should drop step 4.

Then, replace this (line 767):

PHP Code:
 print("\"><b>$dispname</b></a>\n"); 

with this:

PHP Code:
$freeleech mysql_result(mysql_query("SELECT freeleech FROM torrents WHERE id = '$id'"), 0);
 
 if (
$freeleech == 1)
 {
 
$freeimage "<img src=\"images/YOUR_IMAGE.gif\" />";
 }
 else
 {
 
$freeimage "";
 }

 print(
"\"><b>$dispname</b></a> $freeimage\n"); 
Old version (obsolete - make all torrents free addon won't work properly with this version)

1. We need to make another column in table "torrents":

PHP Code:
ALTER TABLE `torrentsADD `freeleechVARCHAR) DEFAULT 'no' NOT NULL

2. Now we need to edit announce.php

Find this

PHP Code:
 if ($upthis || $downthis 0)
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3"); 
And replace it with this:

PHP Code:
if ($upthis || $downthis 0)
 {
 
$freelech mysql_query("SELECT * FROM torrents WHERE id='$torrentid' AND freeleech='yes'");
 if (
mysql_num_rows($freelech) == 1)
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error 3");
 }
 else
 {
 
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");
 }
 } 

3. Now make file called freeleech.php in your root dir and put this in it:

PHP Code:
<?php

ob_start
("ob_gzhandler");
require_once(
"include/bittorrent.php");
dbconn();
loggedinorreturn();

$akcija $_GET['akcija'];
$napaka $_GET['napaka'];
$odstraniid $_GET['odstraniid'];

stdhead("Free Leech");

begin_main_frame();

if (
get_user_class() < UC_ADMINISTRATOR)
{
 
stdmsg("Napaka""Nimate dostopa.)"); // You don't have access
 
stdfoot();
 exit;
}

echo 
"<h1 align=center>Free Leech</h1>\n";

if (
$napaka == 1)
{
 echo 
"<br /><font color=\"red\">Torrent z tem ID-jem ne obstaja!</font><br />"// Torrent with this ID doesn't exist
}



if (
$napaka == 2)
{
 echo 
"<br /><font color=\"red\">Torrent je uspešno postal free leech!</font><br />"// This torrent is now free leech
}

if (
$napaka == 3)
{
 echo 
"<br /><font color=\"red\">Ta torrent več sedaj ni free leech!</font><br />"// This torrent isn't free leech anymore
}

echo 
"<br /><form name=\"\" method=\"post\" action=\"freeleech.php?akcija=poslji\">

 Id torrenta: 

 <input name=\"idtorrenta\" type=\"text\" value=\"\" /> 

 (vnesite ID torrenta za kategera hocete nastavit da je free leech, ce ne vete ki najdete ID niste vredni svojega statusa!

<br /><br />

<input type=\"submit\" value=\"Poslji\"></form>"
// You need to enter id of the torrent you want to make free leech



if ($akcija == "poslji")
{
 
$idtorrenta $_POST['idtorrenta'];
 
$rezultat mysql_query("SELECT * from torrents WHERE id='$idtorrenta'");
 
$ime mysql_query("SELECT name from torrents WHERE id='$idtorrenta' LIMIT 1");
 
 if (
mysql_num_rows($rezultat) < 1)
 {
 
header("Location: freeleech.php?napaka=1");
 die();
 }

 

 while (
$vrstica mysql_fetch_array($ime))
 {
 
$ime1 $vrstica[name] . " [[color="red"]freeleech[/color]]";
 
mysql_query("UPDATE torrents SET freeleech='yes', name='$ime1' WHERE id='$idtorrenta'");
 }
 
header("Location: freeleech.php?napaka=2");

}

echo 
"<br /><div align=\"center\"><h1>Free leech torrenti</h1><br />";

$rezultat mysql_query("SELECT * from torrents WHERE freeleech='yes'");

echo 
"<table width=\"500\" border=\"0\">
 <tr>
 <td class=rowhead><center>Id</center></td>
 <td class=rowhead><center>Ime</center></td>
 <td class=rowhead><center>freeleech</center></td>
 </tr>"
// Ime = Name

 

while ($vrstica mysql_fetch_array($rezultat))
{
 echo 
"
 <tr>
 <td><center>
$vrstica[id]</center></td>
 <td><center><a href=\"http://www.slo-scene.net/details.php?id=
$vrstica[id]\" target=\"_blank\">".format_comment($vrstica[name])."</a></center></td>
 <td><center><a href=\"freeleech.php?akcija=odstrani&odstraniid=
$vrstica[id]\">Odstrani</a></center></td>
 </tr>"
// Odstrani = Remove
}
echo 
"</table><br /><br />Copyrights © for free leech by Kami</div>";

if (
$akcija == "odstrani")
{
 
$rezultat mysql_query("SELECT * from torrents WHERE id='$odstraniid'");
 
mysql_query("UPDATE torrents SET freeleech='no' WHERE id='$odstraniid'");
 
 while (
$vrstica mysql_fetch_array($rezultat))
 {
 
$ime str_replace(" [[color="red"]freeleech[/color]]"" "$vrstica[name]);
 
mysql_query("UPDATE torrents SET name='$ime' WHERE id='$odstraniid'");
 }
 
 
header("Location: freeleech.php?napaka=3");
}
stdfoot();
die();
?>
4. Now we need to edit bittorrent.php (this is required if we want to have [FreeLech] after the torrent name in red color)

Find this:

PHP Code:
$dispname htmlspecialchars($row["name"]); 

And replace it with this:

PHP Code:
$dispname format_comment(htmlspecialchars($row["name"])); 
(torrent name is now formated same as comments - color tags etc.)

5. Now we also need to edit userdetails.php (this is required if we want to have [FreeLech] after the torrent name in red color)

Find this:
PHP Code:
 while ($a mysql_fetch_assoc($r))
 {
 
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
 
$a2 mysql_fetch_assoc($r2);
 
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";
 
$torrents .= "<tr><td style='padding: 0px'>$cat</td><td><a href=details.php?id=" $a["id"] . "&hit=1><b>" htmlspecialchars($a["name"]) . "</b></a></td>" .
 
"<td align=right>$a[seeders]</td><td align=right>$a[leechers]</td></tr>\n";
 } 
and replace it with this:
PHP Code:
 while ($a mysql_fetch_assoc($r))
 {
 
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
 
$a2 mysql_fetch_assoc($r2);
 
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";
 
$torrents .= "<tr><td style='padding: 0px'>$cat</td><td><a href=details.php?id=" $a["id"] . "&hit=1><b>" .

format_comment(htmlspecialchars($a["name"])) . "</b></a></td>" .
 
"<td align=right>$a[seeders]</td><td align=right>$a[leechers]</td></tr>\n";
 } 
Find this:
PHP Code:
 $ret .= "<tr><td style='padding: 0px'><img src=\"pic/$catimage\" alt=\"$catname\" width=42 height=42></td>\n" .
 
"<td><a href=details.php?id=$arr[torrent]&hit=1><b>" htmlspecialchars($arr["torrentname"]) .
 
"</b></a></td><td align=center>$ttl</td><td align=center>$size</td><td align=right>$seeders</td><td align=right>$leechers</td><td align=center>$uploaded</td>\n" .
 
"<td align=center>$downloaded</td><td align=center>$ratio</td></tr>\n"
and replace it with this:
PHP Code:
$ret .= "<tr><td style='padding: 0px'><img src=\"pic/$catimage\" alt=\"$catname\" width=42 height=42></td>\n" .
 
"<td><a href=details.php?id=$arr[torrent]&hit=1><b>" format_comment(htmlspecialchars($arr["torrentname"])) .
 
"</b></a></td><td align=center>$ttl</td><td align=center>$size</td><td align=right>$seeders</td><td align=right>$leechers</td><td align=center>$uploaded</td>\n" .
 
"<td align=center>$downloaded</td><td align=center>$ratio</td></tr>\n"
With this script you can make torrent free leech.

Free leech means, that only upload count at specified torrent.
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #7  
Old 11th June 2013, 03:39
KnightRaider's Avatar
KnightRaider KnightRaider is offline
Senior Member
 
Join Date: Nov 2012
Australia
Posts: 54
Question Does this work for 2009?
Does this mod work for tbdev 2009?
Reply With Quote
Reply

Tags
freeleech , mod , tbdev

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeleech with multiplier sharky Mods & Themes 18 8th July 2015 23:43
freeleech.eu tbdev final 2009 djblackout Community Cafe 0 23rd March 2010 04:42
tbdev.net (netmaniack's edition) 1.5 freeleech.php tunad Community Cafe 0 28th December 2008 14:44
Freeleech tunad Torrent Strike 2 18th November 2008 13:42
FreeLeech vertex Yuna Scatari Edition (YSE) 9 7th September 2008 21:38



All times are GMT +2. The time now is 08:26. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.