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
2012-04-14 01:47:47
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
2012-07-20 00:21:46
pour la version 2.08 ?

ici avec la version 2.08 il ne veux pas s'appliquer? vous pouvez m'aider svp!?

**********************************

for version 2.08?

here with the version 2.08 it will not apply? Can you help me please!?

RÉSOLU!!

change la table sql pour...

***********************************

RESOLVED!

change table for...



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


Unknown User
2012-09-07 02:46:47
Thanks, work perfectli :)
Unknown User
2013-06-06 10:48:10
hello Tiloup it's not possible this sql,and best regards this code to code founction.php

Quote:
if ($row["freeleech"] == 1) {
               $freeleech = "<img src='images/free.gif' border='0' title='Free Leech'>";
TT2.08

i suppose this code for silver

Quote:
if ($row["silver"] == 2) {
               $silver = " <img src='images/silver.gif' border='0' title='Silver'>";
                   } else {
               $silver = "";
2013-06-06 10:57:01
"phoenix75, post: 90699":

hello Tiloup it's not possible this sql,and best regards this code to code founction.php

TT2.08

i suppose this code for silver

                               if ($row["silver"] == 2)
                                       $dispname .= " <img src='images/silver.gif' title='Torrent gratuit à 50% du leech!' border='0' alt='' />";


Unknown User
2013-06-06 20:03:46
in admincp add


<td align="center"><a href="admincp.php?action=silverfree"><img src="images/admin/free_leech.png" border="0" width="32" height="32" alt="" /><br />Silver leech<br />Manager</a><br /></td>


///////////////////////////////////////////silver freeleech manager///////////////////////////////////////////////////

if ( $action == "silverfree" )
 {
          if ( is_valid_id( $_POST["type"] ) )
          {
                       $type = ( $_POST["type"] == 2 ) ? 0 : 2;
                       $size = (int) $_POST["size"];
                       
                       $where = null;
                       
                       switch ( $_POST["operand"] )
                       {
                               case 1:
                                        $operand = "=";
                                        break;
                               
                               case 2:
                                        $operand = "<";
                                        break;
                                       
                               case 3:
                                        $operand = "<=";
                                        break;
                                       
                               case 4:
                                        $operand = ">";
                                        break;
                                       
                               case 5:
                                        $operand = ">=";
                                        break;
                                       
                               default:
                                        $operand = null;
                                        break;
                       }
                       
                       if ( $operand != null )
                       {
                                $where = "AND `size` $operand $size";
                       }

                       SQL_Query_exec("UPDATE `torrents` SET `silver` = '$type' WHERE `external` = 'no' AND `banned` = 'no' $where");
                       autolink("admincp.php?action=silverfree", "silver Updated...");
          }
         
          stdhead("Silver free Management");
          navmenu();
         
          begin_frame("Silver free Management");
          ?>
         
          <form method="post" action="admincp.php?action=silverfree">
          <table border="0" cellpadding="3" cellspacing="0" width="75%" align="center">
          <tr>
                  <th class="table_head">silver</th>
                  <th class="table_head">Option</th>
                  <th class="table_head">Taille en gb</th>
  <th class="table_head">Taille en mb</th>
          </tr>
          <tr align="center">
                  <td class="table_col1">
                        <select name="type">
                         <option value="0">choisir Option</option>
                         <option value="1">Oui</option>
                         <option value="2">Non</option>
                        </select>
                  </td>
                 
                  <td class="table_col2">
                        <select name="operand">
                          <option value="0">N/A</option>
                          <option value="1">Equal à</option>
                          <option value="2">moins de</option>
                          <option value="3">Inférieure ou égale à</option>
                          <option value="4">plus que</option>
                          <option value="5">Supérieur ou égal à</option>
                        </select>
                  </td>
                 
                  <td class="table_col1">
                        <select name="size">
                          <option value="0">N/A</option>
                        <?php for ( $i = 1; $i < 51; $i++ ): ?>
                          <option value="<?php echo strtobytes("$i GB"); ?>"><?php echo $i; ?> GB</option>
                        <?php endfor; ?>
                        </select>
                  </td>
   <td class="table_col1">
                        <select name="size">
                          <option value="0">N/A</option>
                        <?php for ( $i = 50; $i < 901; $i++ ): ?>
                          <option value="<?php echo strtobytes("$i MB"); ?>"><?php echo $i; ?> MB</option>
                        <?php endfor; ?>
                        </select>
                  </td>
          </tr>
          <tr>
                       <td colspan="3" align="right">
                        <input type="submit" value="Ok" />
                       </td>
          </tr>
          </table>
          </form>
         
          <?php
          end_frame();
          stdfoot();
 }
////////////////////////////////////////////////////////////////////////////////////////////////////////////
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