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
Silver torrents
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-10-18 08:15:03
Hi!I try to make change in freelech and make silver, but i need help!

sql:

;)  )



find:

ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';
open functions.php



find:


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/
Unknown User
2008-10-18 09:40:13
you could add the code to   index,,browse and torrent search
Unknown User
2008-10-18 16:18:30
"cursed, post: 47561":
you could add the code to   index,,browse and torrent search
thanks,can someone make the mysql and announce??
Unknown User
2008-10-18 16:29:17
Maybe for announce.php  ;)

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"] == 2)

$dispname .= " <img src='images/silver.gif' border='0'>";


Why "== 2" ?
Unknown User
2008-10-18 16:32:24
"piop, post: 47580":
Maybe for announce.php  ;) 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");


maybe yes!First post udated!thanks!!
Unknown User
2008-10-18 16:34:34
I have edited:

"piop, post: 47580":
But:

if ($row["silver"] == 2)

$dispname .= " <img src='images/silver.gif' border='0'>";

Why "== 2" ?
Unknown User
2008-10-18 16:38:47
now only mysql!!
Unknown User
2008-10-18 17:41:58
maybe something like

ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';

ps im not 2 gd at this lol
Unknown User
2008-10-18 19:14:41
"cursed, post: 47585":
maybe something like
ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';

ps im not 2 gd at this lol
First post update.Now must work!!
Unknown User
2008-10-19 21:01:41
Do you known what you do ?

IF:

if ($row["silver"] == 2)
AND:


ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';



$row[silver] never equal to 2  ;)  ('yes','no'... not '2')

should have some mysql error if you install this mod.
Unknown User
2009-06-26 07:59:47
[url="http://justfuckinggoogleit.com/"]here[/url]
Unknown User
2009-06-26 08:08:10
"piop, post: 47643":
Do you known what you do ?
IF:

:)  ('yes','no'... not '2')

should have some mysql error if you install this mod.

if ($row["silver"] == 2)
AND:


ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';





$row[silver] never equal to 2




SQL should be


and averywhere there is ==2 or =2 change 2 for 1

OR if using SQL with yes and no  every ==2 or =2 should be =yes

ALTER TABLE torrents ADD silver ENUM ('0','1') DEFAULT '0';
Unknown User
2009-07-07 19:52:51
Can someone make this work. Thanks.

Or this work?
Unknown User
2009-07-09 16:03:09
this should work if you take SQL that I posted just before and change every =2 for =1
Unknown User
2009-07-13 21:56:53
Quote:
But:

if ($row["silver"]

$dispname .= " <img src='images/silver.gif' border='0'>";

This don
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