Hi!I try to make change in freelech and make silver, but i need help!
sql:
;) )
find:
find:
Why "== 2" ?
Plz test this!!
this hack is by kitos14 in btitracker!
upload image in /images/
sql:
;) )
find:
ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';open functions.phpfind:
if ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0'>";
after:
if ($row["silver"] == 2)
$dispname .= " <img src='images/silver.gif' border='0'>";
save and upload
open torrents.php
find:
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech,torrents.silver, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
in this line:
torrents.owner, torrents.external, torrents.freeleech,
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver
find:
case 'freeleech': $sort = "torrents.freeleech"; $addparam .= "sort=freeleech&"; break;
add after:
case 'silver': $sort = "torrents.silver"; $addparam .= "sort=silver&"; break;
find:
echo "<option value='freeleech'" . ($_GET["sort"] == "freeleech" ? "selected" : "") . ">Freeleech</option>";
add after
echo "<option value='silver'" . ($_GET["sort"] == "silver" ? "selected" : "") . ">silver</option>";
save and upload
open torrent-edit
find:
$updateset[] = "freeleech = '".$_POST["freeleech"]."'";
after:
$updateset[] = "silver = '".$_POST["silver"]."'";
also in torrents-edit(i'm not sure for this if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td align=right><B>Free Leech: </b></TD><TD><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />Leeching is free? (Only Uploading Counts)<br>";
after:
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td align=right><B>silver: </b></TD><TD><input type=\"checkbox\" name=\"silver\"" . (($row["silver"] == "2") ? " checked=\"checked\"" : "" ) . " value=\"2\" />Leeching is 50% free? (Only 50% downloading Counts)<br>";
open index.php and find
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech,torrents,silver, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
in this line:
torrents.owner, torrents.external, torrents.freeleech
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver
close and save
open torrents-search and find:
$wherea[] = "freeleech = '1'";
add after:
$wherea[] = "silver = '2'";
find:
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech,torrents.silver, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
in this line:
torrents.owner, torrents.external, torrents.freeleech
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver,
find:
<option value="3">Free Leech</option>
add after:
<option value="4">silver</option>
save and upload
open announce.php and find:
$torrentfields = "id, name, info_hash, category, banned, freeleech, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
Replace with:
$torrentfields = "id, name, info_hash, category, banned, freeleech, silver, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
Find:
}else{
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
Add before:
}elseif ($torrent["silver"] == 2){
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + ($downthis/2) WHERE id=$userid") or err("Tracker error: Unable to update stats");
But:
if ($row["silver"]
$dispname .= " <img src='images/silver.gif' border='0'>";Why "== 2" ?
Plz test this!!
this hack is by kitos14 in btitracker!
upload image in /images/