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

for mobile friendly i would use @media with a metatag this is two screenshots of the login page you will see the blocks and header will create a issue





ive been playing with this and you could hide divs using @media you could also change the css for certain screen lengths

if you right click on the page and select inspect you can see when you change size it hides the columns


heres my test account
[url='http://www.test20182018.dx.am/account-login.php?returnto=%2Findex.php']http://www.test20182018.dx.am/account-login.php?returnto=/index.php[/url]

If you open that link with a mobile I have two different views if the phone is upwards or sideways
This mod adds 11 groups to v3 and some of them are automated, it includes the class colour function mod by bigmax.
The only issue i had so far is members who signup are class 2 but members who signup using invites are class 1, its designed for people with ratio below 1 to be restricted so ideally all new members should be class 2

// Owner
// Admin
// Super Mod
// Moderator
// VIP
// Uploader
// Addict - if uploaded 250GB more than download
// Pro User - if uploaded 150GB more than download
// Power User - if uploaded 50GB more than download
// Member -  this is new base class with minum ratio of 1
// Leecher - any user with ratio below 0.9 is demoted here and can not download

SQL
Change all normal users to class 2 & update owner class
UPDATE users SET class = '2' WHERE class = '1'
UPDATE users SET class = '11' WHERE class = '7'




DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
 `group_id` int(10) NOT NULL AUTO_INCREMENT,
 `level` varchar(50) NOT NULL DEFAULT '',
 `view_torrents` enum('yes','no') NOT NULL DEFAULT 'yes',
 `edit_torrents` enum('yes','no') NOT NULL DEFAULT 'no',
 `delete_torrents` enum('yes','no') NOT NULL DEFAULT 'no',
 `view_users` enum('yes','no') NOT NULL DEFAULT 'yes',
 `edit_users` enum('yes','no') NOT NULL DEFAULT 'no',
 `delete_users` enum('yes','no') NOT NULL DEFAULT 'no',
 `view_news` enum('yes','no') NOT NULL DEFAULT 'yes',
 `edit_news` enum('yes','no') NOT NULL DEFAULT 'no',
 `delete_news` enum('yes','no') NOT NULL DEFAULT 'no',
 `can_upload` enum('yes','no') NOT NULL DEFAULT 'no',
 `can_download` enum('yes','no') NOT NULL DEFAULT 'yes',
 `view_forum` enum('yes','no') NOT NULL DEFAULT 'yes',
 `edit_forum` enum('yes','no') NOT NULL DEFAULT 'yes',
 `delete_forum` enum('yes','no') NOT NULL DEFAULT 'no',
 `control_panel` enum('yes','no') NOT NULL DEFAULT 'no',
 `staff_page` enum('yes','no') NOT NULL DEFAULT 'no',
 `staff_public` enum('yes','no') NOT NULL DEFAULT 'no',
 `staff_sort` tinyint(3) unsigned NOT NULL DEFAULT '0',
 UNIQUE KEY `base` (`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

INSERT INTO `groups` (`group_id`, `level`, `view_torrents`, `edit_torrents`, `delete_torrents`, `view_users`, `edit_users`, `delete_users`, `view_news`, `edit_news`, `delete_news`, `can_upload`, `can_download`, `view_forum`, `edit_forum`, `delete_forum`, `control_panel`, `staff_page`, `staff_public`, `staff_sort`) VALUES
(1, 'Leecher', 'yes', 'no', 'no', 'no', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'yes', 'no', 'no', 'no', 'no', 'no', 1),
(2, 'Member', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'no', 2),
(3, 'Power User', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'no', 3),
(4, 'Pro User', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'no', 4),
(5, 'Addict', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'no', 5),
(6, 'Uploader', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'yes', 6),
(7, 'VIP', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'no', 'no', 'no', 'no', 'yes', 7),
(8, 'Moderator', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', 'yes', 'yes', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 8),
(9, 'Super Mod', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 9),
(10, 'Admin', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 10),
(11, 'Owner', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 11);



In functions before the last ?> ( if colour function mod already installed just update)

////////////////////modcolor
//start class colors function
function class_user($name) {
global $site_config;
$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";
$res = SQL_Query_exec($a);
$classy = @mysqli_fetch_row($res);
switch ($classy[0]) {

case 11: // Owner
$col = "".$site_config["owner_color"]."";
break;
case 10: // Admin
$col = "".$site_config["admin_color"]."";
break;
case 9: // Super Mod
$col = "".$site_config["super_mod_color"]."";
break;
case 8: // Moderator
$col = "".$site_config["moderator_color"]."";
break;
case 7: // VIP
$col = "".$site_config["vip_color"]."";
break;
case 6: // Uploader
$col = "".$site_config["uploader_color"]."";
break;
case 5: // Addict
$col = "".$site_config["addict_color"]."";
break;
case 4: // Pro User
$col = "".$site_config["pro_user_color"]."";
break;
case 3: // Power User
$col = "".$site_config["power_user_color"]."";
break;
case 2: // Member
$col = "".$site_config["member_color"]."";
break;
case 1: // Leecher
$col = "".$site_config["leecher_color"]."";

}if($classy[1]>0){
$star="<img src='".$site_config[SITEURL]."/images/star.png' alt='donated' border='0'>";
}else{ $star="";}
if($classy[2]=="yes"){
$warn="<img src='".$site_config[SITEURL]."/images/warned.png' alt='warned' border=0>";
}else{ $warn=""; }
if($classy[3]=="no"){
$disabled="<img src='".$site_config[SITEURL]."/images/disabled.png' alt='disabled' border=0>";
}else{ $disabled=""; }
return unesc("<font color='".$col."'>".$name."".$star."".$warn."".$disabled."</font>");
}
//end class colors function


In config add ( if colour function mod already installed just update)

// class colors
$site_config['owner_color'] = '#FF0000';  // Owner / Red
$site_config['admin_color'] = '#ff9900';  // Admin / Maroon
$site_config['super_mod_color'] = '#00ff00';   // Super Mod / Lime
$site_config['moderator_color'] = '#00cc00';  // Moderator / Green
$site_config['vip_color'] = '#d9bb24';  // VIP / Gold
$site_config['uploader_color'] = '#ffff00';  // Uploader / Yellow
$site_config['addict_color'] = '#0000ff';  // Addict / Blue
$site_config['pro_user_color'] = '#005080';  // Pro User / Navy
$site_config['power_user_color'] = '#008080';  // Power User / Teal
$site_config['member_color'] = '#fff';  // Member / Black
$site_config['leecher_color'] = '#ff00ff';  // Leecher / Pink


in account_signup.php find ( now new members are class 2 )
$signupclass = '1';


change to
$signupclass = '2';


In cleanup.php find
//ORIGINAL OPTIMIZE TABLES


Add before

//===| Start Auto Promote/Demote Users |===//

//===| config
$minratio = 0.9; # ratio for demotion to LEECHER

$gigs3 = 50 * 1073741824; # 50 GB
$gigs4 = 150 * 1073741824; # 150 GB
$gigs5 = 250 * 1073741824; # 250 GB

$class1 = 1; // class 1
$class2 = 2; // class 2
$class3 = 3; // class 3
$class4 = 4; // class 4
$class5 = 5; // class 5

$delay2 = sqlesc(get_date_time(gmtime() - 1 * 1)); # Joined > 1 month


// auto promote to class 2 has ratio above 1
$res = SQL_Query_exec("SELECT id, username FROM users WHERE class = 1 AND uploaded / downloaded > $minratio");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($res)) {
   $res_classname = SQL_Query_exec("SELECT level FROM groups WHERE group_id=$class2 LIMIT 1");
   if (mysqli_num_rows($res_classname) == 1) {
       $arr_classname = mysqli_fetch_assoc($res_classname);
       $new_classname = "$arr_classname[level]";
   }
   $username = $arr[username];
   SQL_Query_exec("UPDATE users SET class = $class2 WHERE id = $arr[id]");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'Congratulations, you were automatically promoted to Member class. Please note that if your ratio drops below " . $minratio . " at any time,  you will be demoted to Leecher', 'You have been promoted as " . $new_classname . "')");
   unset($res, $arr, $res_classname, $arr_classname,$new_classname);
}

// auto demote to leecher members with ratio below 1
$res = SQL_Query_exec("SELECT id, username, modcomment FROM users WHERE (class = $class2 || class = $class3 || class = $class4 || class = $class5) AND uploaded / downloaded < $minratio");
while ($arr = mysqli_fetch_assoc($res)) {
   $username = $arr[username];
   $modcomment = $arr[modcomment];
   $modcomment2 = gmdate("d-M-Y") . " - Has been demoted by System to Leecher \n";
   $modcomment = $modcomment2 . "" . $modcomment;
   $modcom = sqlesc($modcomment);
   SQL_Query_exec("UPDATE users SET class = 1, modcomment = CONCAT($modcom,modcomment) WHERE id = $arr[id]");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'You were automatically demoted to Leecher. That happened because your ratio dropped below " . $minratio . "', 'You have been demoted to Leecher')");
   write_log("<a href=account-details.php?id=$arr[id]><b>$username</b></a> has been demoted by System to <b>Leecher</b> class");
}

// auto promote to class 3
$res = SQL_Query_exec("SELECT id, username FROM users WHERE (class = $class1 || class = $class2) AND warned = 'no' AND added < $delay2 AND uploaded >= $gigs3 AND uploaded >= downloaded");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($res)) {
   $res_classname = SQL_Query_exec("SELECT level FROM groups WHERE group_id=$class3 LIMIT 1");
   if (mysqli_num_rows($res_classname) == 1) {
       $arr_classname = mysqli_fetch_assoc($res_classname);
       $new_classname = "$arr_classname[level]";
   }
   $username = $arr[username];
   SQL_Query_exec("UPDATE users SET class = $class3 WHERE id = $arr[id]");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'Congratulations, you were automatically promoted to Power User class. Please note that if your ratio drops below " . $minratio . " at any time,  you will be demoted to Leecher', 'You have been promoted as " . $new_classname . "')");
   unset($res, $arr, $res_classname, $arr_classname,$new_classname);
}
// auto promote to class 4
$res = SQL_Query_exec("SELECT id, username FROM users WHERE (class = $class1 || class = $class2 || class = $class3) AND warned = 'no' AND added < $delay2 AND uploaded >= $gigs4 AND uploaded >= downloaded");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($res)) {
   $res_classname = SQL_Query_exec("SELECT level FROM groups WHERE group_id=$class4 LIMIT 1");
   if (mysqli_num_rows($res_classname) == 1) {
       $arr_classname = mysqli_fetch_assoc($res_classname);
       $new_classname = "$arr_classname[level]";
   }
   $username = $arr[username];
   SQL_Query_exec("UPDATE users SET class = $class4 WHERE id = $arr[id]");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'Congratulations, you were automatically promoted to Pro User class. Please note that if your ratio drops below " . $minratio . " at any time,  you will be demoted to Leecher', 'You have been promoted as " . $new_classname . "')");
   unset($res, $arr, $res_classname, $arr_classname,$new_classname);
}
// auto promote to class 5
$res = SQL_Query_exec("SELECT id, username FROM users WHERE (class = $class1 || class = $class2 || class = $class3 || class = $class4) AND warned = 'no' AND added < $delay2 AND uploaded >= $gigs5 AND uploaded >= downloaded");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($res)) {
   $res_classname = SQL_Query_exec("SELECT level FROM groups WHERE group_id=$class5 LIMIT 1");
   if (mysqli_num_rows($res_classname) == 1) {
       $arr_classname = mysqli_fetch_assoc($res_classname);
       $new_classname = "$arr_classname[level]";
   }
   $username = $arr[username];
   SQL_Query_exec("UPDATE users SET class = $class5 WHERE id = $arr[id]");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'Congratulations, you were automatically promoted to Addict class. Please note that if your ratio drops below " . $minratio . " at any time,  you will be demoted to Leecher', 'You have been promoted as " . $new_classname . "')");
   unset($res, $arr, $res_classname, $arr_classname,$new_classname);
}



[color=rgb(251, 160, 38)]I also have automation & demotion for uploaders from TTfr just add after the code above (cleanup.php)[/color]
// uploader mod test promote if 3 uploads in 2 weeks
$query = SQL_Query_exec('SELECT torrents.owner, COUNT(*)  AS counta FROM torrents INNER JOIN users ON (torrents.owner=users.id) WHERE users.class < "4" and users.donated = "0" and torrents.banned = "no" and torrents.added > DATE_SUB(NOW(), INTERVAL 15 DAY) GROUP BY torrents.owner');

while ($UP = mysqli_fetch_assoc ($query)){
   if ($UP['counta'] > 3){
       SQL_Query_exec ('UPDATE users SET class = 6 WHERE id = ' . sqlesc ($UP['owner']).'');
       $subject = 'Automatic Promotion To Uploader Status';
       $msg = 'Hello you did 1 upload, you are promoted to Uploader, Bravo !!! ';
SQL_Query_exec("INSERT INTO `messages` (`sender`, `receiver`, `added`, `subject`, `msg`, `unread`, `location`) VALUES ('0', '".$UP[owner]."','".get_date_time()."', '$subject', '$msg', 'yes', 'in')");
       }
   }

// Uploader demote if he did not upload 1 torrent over 2 week
$nbre = 0;
$query = SQL_Query_exec('SELECT id, username FROM users WHERE class = 6 ');
while ($up = mysqli_fetch_assoc ($query)){
   $query2 = SQL_Query_exec('SELECT name, added, DATE_SUB(NOW(), INTERVAL 15 DAY) AS date_expiration FROM torrents WHERE owner = '.$up['id'].'');
   while ($up2 = mysqli_fetch_assoc ($query2)){
       if ($up2["added"] > $up2["date_expiration"])
           $nbre = $nbre + 1;
       else
           $nbre = $nbre;
       }

   if ($nbre < 1){
       SQL_Query_exec('UPDATE users SET class = 2 WHERE id = ' . sqlesc ($up['id']).'');
       $subject = 'Automatic Downgrading to Member Status';
       $msg = 'You have not uploaded in the last fortnight so you have been demoted from uploader.';
       SQL_Query_exec("INSERT INTO `messages` (`sender`, `receiver`, `added`, `subject`, `msg`, `unread`, `location`) VALUES ('0', '".$up[id]."', '".get_date_time()."', '$subject', '$msg', 'yes', 'in')");
       }

   $nbre = 0;
   }  


[color=rgb(251, 160, 38)]In footer.php add links if you wish find[/color]
<!-- START FOOTER CODE -->


before

<center><a href="memberlist.php?search=&class=11"><font size="2"  color="#cc0000"><b>Owner</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=10"><font size="2"  color="#ff9900"><b>Admin</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=9"><font size="2"  color="#00ff00"><b>Super Mod</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=8"><font size="2"  color="#00cc00"><b>Moderator</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=7"><font size="2"  color="#d9bb24"><b>VIP</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=6"><font size="2"  color="#FFff00"><b>Uploader</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=5"><font size="2"  color="#0000ff"><b>Addict</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=4"><font size="2"  color="#005080"><b>Pro User</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=3"><font size="2"  color="#008080"><b>Power User</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=2"><font size="2"  color="#fff"><b>Member</b></font></a>&nbsp;&nbsp;
<a href="memberlist.php?search=&class=1"><font size="2"  color="#ff00ff"><b>Leecher</b></font></a>&nbsp;&nbsp;
</center><br />
Ajax Shoutbox V3 — 2019-04-02 07:47:57 in v3 Mods in Progress
Updated for V3 credit to original author.
Ive put in progress because i dont use this and havent tested

[color=rgb(251, 160, 38)]SQL[/color]
CREATE TABLE IF NOT EXISTS `ajshoutbox` (
   `id` mediumint(9) NOT NULL AUTO_INCREMENT,
     `uid` mediumint(9) NOT NULL,
     `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     `name` tinytext NOT NULL,
     `text` text NOT NULL,
     UNIQUE KEY `id` (`id`)
   ) ENGINE=MyISAM;


