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
User Posts

Go to Profile

Quote:
Posted 25 April 2011 - 05:10 PM

here for the people with difficulty installing this

ALTER TABLE torrents ADD silver ENUM ('0','1') DEFAULT '0';

open functions.php

find:

if ($row["freeleech"] == 1)

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

add after

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

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

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,

add after

torrents.silver,

this isnt even in torrents.php so i ignored it

case 'freeleech': $sort = "torrents.freeleech"; $addparam .= "sort=freeleech&"; break;

case 'silver': $sort = "torrents.silver"; $addparam .= "sort=silver&"; break;

echo "<option value='freeleech'" . ($_GET["sort"] == "freeleech" ? "selected" : "") . ">Freeleech</option>";

echo "<option value='silver'" . ($_GET["sort"] == "silver" ? "selected" : "") . ">silver</option>";

but can be added i guess if u read torrents.php

open torrent-edit

find

$updateset[] = "freeleech = '".$_POST["freeleech"]."'";

add after

$updateset[] = "silver = '".$_POST["silver"]."'";

find

if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){

echo "<tr><td align=right><B>".T_("FREE_LEECH").": </b></TD><TD><input type="checkbox" name="freeleech"" . (($row["freeleech"] == "1") ? " checked="checked"" : "" ) . " value="1" />".T_("FREE_LEECH_MSG")."<br>";

}

add 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"] == "1") ? " checked="checked"" : "" ) . " value="1" />Leeching is 50% free? (Only 50% downloading Counts)<br>";

}

open index.php

in the big torrent query add

torrents.silver,

and whereever else u wanna put it

torrents search.php

find

// Include freeleech

if ($_GET["freeleech"] == 1) {

$addparam .= "freeleech=1&amp;";

$thisurl .= "freeleech=1&amp;";

$wherea[] = "freeleech = '0'";

} elseif ($_GET["freeleech"] == 2) {

$addparam .= "freeleech=2&amp;";

$thisurl .= "freeleech=2&amp;";

$wherea[] = "freeleech = '1'";

}

add after

// Include silver

if ($_GET["silver"] == 1) {

$addparam .= "silver=1&amp;";

$thisurl .= "silver=1&amp;";

$wherea[] = "silver = '0'";

} elseif ($_GET["silver"] == 2) {

$addparam .= "silver=2&amp;";

$thisurl .= "silver=2&amp;";

$wherea[] = "silver = '1'";

}

find

<option value="1" <?php if ($_GET["freeleech"] == 1) echo "selected"; ?>><?php echo T_("NOT_FREELEECH");?></option>

<option value="2" <?php if ($_GET["freeleech"] == 2) echo "selected"; ?>><?php echo T_("ONLY_FREELEECH");?></option>

add after

<option value="3" <?php if ($_GET["silver"] == 1) echo "selected"; ?>><?php echo T_("NOT_SILVER");?></option>

<option value="4" <?php if ($_GET["silver"] == 2) echo "selected"; ?>><?php echo T_("ONLY_SILVER");?></option>

languages/english.php

b4 the last

?>

add

//Silver Torrent Language

$LANG["NOT_SILVER"] = "Not Silver";

$LANG["ONLY_SILVER"] = "Only Silver";

in the big query find

torrents.freeleech,

add after

torrents.silver,

open 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"] == 1){

mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + ($downthis/2) WHERE id=$userid") or err("Tracker error: Unable to update stats");

and for premium members if u search in the premium section there is a set all torrents silver option in the admincp if u search for it

ill also add the option for the upload page later so you can let uploaders set silver torrents


Works good on Version 2.07

Thanks
Thanks for this.

I would like to know how I colapse and expand the subcategory?
Thanks

Works good on 2.07
Thanks

This work on tt v2.07

regards
"TorrentialStorm, post: 44895":
You'll probably want to add loggedinonly(); to shoutbox.php after dbconn too


Works good.

Thanks
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728