[color=rgb(251, 160, 38)]In each theme.css[/color]

   #chat {
           overflow: auto;
           width: 100%;
           height: 450px;
           padding: 0px;
   }
 
   #chatoutput ul {
           list-style: none;
           margin:0px;
           padding:0px;
           font-size: 10pt;
           padding:5px 4px 6px 5px;
   }
 
   div.chatoutput {
           /*background:#465151;#323232;*/
           background:#A8A8A8;
           padding:5px 0px 3px 10px;
           margin:0px;
           color:#000000;
           line-height: 150%;
           margin-bottom:2px;
           border-radius: 5px;
   }
 
   div.loader {
           background-image: url('images/ajshoutbox/random.php');
           background-repeat: no-repeat;
           background-position:center center;
           width:199px;
           height:137px;
   }
 
   #chatoutput ul li {
 
   }
 
   #chatoutput ul li span.name {
           display: block;
           background:url(images/ajshoutbox/bubble.png) no-repeat left;
           padding-left:19px;
           margin-bottom:1px;
           font-weight: normal;
           color:#000000;
   }
 
   #chatoutput ul li:hover span.name {
           background:url(images/ajshoutbox/bubblehover.png) no-repeat left;
   }
 
   form {
           padding:0px;
           margin:0px;
   }
 
   #chatoutput {
           text-align: left;
           margin-right: 0px;
           color: #999;
   }
 
   /* swaps edit and delete images on mouse over */
   #EditSwap {
           width:0px;
           height:0px;
           background:url(images/ajshoutbox/shout_edit_gray.gif) no-repeat bottom;
           padding:10px;
   }
   #EditSwap:hover {
           background:url(images/ajshoutbox/shout_edit.png) no-repeat bottom;
   }
   #DeleteSwap {
           width:0px;
           height:0px;
           background:url(images/ajshoutbox/shout_delete_gray.gif) no-repeat bottom;
           padding:10px;
   }
   #DeleteSwap:hover {
           background:url(images/ajshoutbox/shout_delete.png) no-repeat bottom;
   }
   /* end of swaping */
 
   img.form {
           background:url(images/ajshoutbox/frame.png) no-repeat;
   }
   img.form:hover {
           background:url(images/ajshoutbox/frame_hover.png) no-repeat;
   }
   #chatcornerup {
       width:50%;
           padding: 10px;
           background-color: #E2E2E2;
       border:1px solid #777;
           border-bottom-style:none;
           border-top-right-radius: 2em;
           border-top-left-radius: 2em;
   }
   #chatcornerdown {
           width:65%;
           padding: 10px;
           background-color: #E2E2E2;
       border:1px solid #777;
           border-bottom-style:none;
           border-top-right-radius: 2em;
           border-top-left-radius: 2em;
   }
 
   .marquee {
       width: 650px;
       margin: 0 auto;
       white-space: nowrap;
       overflow: hidden;
       box-sizing: border-box;
   }
 
   .marquee span {
       display: inline-block;
       padding-left: 100%;  /* show the marquee just outside the paragraph */
       animation: marquee 15s linear infinite;
   }
 
   .marquee span:hover {
       animation-play-state: paused
   }
 
   /* Make it move */
   @keyframes marquee {
       0%   { transform: translate(0, 0); }
       100% { transform: translate(-100%, 0); }
   }


[color=rgb(251, 160, 38)]Replace shoutbox code on index.php with[/color]
//AJAX SHOUTBOX/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
   if ($site_config['SHOUTBOX'] && !($CURUSER['hideshoutbox'] == 'yes')){
       
           require_once("backend/smilies.php");  
           require_once("shoutfun_new.php");
   begin_frame("".$site_config['SITENAME']." Shoutbox");
               
     function smile() {
 
           print "<div align='center'><table cellpadding='3' cellspacing='3'><tr>";
 
           global $smilies, $count;
           reset($smilies);
 
           while ((list($code, $url) = thisEach($smilies)) && $count<16) {
                     print("\n<td><a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
                                   <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a></td>");
                           
                     $count++;
           }
 
           print '<br /><td>&nbsp<a href="javascript:show_hide(\'sextra\');"><img src=./images/ajshoutbox/down.gif title=more border=0></a></td></tr></table></div>';
     }
   function smileextra() {
 
     global $smilies;
     reset($smilies);
 
           # getting smilies
           while (list($code, $url) = thisEach($smilies)) {
                   print("\n<a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
                              <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a>");
 
                  // $count++;
           }
 
    }
 
   ?>
 
   <script src="js/ajshoutbox.js" language="Javascript" type="text/javascript"></script>
 
   <br />
       <table align=center class=ajshoutboxbackground width=98%><tr>
       <td align=center>
   <div align='center'><b><font color=green>Member</font> | <font color=brown>Power User</font> | <font color=dimgray>VIP</font> | <font color=purple>Uploader</font> |<font color=pink>Moderator</font> | <font color=#009AFF>Super Moderator</font> | <font color=red>Administrator</font>| <font color=#00ffbf>Site Owner</font></b></br></br>
                 <p class="microsoft marquee"><span><?php echo "".T_("SHOUTINFO").""; ?></span></p></div></div>

            <div id="shoutheader">
         
           <form id="chatForm" name="chatForm" onsubmit="return false;" action="">
       
             <input type="hidden" name="name" id="name" value="<?php echo $CURUSER["username"] ?>" />
             <input type="hidden" name="uid" id="uid" value="<?php echo $CURUSER["id"] ?>" />

                     <table align=center width=98%><tr>
                     <td align=center>
                     <div align=center><?php echo smile();?></div><br />
                     <input type="text" size="105" maxlength="500"  placeholder=<?php echo"'".T_('SHOUT_HERE')."'" ;?> name="chatbarText" id="chatbarText" onblur="checkStatus('');" onfocus="checkStatus('active');" />
             <input onclick="sendComment();" type="submit" id="submit" name="submit" value="Confirm" />
             &nbsp;
             <a href="javascript: PopMoreSmiles('chatForm','chatbarText');">
             <img src="images/ajshoutbox/smile.gif" border="0" class="form" title="smilies" align="top" alt="" /></a>
 
             <a href="javascript: Pophistory()">
             <img src="images/ajshoutbox/quote.gif" width="24" height="24" border="0" class="form" title="History/Moderate" align="top" alt="" /><b><font color = red><--View old shouts or edit shouts</font></b></a>
                     <br /><br />
             <div style="display: none;" id="sextra"><?php echo shoutfun('chatForm','chatbarText');?></div><div style="display: none;" id="sextra1"><br><?php echo smileextra();?></div>
             <br />
       </td>
       </tr>
   </table><br />
   </form>
   </div>

    <div id="chat">
 
     <div id="chatoutput">
 
             <ul id="outputList">
 
                   <li>
                     <span class="name"><b><?php echo $site_config['SITENAME'];?> Shoutbox:</b></span><h2 style='padding-left:20px;'>WELCOME</h2>
                 
                           <center><div class="loader"></div></center>
 
                     </li>
 
             </ul>
 
     </div>
       
   </div>
   </td>
       </tr>
   </table><br /><br />
 
   <!--<script language="Javascript">
   $(".toggle").on("click", function () {
       $(".marquee").toggleClass("microsoft");
   })
   </script>-->
   <script language="Javascript">
   function show_hide(sextra)
   {
     if(document.getElementById(sextra))
     {
           if(document.getElementById(sextra).style.display == 'none')
           {
             document.getElementById(sextra).style.display = 'inline';
           }
           else
           {
             document.getElementById(sextra).style.display = 'none';
           }
     }
   }
   function show_hide(sextra1)
   {
     if(document.getElementById(sextra1))
     {
           if(document.getElementById(sextra1).style.display == 'none')
           {
             document.getElementById(sextra1).style.display = 'inline';
           }
           else
           {
             document.getElementById(sextra1).style.display = 'none';
           }
     }
   }
   </script>
   </center>
   <?php
   end_frame();
   }                  
 
   //END_AJAX_SHOUTBOX////////////////////////////////////////////////////////////////////////////////////////////////////////


[color=rgb(251, 160, 38)]In english.php add[/color]
    //ajax chat
   $LANG["SHOUT_HERE"] = "Shout Here";
   $LANG["STAFF_SHOUT"] = "Staff Shout";
   $LANG["SHOUTINFO"] = "<b><u>Shoutbox Rules</u></b>: English Only, <font color='red'>No</font> <i>Swearing, Personal Attacks, Abuse,</i> or <i>Spamming</i> and <font color='red'>No</font> <i>Publishing Serials, or Cracks</i> ETC. <img src=images/smilies/razz.png>";


Add contents of root folder to root

to clear shoutbox, in functions.php in format_comment find

           return $s;
   }

add

   global $CURUSER;
           $is_mod=$CURUSER["control_panel"]=='yes';
           
           
   
     if ((preg_match_all ('' . '#^/clean(.*)$#', $s, $Matches, PREG_SET_ORDER) AND $is_mod))
     {
           return execcommand_clean ($Matches);
     }elseif ((preg_match_all ('' . '#^/clean(.*)$#', $s, $Matches, PREG_SET_ORDER) AND !$is_mod))
     {return execcommand_noclean($Matches);}
I'm not familiar with bootstrap is this for the purpose of making mobile friendly because I might know another way
Had a quick look at this, wanted to see the Google & Facebook login not sure how hard that would be to get going, it looks nice but there's 60+ files all though it could be slimmed down its got potential but you can center current code and add a background image giving the same effect, I like to keep my files slimmed down now on my 2.08 i had loads of files and half started code lol
Top 10 — 2019-03-31 06:47:39 in v3 Mods Completed
Updated for V3 credit to original author

Add link on site i have mine in navblock you can put it on navbar in header
echo "<li><a href='topten.php'>Top 10</a></li>";


Add topten.php to root

both deletion by seedbonus & upload GB are working, the log seems fine as well
One of my mods noticed he could change my account on account-details.php so looked at the code

    print("<form method='post' action='admin-modtasks.php'>\n");
   print("<input type='hidden' name='action' value='edituser' />\n");
   print("<input type='hidden' name='userid' value='$id' />\n");
   print("<table border='0' cellspacing='0' cellpadding='3'>\n");
   print("<tr><td>".T_("TITLE").": </td><td align='left'><input type='text' size='67' name='title' value=\"$user[title]\" /></td></tr>\n");
   print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$user[email]\" /></td></tr>\n");
   print("<tr><td>".T_("SIGNATURE").": </td><td align='left'><textarea cols='50' rows='10' name='signature'>".htmlspecialchars($user["signature"])."</textarea></td></tr>\n");
   print("<tr><td>".T_("UPLOADED").": </td><td align='left'><input type='text' size='30' name='uploaded' value=\"".mksize($user["uploaded"], 9)."\" /></td></tr>\n");
   print("<tr><td>".T_("DOWNLOADED").": </td><td align='left'><input type='text' size='30' name='downloaded' value=\"".mksize($user["downloaded"], 9)."\" /></td></tr>\n");
   print("<tr><td>".T_("AVATAR_URL")."</td><td align='left'><input type='text' size='67' name='avatar' value=\"$avatar\" /></td></tr>\n");
   print("<tr><td>".T_("IP_ADDRESS").": </td><td align='left'><input type='text' size='20' name='ip' value=\"$user[ip]\" /></td></tr>\n");
   print("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");

   if ($CURUSER["class"] > $user["class"]){
       print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
       $maxclass = $CURUSER["class"];
       for ($i = 1; $i < $maxclass; ++$i)
       print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
       print("</select></td></tr>\n");
   }


   print("<tr><td>".T_("DONATED_US").": </td><td align='left'><input type='text' size='4' name='donated' value='$user[donated]' /></td></tr>\n");
   print("<tr><td>".T_("PASSWORD").": </td><td align='left'><input type='password' size='67' name='password' value=\"$user[password]\" /></td></tr>\n");
   print("<tr><td>".T_("CHANGE_PASS").": </td><td align='left'><input type='checkbox' name='chgpasswd' value='yes'/></td></tr>");
   print("<tr><td>".T_("MOD_COMMENT").": </td><td align='left'><textarea cols='50' rows='10' name='modcomment'>$modcomment</textarea></td></tr>\n");
   print("<tr><td>".T_("ACCOUNT_STATUS").": </td><td align='left'><input name='enabled' value='yes' type='radio' " . ($enabled ? " checked='checked'" : "") . " />Enabled <input name='enabled' value='no' type='radio' " . (!$enabled ? " checked='checked' " : "") . " />Disabled</td></tr>\n");
   print("<tr><td>".T_("WARNED").": </td><td align='left'><input name='warned' value='yes' type='radio' " . ($warned ? " checked='checked'" : "") . " />Yes <input name='warned' value='no' type='radio' " . (!$warned ? " checked='checked'" : "") . " />No</td></tr>\n");
   print("<tr><td>".T_("FORUM_BANNED").": </td><td align='left'><input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td></tr>\n");
   print("<tr><td>".T_("PASSKEY").": </td><td align='left'>$user[passkey]<br /><input name='resetpasskey' value='yes' type='checkbox' />".T_("RESET_PASSKEY")." (".T_("RESET_PASSKEY_MSG").")</td></tr>\n");
   print("<tr><td colspan='2' align='center'><input type='submit' value='".T_("SUBMIT")."' /></td></tr>\n");
   print("</table>\n");
   print("</form>\n");


[color=rgb(250, 197, 28)]so to make it safer i expand this part[/color]

    if ($CURUSER["class"] > $user["class"]){
       print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
       $maxclass = $CURUSER["class"];
       for ($i = 1; $i < $maxclass; ++$i)
       print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
       print("</select></td></tr>\n");
   }


[color=rgb(250, 197, 28)]so if a users class is below someone elses account nothing shows it now looks like this[/color]

    print("<form method='post' action='admin-modtasks.php'>\n");
   print("<input type='hidden' name='action' value='edituser' />\n");
   print("<input type='hidden' name='userid' value='$id' />\n");
   print("<table border='0' cellspacing='0' cellpadding='3'>\n");
   if ($CURUSER["class"] > $user["class"]){
   print("<tr><td>".T_("TITLE").": </td><td align='left'><input type='text' size='67' name='title' value=\"$user[title]\" /></td></tr>\n");
   print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$user[email]\" /></td></tr>\n");
   print("<tr><td>".T_("SIGNATURE").": </td><td align='left'><textarea cols='50' rows='10' name='signature'>".htmlspecialchars($user["signature"])."</textarea></td></tr>\n");
   print("<tr><td>".T_("UPLOADED").": </td><td align='left'><input type='text' size='30' name='uploaded' value=\"".mksize($user["uploaded"], 9)."\" /></td></tr>\n");
   print("<tr><td>".T_("DOWNLOADED").": </td><td align='left'><input type='text' size='30' name='downloaded' value=\"".mksize($user["downloaded"], 9)."\" /></td></tr>\n");
   print("<tr><td>".T_("AVATAR_URL")."</td><td align='left'><input type='text' size='67' name='avatar' value=\"$avatar\" /></td></tr>\n");
   print("<tr><td>".T_("IP_ADDRESS").": </td><td align='left'><input type='text' size='20' name='ip' value=\"$user[ip]\" /></td></tr>\n");
   print("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");


       print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
       $maxclass = $CURUSER["class"];
       for ($i = 1; $i < $maxclass; ++$i)
       print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
       print("</select></td></tr>\n");



   print("<tr><td>".T_("DONATED_US").": </td><td align='left'><input type='text' size='4' name='donated' value='$user[donated]' /></td></tr>\n");
   print("<tr><td>".T_("PASSWORD").": </td><td align='left'><input type='password' size='67' name='password' value=\"$user[password]\" /></td></tr>\n");
   print("<tr><td>".T_("CHANGE_PASS").": </td><td align='left'><input type='checkbox' name='chgpasswd' value='yes'/></td></tr>");
   print("<tr><td>".T_("MOD_COMMENT").": </td><td align='left'><textarea cols='50' rows='10' name='modcomment'>$modcomment</textarea></td></tr>\n");
   print("<tr><td>".T_("ACCOUNT_STATUS").": </td><td align='left'><input name='enabled' value='yes' type='radio' " . ($enabled ? " checked='checked'" : "") . " />Enabled <input name='enabled' value='no' type='radio' " . (!$enabled ? " checked='checked' " : "") . " />Disabled</td></tr>\n");
   print("<tr><td>".T_("WARNED").": </td><td align='left'><input name='warned' value='yes' type='radio' " . ($warned ? " checked='checked'" : "") . " />Yes <input name='warned' value='no' type='radio' " . (!$warned ? " checked='checked'" : "") . " />No</td></tr>\n");
   print("<tr><td>".T_("FORUM_BANNED").": </td><td align='left'><input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td></tr>\n");
   print("<tr><td>".T_("PASSKEY").": </td><td align='left'>$user[passkey]<br /><input name='resetpasskey' value='yes' type='checkbox' />".T_("RESET_PASSKEY")." (".T_("RESET_PASSKEY_MSG").")</td></tr>\n");

   print("<tr><td colspan='2' align='center'><input type='submit' value='".T_("SUBMIT")."' /></td></tr>\n");
   }
   print("</table>\n");
   print("</form>\n");
Ive got this installed and so far so good, still in testing phase, its a pain testing HnR on a live site dont want to warn or ban everyone lol, if you can help improve it great
IMDb Mod [TTv3] — 2019-03-28 03:22:10 in v3 Mods Completed
Yeah I don't see where micromonkey as tried taking credit, but over the next few weeks I will go through the old site and original tt site and give proper credits to the mods
Updated for V3 credit to Original Author

In shoutbox.php find

echo date('jS M, g:ia', utc_to_tz_time($row['date']));


add after

$ol3 = @mysqli_fetch_array(SQL_Query_exec("SELECT avatar FROM users WHERE id=".$row["userid"]));
$av=$ol3['avatar'];
if(!empty($av)){
$av="<img src='".$ol3[avatar]."' alt='my_avatar' width='27' height='27'>";
}else{
$av="<img src='images/default_avatar.png' alt='my_avatar' width='27' height='27'>";
}
if($row['userid']==0){
$av="<img src='images/default_avatar.png' alt='default_avatar' width='27' height='27'>";
}
@mysqli_free_result($ol3);


find

    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){
       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a></div>";
   }

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));


replace with


   if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a>&nbsp;&nbsp;".$av."<div>";

   }

echo "<div align='right' style='float: right'></div>";

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));



add shoutboxedit.php
TorrentTrader 3.0 — 2019-03-24 04:25:34 in v3 Download
just noticed the faq.php doesnt work, this is mine im using now from the micro version thats working
what version of torrenttrader are you using?
Updated for V3 credit to Original Author

Remove hit & run with seedbonus or upload, you must have seedbonus installed

[color=rgb(251, 160, 38)]sql (it is recommended you export your bonus table and edit for your own needs)[/color]
DROP TABLE IF EXISTS `bonus`;
CREATE TABLE `bonus` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `title` varchar(50) COLLATE utf8_bin NOT NULL,
 `cost` decimal(10,1) unsigned NOT NULL DEFAULT '0.0',
 `value` bigint(20) unsigned NOT NULL DEFAULT '0',
 `descr` varchar(100) COLLATE utf8_bin NOT NULL,
 `type` enum('traffic','invite','VIP','other','HnR') COLLATE utf8_bin NOT NULL DEFAULT 'other',
 PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

INSERT INTO `bonus` (`id`, `title`, `cost`, `value`, `descr`, `type`) VALUES
(1,'1 GB Uploaded',70.0,1073741824,'Exchange 70 points for 1 GB upload..','traffic'),
(2,'2 GB Uploaded',100.0,2147483648,'Exchange 100 points for 2 GB upload..','traffic'),
(3,'5 GB Uploaded',250.0,5368709120,'Exchange 250 points for 5 GB upload..','traffic'),
(4,'10 GB Uploaded',500.0,10737418240,'Exchange 500 points for 10 GB upload..','traffic'),
(5,'Invitations',100.0,4,'Receive 4 Invitations for 1000.00 points of seedbonus','invite'),
(6,'HnR',50.0,1,'Remove a hit and run from your account.','HnR');


[color=rgb(251, 160, 38)]In mybonus.php find (already added in mybonus TTv3 mod)[/color]
case 'traffic':
                SQL_Query_exec("UPDATE `users` SET `uploaded` = `uploaded` + '$row->value' WHERE `id` = '$CURUSER[id]'");
                break;



           case 'HnR':
               $uid = $CURUSER["class"] == "1" ? (int) $_POST["userid"] : (int) $CURUSER["id"];
               $tid = (int) $_POST["torrentid"];
     
           if ( empty($tid) )
               autolink("mybonus.php", "You must fill the box with the id of the torrent.");
           if ( isset ($uid) && isset ($tid) )
           {
               $res = SQL_Query_exec("SELECT * FROM `snatched` WHERE `tid` = '$tid' AND `uid` = '$uid' AND `hnr` = 'yes'");
               if ( mysqli_num_rows($res) == 0 )
                   autolink("mybonus.php", "No HnR found with this information.");
               $res1 = SQL_Query_exec("SELECT `username` FROM `users` WHERE `id` = '$uid'");
               $row1 = mysqli_fetch_assoc($res1);
               $res2 = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '$tid'");
               $row2 = mysqli_fetch_assoc($res2);
               $username = htmlspecialchars($row1["username"]);
               $torname = htmlspecialchars($row2["name"]);
     
               write_log ("The HnR of <a href='account-details.php?id=".$uid."'>".class_user($username)."</a> on the torrent <a href='torrents-details.php?id=".$tid."'>".$torname."</a> has been cleared by <a href='account-details.php?id=".$CURUSER['id']."'>".class_user($CURUSER['username'])."</a>");
         
               $new_modcomment = gmdate("d-m-Y \à H:i") . " - ";
               if ( $uid == $CURUSER["id"] )
                   $new_modcomment.= "H&R on the torrent ".$torname." cleared against ".$row->cost." points \n";
               else
                   $new_modcomment.= "H&R on the torrent ".$torname." cleared by ".$CURUSER['username']." \n";
               $modcom = sqlesc($new_modcomment);
         
               SQL_Query_exec("UPDATE `users` SET `modcomment` = CONCAT($modcom,modcomment) WHERE id = '$uid'");
               SQL_Query_exec("UPDATE `snatched` SET `ltime` = '129600', `hnr` = 'no' WHERE `tid` = '$tid' AND `uid` = '$uid'");
           }
           break;


[color=rgb(251, 160, 38)]in theme/default/footer.php find[/color]
 middleblocks();


add after
                // Start Hit and Run Warning
$jquery = SQL_Query_exec("SELECT COUNT `hnr` FROM `snatched` WHERE `uid` = '".$CURUSER["id"]."' AND `hnr` = 'yes'");

$res2 = mysqli_fetch_row($jquery);
$hnr = "<font style=\"background-color:#252525\" color=\"#FEFEFE\"><b>&nbsp; ".$res2[0]." &nbsp;</font>";
$hnr2 = $res2[0];

if  ($res2[0] > 0) {
   echo"<div style='margin-bottom:5px'>
       <table align=center width=100% border=0 cellspacing=0 cellpadding=10>
           <tr>
       <td style='padding: 10px; background: #AB0000' align=center>
       <div style='font: bold 15px Times New Roman; color:#FFBF00'>
           Hey $CURUSER[username], you have ".$hnr." recording".($hnr2 > 1 ? "s" : "")." for Hit and Run!&nbsp; View the recordings into <a href=snatched.php><font size=3 color=#CBCBCB>Your Snatch List</font></a>
           </div>
       <div style='font: bold 15px Times New Roman; color:#FFBF00'>
           You must to keep seeding or you can <a href=required.php><font size=3 color=#CBCBCB>Trade to Delete</font></a> ".($hnr2 > 1 ? "these recordings" : "this recording")." with Seed Bonus or Upload
           </div>
           </td>
           </tr>
           </table>
           </div>\n";
}
// End Hit and Run Warning


[color=rgb(251, 160, 38)]In english.php add[/color]

 // trade Hit & Run
$LANG["DELETED_RECORDING"] ="Has deleted a recording of H&R for Torrent ID:";
$LANG["POINTS_OF_SEED_BONUS"] ="with <b>100 points</b> of Seed Bonus.";
$LANG["YOUR_RECORDINGS_OF_HIT_AND_RUN"] ="Your Recordings of Hit and Run";
$LANG["ONE_RECORDING_HIT_AND_RUN_DELETED"] ="One recording for Hit and Run was deleted.";
$LANG["DELETED_RECORDING"] = "has deleted a recording of H&R for Torrent ID:";
$LANG["OF_UPLOAD"] = "of Upload";
$LANG["HIT_AND_RUN_FOR"] ="for";
$LANG["HIT_AND_RUN_HOURS_RATIO_BECOMES"] ="hours or until ratio becomes";
$LANG["HIT_AND_RUN_DELETE"] ="But if you want a fast way, you can trade to delete";
$LANG["HIT_AND_RUN_WITH"] = "With";
$LANG["SEED_TIME"] = "Seed Time";
$LANG["SNATCHLIST_SEEDBONUS"] = "Seed Bonus";
$LANG["SNATCHLIST_YOU_DONT_HAVE_ENOUGH"] = "You don't have enough";
$LANG["SNATCHLIST_FOR_TRADING"] = "for trading !";
$LANG["SNATCHLIST_UPLOAD"] = "Upload";
$LANG["SNATCHLIST_COST"] = "Cost";
$LANG["YOUR_LIST_OF_HITS_AND_RUN"] = "Your List of Hits and Run is empty";
$LANG["HIT_AND_RUN_YOUR_SNATCH_LIST"] ="View Your Snatch List";
$LANG["TO_SOLVE_THIS_PROBLEM_SEEDING"] ="To solve this problem you must to keep seeding";
$LANG["SNATCHLIST_POINTS_OF_SEED_BONUS"] = "points of Seed Bonus";



Add requried.php  to root
Add images to images folder



Updated for V3 credit to Original Author updated and added ability for staff to delete H&Rs

[color=rgb(247, 218, 100)]You must have snatchlist installed[/color] http://www.torrenttrader.xyz/index.php?threads/snatchlist-ttv3.9726/
You can import the table bits you need or i find it easier to remove the snatched table and just import the full new table on a live site i would recommend exporting the data first so you can add it back afterwards

[color=rgb(251, 160, 38)]sql[/color]

DROP TABLE IF EXISTS `snatched`;
CREATE TABLE `snatched` (
 `sid` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `tid` int(11) unsigned NOT NULL DEFAULT '0',
 `uid` int(11) unsigned NOT NULL DEFAULT '0',
 `stime` int(11) unsigned NOT NULL DEFAULT '0',
 `utime` int(11) unsigned NOT NULL DEFAULT '0',
 `ltime` int(11) unsigned NOT NULL DEFAULT '0',
 `uload` bigint(20) unsigned NOT NULL DEFAULT '0',
 `dload` bigint(20) unsigned NOT NULL DEFAULT '0',
 `completed` enum('0','1') COLLATE utf8_bin NOT NULL DEFAULT '0',
 `hnr` enum('no','yes') COLLATE utf8_bin NOT NULL DEFAULT 'no',
 `done` enum('yes','no') COLLATE utf8_bin NOT NULL DEFAULT 'no',
 `hitrun` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `hitrunwarn` enum('yes','pending','no') COLLATE utf8_bin NOT NULL DEFAULT 'no',
 PRIMARY KEY (`sid`),
 UNIQUE KEY `tid_uid` (`tid`,`uid`),
 KEY `completed` (`completed`),
 KEY `tid` (`tid`),
 KEY `uid` (`uid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

ALTER TABLE `users` ADD `hitruns` tinyint( 3 ) unsigned NOT NULL default '0';


[color=rgb(247, 218, 100)]Because we remove the table it shows a few errors but this is nothing to worry about just empty the sqlerr table once the new snatched table is added[/color]


[color=rgb(251, 160, 38)]Add in config.php  :[/color]
[color=rgb(247, 218, 100)]This is where everything is set - ban is at 50 be careful here to be reasonable you dont want to ban all members, for testing reduce these for more results[/color]
//hit mod
$site_config["hnr_deadline"] = 7*86400; // 7 days to hit the seed target
$site_config["hnr_seedtime"] = 172800; // target is to seed for 48 hours
$site_config["hnr_warn"] = 5; // 5 hit & runs then warned
$site_config["hnr_stop_dl"] = 5;  // After 5 H & R stop downloading
$site_config["hnr_ban"] = 50;  // After 50 H&R they are banned
// hit end



[color=rgb(251, 160, 38)]in admincp.php find[/color]
<td align="center"><a href="admincp.php?action=sqlerr"><img src="images/admin/sql_error.png" border="0" width="118" width="80" alt="" /><br />SQL Error<br /></a></td>


add after
<td align="center"><a href=admincp.php?action=hnr><img src="images/admin/hitnrun.png" border=0 width=32 height=32><br />List of Hit and Run</a><br /></td>


add before last ?>

//Start List of Hit and Run
if ($action=="hnr")
{
    if ($_POST['do'] == 'delete')
     {
         if (!@count($_POST['ids'])) show_error_msg(T_("ERROR"), "Nothing Selected.", 1);
         $ids = array_map('intval', $_POST['ids']);
         $ids = implode(',', $ids);
          SQL_Query_exec("UPDATE snatched SET ltime = '86400', hnr = 'no', done = 'yes' WHERE `sid` IN ($ids)");
         autolink("admincp.php?action=hnr", "Entries deleted.");
     }

   stdhead("List of Hit and Run");
   navmenu();


   $res = SQL_Query_exec("SELECT * FROM `snatched` where hnr='yes' ");
     $row = mysqli_fetch_array($res);
    $count = $row[0];

   $perpage = 50;

   list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=hnr&amp;");


   begin_frame("List of Hit and Run");
   print("<div style='margin-top:10px; margin-bottom:10px' align='center'><font size=2>We have <font color=red><b>$count</b></font> User".($count > 1 ? "s" : "")." with Hit and Run</font></div>");

$sql = "SELECT *,s.tid FROM users u left join snatched s on s.uid=u.id  where hnr='yes' ORDER BY s.uid DESC $limit";
   $result = SQL_Query_exec($sql);
   if( mysqli_num_rows($result) != 0 )
   {
       print("$pagertop");

     print'<form id="snatched" method="post" action="admincp.php?action=hnr">';
     print'<input type="hidden" name="do" value="delete" />';
     print'<table cellpadding="5" class="table_table" width="100%">';
     print'<tr>';

       print'<td class="table_head"><b>User</b></td>';
       print'<td class="table_head"><b>Torrent</b></td>';
       print'<td class="table_head"><b>Uploaded</b></td>';
       print'<td class="table_head"><b>Downloaded</b></td>';
       print'<td class="table_head"><b>Seed&nbsp;Time</b></td>';
       print'<td class="table_head"><b>Started</b></td>';
       print'<td class="table_head"><b><b>Last&nbsp;Action</b></td>';
       print'<td class="table_head"><input type="checkbox" name="checkall" onclick="checkAll(this.form.id)" /></td>';
           print'</tr>';
       while($row = mysqli_fetch_assoc($result))
       {
           if ($site_config['MEMBERSONLY'])
           {
               $sql1 = "SELECT id, username FROM users WHERE id = $row[uid]";
               $result1 = SQL_Query_exec($sql1);
               $row1 = mysqli_fetch_assoc($result1);
           }
          if ($row1['username'])
              print'<tr><td class=table_col1><a href="account-details.php?id=' . $row['uid'] . '"><b>'.class_user($row1['username']).'</b></a></td>';
           else
               print'<tr><td class=table_col1>'.$row[ip].'</td>';
           $sql2 = "SELECT name FROM torrents WHERE id = $row[tid]";
           $result2 = SQL_Query_exec($sql2);
           while ($row2 = mysqli_fetch_assoc($result2))
           {
               $smallname =substr(htmlspecialchars($row2["name"]) , 0, 35);
               if ($smallname != htmlspecialchars($row2["name"])) { $smallname .= '...'; }
   
               $stime = mkprettytime($row[ltime]);
               $startdate = utc_to_tz(get_date_time($row['stime']));
               $lastaction = utc_to_tz(get_date_time($row['utime']));
       
               print'<td class=table_col2><a href="torrents-details.php?id=' . $row['tid'] . '">' . $smallname . '</td>';
                   print'<td class=table_col1><font color=limegreen>' . mksize($row['uload']) . '</font></td>';
                   print'<td class=table_col2><font color=red>' . mksize($row['dload']) . '</font></td>';  
                   print'<td class=table_col1>'.(is_null($stime)?'0':$stime).'</td>';
                   print'<td align=center class=table_col2>'.date('d.M.Y H:i', sql_timestamp_to_unix_timestamp($startdate)).'</td>';
                   print'<td align=center class=table_col1>'.date('d.M.Y H:i', sql_timestamp_to_unix_timestamp($lastaction)).'</td>';
                   print'<td class=table_col1><input type=checkbox name=ids[] value=' . mksize($row['sid']) . '/></td>';
           }
       }

       print'</table><br />';
       echo "<input type='submit' value='Delete' /></center>";
       print("$pagerbottom");

   }
   else
   {
       print'<b><center>No recordings of Hit and Run</center></b><br />';
   }

   end_frame();
   stdfoot();
}
#======================================================================#
# End List of Hit and Run
#======================================================================#




[color=rgb(251, 160, 38)]in cleanup.php find:[/color]

//REMOVE WARNING
$res = SQL_Query_exec("SELECT users.id, users.username FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND warned = 'yes' AND enabled='yes' AND uploaded / downloaded >= $minratio AND downloaded >= $downloaded");


replace with :

// REMOVE WARNINGS // hit mod
   $res = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type != 'Poor Ratio' AND type != 'HnR' AND warned = 'yes' AND enabled='yes' AND warnings.active = 'yes' AND warnings.expiry < '".get_date_time()."'"); // end


search :

//OPTIMIZE TABLES


add before :

//HIT & RUN mod
   $timenow = gmtime();
   SQL_Query_exec("UPDATE snatched SET hnr = 'yes' WHERE completed = '1' AND hnr = 'no' AND uload < dload AND $timenow - $site_config[hnr_deadline] > stime AND $site_config[hnr_seedtime] > ltime AND done='no'");
   SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND uload >= dload");
   SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND ltime >= $site_config[hnr_seedtime]");
   $a = SQL_Query_exec("SELECT DISTINCT uid FROM snatched WHERE hnr = 'yes' AND done='no'");
   if ( mysqli_num_rows($a) > 0 ) :
   while ($b = mysqli_fetch_row($a)) :
   $c = SQL_Query_exec("SELECT COUNT( hnr ) FROM snatched WHERE uid = $b[0] AND hnr = 'yes'");
   $d = mysqli_fetch_row($c);
   $count = $d[0];
   $user = $b[0];

   $length = $site_config["hnr_disabled"];
   $expiretime = gmdate("Y-m-d H:i:s", $timenow + $length);

   $e = SQL_Query_exec("SELECT type, active FROM warnings WHERE userid = '$user'");
   $f = mysqli_fetch_row($e);
   $type = $f[0];
   $active = $f[1];

   //warn
   if ( $count >= $site_config["hnr_warn"] && $type != "HnR" ) :
   $reason = "".T_("CLEANUP_WARNING_FOR_ACCUMULATING")." ".$site_config['hnr_warn']." H&R.";
   $subject = "".T_("CLEANUP_WARNING_FOR_H&R")."";
   $msg = "".T_("CLEANUP_YOU_HAVE_BEEN_WARNEWD_ACCUMULATED")." ".$site_config['hnr_warn']." ".T_("CLEANUP_H&R_INVITE_CHECK_RULE")."\n".T_("CLEANUP_MSG_WARNING_7_DAYS_BANNED")."";

   $rev = SQL_Query_exec("SELECT enabled FROM users WHERE id = $user");
   $rov = mysqli_fetch_assoc($rev);
   if ($rov["enabled"] == "yes") :
                    SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE id = $user");

                    SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ($user,".sqlesc($reason).",'".get_date_time()."','".$expiretime."','0','HnR')");
   
                    SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 1)");
   endif;
   endif;

   //Unwarned
   if ( $count < $site_config["hnr_warn"] && $type == "HnR") :
   $subject = "".T_("CLEANUP_REMOVAL_OF_H&R_WARNING")."";
   $msg = "".T_("CLEANUP_YOU_NOW_HAVE_LESS_THAN")." ".$site_config['hnr_warn']." H&R.\n".T_("CLEANUP_YOUR_WARNING_FOR_H&R_HAS_REMOVED")."";
   
   SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $user");
   
   SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");
   
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 1)");
   endif;

   //Ban
   if ( $count >= $site_config["hnr_ban"] ) :
   $g = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $user");
   $h = mysqli_fetch_row($g);
   $modcomment = $h[2];
   $modcomment = gmdate("d/m/Y") . " - ".T_("CLEANUP_BANNED_FOR")." " .$count. " H&R.\n " .$modcomment;
   SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $user");

   SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");

   write_log(T_("CLEANUP_THE_MEMBER")." <a href='account-details.php?id=".$user."'>".$h[0]."</a> ".T_("CLEANUP_HAS_BEEN_BANNED_REASON")." ".$count." H&R.");

   $subject = "".T_("CLEANUP_YOUR_ACCOUNT")." $site_config[SITENAME] ".T_("CLEANUP_HAS_BEEN_DISABLED")."";
   $body = "".T_("CLEANUP_YOU_WERE_BANNED_FOLLOWING")."\n
   ------------------------------
   \n/".T_("CLEANUP_YOU_HAVE_ACCUMULATED")." $count H&R.\n
   ------------------------------
   \n".T_("CLEANUP_YOU_CAN_CONTACT_BY_LINK")." :
   ".$site_config['SITEURL']."/contact.php
   \n\n\n".$site_config['SITENAME']." ".T_("ADMIN");
   sendmail($h[1], "$subject", "$body", "".T_("OF").": $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
   endif;
   endwhile;
   endif;

   //Ban warned
   $timenow = gmtime();
   $k = SQL_Query_exec("SELECT userid FROM warnings WHERE type = 'HnR' AND active = 'yes' AND UNIX_TIMESTAMP(expiry) < $timenow");
   if ( mysqli_num_rows($k) > 0 ) :
   while ($l = mysqli_fetch_row($k)) :
   $m = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $l[0] AND enabled = 'yes' AND warned = 'yes'");
   $n = mysqli_fetch_row($m);

   $modcomment = $n[2];
   $modcomment = gmdate("d/m/Y") . " - ".T_("CLEANUP_BANNED_FOR_EXPIRED_H&R_WARNING_TIMEOUT")."\n " .$modcomment;
   SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $l[0]");

   SQL_Query_exec("DELETE FROM warnings WHERE userid = $l[0] AND type = 'HnR'");

   write_log(T_("CLEANUP_THE_MEMBER")." <a href='account-details.php?id=".$l[0]."'>".$n[0]."</a> ".T_("CLEANUP_HAS_BEEN_BANNED_TIMEOUT")."");

   $subject = "".T_("CLEANUP_YOUR_ACCOUNT")." $site_config[SITENAME] ".T_("CLEANUP_HAS_BEEN_DISABLED")."";
   $body = "".T_("CLEANUP_YOU_WERE_BANNED_FOLLOWING")."\n
   ------------------------------
   \n".T_("CLEANUP_TIMEOUT_WARNING_H&R_EXPIRED")."\n
   ------------------------------
   \n".T_("CLEANUP_YOU_CAN_CONTACT_BY_LINK")." :
   ".$site_config['SITEURL']."/contact.php
   \n\n\n".$site_config['SITENAME']." ".T_("ADMIN");
   sendmail($n[1], "$subject", "$body", "".T_("OF").": $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
   endwhile;
   endif;
   // END HIT & RUN



[color=rgb(251, 160, 38)]in account-details search :[/color]

$numtorrents = get_row_count("torrents", "WHERE owner = $id");

Add after :

//h&r mod
$qry = SQL_Query_exec("SELECT COUNT(`hnr`) FROM `snatched` WHERE `uid` = '$id' AND `hnr` = 'yes'");
$res = mysqli_fetch_row($qry);
$hnr = $res[0];
//End h&r


find
<?php echo T_("RATIO"); ?>: <?php echo $ratio; ?><br />


below
<?php echo T_("H&R"); ?>: <?php echo $hnr; ?><br />



[color=rgb(251, 160, 38)]Add to english.php[/color]
$LANG["CLEANUP_WARNING_FOR_ACCUMULATING"] ="You're warned because you have accumulated";
$LANG["CLEANUP_WARNING_FOR_H&R"] ="Warning for H&R";
$LANG["CLEANUP_YOU_HAVE_BEEN_WARNEWD_ACCUMULATED"] ="You're warned because you have accumulated";
$LANG["CLEANUP_REMOVAL_OF_H&R_WARNING"] ="Your warning for H&R has been removed";
$LANG["CLEANUP_YOU_NOW_HAVE_LESS_THAN"] =" You have now less than";
$LANG["CLEANUP_YOUR_WARNING_FOR_H&R_HAS_REMOVED"] ="Your warning for H&R has been removed.";
$LANG["CLEANUP_BANNED_FOR"] ="Banned because that the warning time for H&R has expired.";
$LANG["CLEANUP_HAS_BEEN_BANNED_REASON"] ="Banned because that the warning time for H&R has expired.";
$LANG["CLEANUP_YOUR_ACCOUNT"] ="Your account at";
$LANG["CLEANUP_HAS_BEEN_DISABLED"] ="has been disabled";
$LANG["CLEANUP_YOU_WERE_BANNED_FOLLOWING"] ="You have been banned for the following reason";
$LANG["CLEANUP_YOU_CAN_CONTACT_BY_LINK"] ="You can contact us by following this link:";
$LANG["CLEANUP_BANNED_FOR_EXPIRED_H&R_WARNING_TIMEOUT"] ="Banned because that the warning time for H&R has expired";
$LANG["THERE_ARE_NO_RECORDINGS"] ="There are no recordings of Hit and Run!";
$LANG["H&R"] ="HnR";


Add image to images/admin

Updated for V3 credit to Original Author

Show recent torrent images

in index.php under site notice
//torrent image scroller
begin_frame(T_("LATEST_TORRENTS_SCROLLER"));
echo '<IFRAME  src="'.$site_config["SITEURL"].'/carroussel.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="160"  scrolling="no" align="middle"></IFRAME>';
end_frame();
//end torrent image scroller


add to english.php
// recent torrents scroller
$LANG["LATEST_TORRENTS_SCROLLER"] = "The shows listed below are available for download, in case you missed them";



add carroussel.php
create folder js and add both files

Snatchlist [TTv3] — 2019-03-16 08:45:41 in v3 Mods Completed
Updated for V3 credit to Original Author

SQL
CREATE TABLE IF NOT EXISTS `snatched` (
 `sid` int(11) unsigned NOT NULL auto_increment,
 `tid` int(11) unsigned NOT NULL default '0',
 `uid` int(11) unsigned NOT NULL default '0',
 `stime` int(11) unsigned NOT NULL default '0',
 `utime` int(11) unsigned NOT NULL default '0',
 `ltime` int(11) unsigned NOT NULL default '0',
 `uload` bigint(20) unsigned NOT NULL default '0',
 `dload` bigint(20) unsigned NOT NULL default '0',
 `completed` enum('0','1') NOT NULL default '0',
 `hnr` enum('no','yes') NOT NULL default 'no',
 PRIMARY KEY  (`sid`),
 UNIQUE KEY `tid_uid` (`tid`,`uid`),
 KEY `completed` (`completed`),
 KEY `tid` (`tid`),
 KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;



In functions.php find
SQL_Query_exec("DELETE FROM reports WHERE votedfor = $id AND type = 'torrent'");


add after
SQL_Query_exec("DELETE FROM `snatched` WHERE `tid` = '$id'");


find
SQL_Query_exec("DELETE FROM pollanswers WHERE userid = $userid");


add after
SQL_Query_exec("DELETE FROM `snatched` WHERE `uid` = '$userid'");


In the most bottom place, before ?> add:
function seedtime($ts = 0)
{                                                                                                  
   $days = floor($ts / 86400);
   $hours = floor($ts / 3600 ) % 24;  
   $mins = floor($ts / 60) % 60;
   $secs = $ts % 60;
   return sprintf( '%d days, %d hours, %d minutes, %d seconds...', $days, $hours, $mins, $secs);
}



In announce.php find
$ret = SQL_Query_exec("INSERT INTO peers (connectable, torrent, peer_id, ip, passkey, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, client) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", " . sqlesc($passkey) . ", $port, $uploaded, $downloaded, $left, '".get_date_time()."', '".get_date_time()."', '$seeder', '$userid', " . sqlesc($agent) . ")");


add underneath
if ( ($MEMBERSONLY) && (($seeder == 'no' && $torrent['freeleech'] == 0)) ) {
   SQL_Query_exec("INSERT INTO `snatched` (`uid`, `tid`, `stime`, `utime`) VALUES ('$userid', '$torrentid', '".gmtime()."', '".gmtime()."') ON DUPLICATE KEY UPDATE `utime` = '" . gmtime() . "'");
}


find
if ( $MEMBERSONLY )
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");


replace with
if ( $MEMBERSONLY )
{
   SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");
   SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `completed` = '1' WHERE `tid` = '$torrentid' AND `uid` = '$userid' AND `utime` = '" . gmtime() . "'");
}


find
$upthis = max(0, $uploaded - $self["uploaded"]);


add above
$elapsed = ($self['seeder'] == 'yes') ? $site_config['announce_interval'] - floor(($self['ez'] - time()) / 60) : 0;


find
if (($upthis > 0 || $downthis > 0) && is_valid_id($userid))


replace with
if (($upthis > 0 || $downthis > 0 || $elapsed > 0) && is_valid_id($userid))


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


add underneath
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `dload` = `dload` + '$downthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");



In account.php find
        <?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>


add after
        &nbsp;|&nbsp;
       <?php print("<a href='snatched.php'><b>".T_("YOUR_SNATCHLIST")."</b></a>");?>


find
<?php print("<b>".T_("IP").":</b> " . $CURUSER["ip"] . "\n"); ?><br />


add after
<?php if ($CURUSER["edit_users"]=="yes" && $CURUSER["class"] > $user["class"]) { ?>
 <div style="margin-bottom:3px"><a href="snatched.php?uid=<?php echo $user["id"]?>"><?php echo "<input type='submit' value='".T_("SNATCHLIST")."'>"; ?></a></div>
<?php } ?>



In account-detail find
<a href="report.php?user=<?php echo $user["id"]?>"><?php echo T_("REPORT_MEMBER"); ?></a><br />


add after
                <?php if ($CURUSER["edit_users"]=="yes") { ?>
 <div style="margin-bottom:3px"><a href="snatched.php?uid=<?php echo $user["id"]?>"><?php echo "<input type='submit' value='".T_("SNATCHLIST")."'>"; ?></a></div>
<?php } ?>



In torrents-details.php
find
echo "[<a href='torrents-edit.php?id=$row[id]&amp;returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]";


add underneath
echo "&nbsp;<a href=snatched.php?tid=$row[id]><input type='submit' value='".T_("SNATCHLIST")."'></a>&nbsp;";



add to english.php
//===| Snatchlist
$LANG["SNATCHLIST"] = "Snatchlist";
$LANG["YOUR_SNATCHLIST"] = "Your Snatchlist";
$LANG["SNATCHLIST_FOR"] = "Snatchlist For:";
$LANG["LAST_ACTION"] = "Last Action";
$LANG["SEED_TIME"] = "Seed Time";
$LANG["GO_TO_YOUR_PROFILE"] = "Go to Your Profile";
$LANG["GO_TO_USER_ACCOUNT"] = "Go to User Account";
$LANG["HNR"] = "<font color=#FF1200><b>H</b><small>&</small><b>R</b></font>";
$LANG["SNATCHED_MESSAGE"] = "This page displays the details to all downloaded torrents, completed or not.";
$LANG["NO_USER_WITH_ID"] = "There is no user with ID: ";
$LANG["NO_TORRENT_WITH_ID"] = "There is no torrent with ID: ";
$LANG["REGISTERED_MEMBERS_TO_TORRENT"] = "Registered Members To Torrent:";
$LANG["NO_PERMISSION"] = "You don't have permission for this action!";
$LANG["T_L_OR_E"] = "Local or External";
$LANG["LOCAL_TORRENT"] = "Local Torrent";
$LANG["EXTERNAL_TORRENT"] = "External Torrent";
$LANG["FREE"] = "Free";



Upload /snatched.php to root
Upload /images to images folder
Force Login [TTv3] — 2019-03-16 08:41:08 in v3 Mods Completed
Updated for V3 credit to Original Author

Hide site from guest

In index.php Find
Quote:
dbconn


Add after
Quote:
loggedinonly();


In account-login.php, account-signup.php, account-recover.php & account-confirm-ok find
Quote:
dbconn();


after add
Quote:
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;


In theme/default/]header.php find
Quote:
<body>


add:
Quote:
<?php if ($CURUSER){ ?>


before:
Quote:
<!-- END NAVIGATION -->


Add
Quote:
<?php } ?>


In theme/default/footer.php Find
Quote:
<!-- START FOOTER  -->


Add after
Quote:
<?php if ($CURUSER){ ?>


before:
Quote:
<!-- END FOOTER quote -->


add:
Quote:
<?php } ?>
Say Thanks & Force — 2019-03-16 08:03:36 in v3 Mods Completed
Updated for V3 credit to Original Author

SQL
ALTER TABLE `torrents` ADD `thanks` LONGTEXT;


In torrent-details find
//GET ALL MYSQL VALUES FOR THIS TORRENT
$res = SQL_Query_exec("SELECT torrents.anon,


Add thanks (inline)
//GET ALL MYSQL VALUES FOR THIS TORRENT
$res = SQL_Query_exec("SELECT torrents.anon, torrents.thanks,


find
print("<tr><td align='left'><b>".T_("HITS").":</b></td><td>" . number_format($row["hits"]) . "</td></tr>\n");


Add after

   //START THANKS\\\\
 
$thanksl = explode(",", $row['thanks']);
if ($CURUSER['username'] == $row['username']) {
$leftthanks = true;
$leftthanks2 = true;
} else {
foreach ($thanksl as $u) {
$thanks .= ($i > 0) ? ", $u" : $u;
if ($u == $CURUSER['username']) {
$leftthanks2 = true;
$leftthanks = true;
}
$i++;
}
}

if (!$leftthanks2) {
$button='<br/><input type="button" value="Say Thanks" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>Thanks by : </b></td><td><div id="thankput"></div>'.$button.'
<script type="text/javascript" src="'.$site_config["SITEURL"].'/js/thanks.js"></script>

<script type="text/javascript">
var $s = jQuery.noConflict();

$s("#thankput").load("thanks.php?id='.$id.'");
$s(function() {
$s("#refresh").click(function() {
$s("#thankput").empty().html(\'<center><img src="'.$site_config["SITEURL"].'/images/ajax-loader.gif"></center>\');

$s("#thankput").load("thanks.php?id='.$id.'&to=give&torrent='.$id.'")
return false;
})
})
</script></td></tr><br/>';

////END THANKS\\\\\



The next is to force members to say thanks (you dont have to use this)

In download.php
$res = SQL_Query_exec("SELECT filename, banned, external, announce FROM torrents WHERE id =".intval($id));


Add thanks & owner to line
$res = SQL_Query_exec("SELECT filename, banned, external, announce, thanks, owner  FROM torrents WHERE id =".intval($id));


find
$name = $row['filename'];


Add after
// START THANKS
if ($CURUSER["id"] != $row["owner"] && !in_array($CURUSER["username"], explode(',', $row["thanks"])))
show_error_msg("Error", "You have to say thanks before you can download.<br /><br />
<a href=torrents-details.php?id=$id>Return to the previous page</a>",1);
// END THANKS


Make folder called js and add thanks.js into it
ADD thanks.php to root
Updated for V3 credit to Original Author

Fix the redirect problem the with links

functions.php find
// Text
  $s = preg_replace(
  "/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
  "<a href='http://kpaste.net/redir/\\1' target='_blank'>\\3</a>", $s);

  // http://www.example.com
  $s = preg_replace(
  "/\[url\]((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\[\/url\]/i",
  "<a href='http://kpaste.net/redir/\\1' target='_blank'>\\1</a>", $s);


Replace with
// Text
  $s = preg_replace(
  "/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
  "<a href='\\1' target='_blank'>\\3</a>", $s);

  // http://www.example.com
  $s = preg_replace(
  "/\[url\]((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\[\/url\]/i",
  "<a href='\\1' target='_blank'>\\1</a>", $s);


Find
function format_urls($s){
    return preg_replace(
     "/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^<>\s]+)/i",
     "\\1<a href='http://kpaste.net/redir/\\2' target='_blank'>\\2</a>", $s);
}


Replace with
function format_urls($s){
    return preg_replace(
    "/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^<>\s]+)/i",
    "\\1<a href='\\2' target='_blank'>\\2</a>", $s);
}
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