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

Seed Bonus [TTv3] — 2019-03-16 07:43:35 in v3 Mods Completed
Updated for V3 credit to Original Author

[color=rgb(251, 160, 38)]SQL:[/color]
CREATE TABLE IF NOT EXISTS `bonus` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `title` varchar(50) COLLATE utf8_unicode_ci 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_unicode_ci NOT NULL,
 `type` enum('traffic','invite','VIP','other','HnR') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'other',
 PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=7;

INSERT INTO `bonus` (`id`, `title`, `cost`, `value`, `descr`, `type`) VALUES
(1, '1GB Uploaded', '70.0', 1073741824, 'Exchange 70 points for 1 GB upload.', 'traffic'),
(2, '2 GB Uploaded', '100.0', 2147483648, 'Exchange 100 points for  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', '1000.0', 2, 'Receive 2 Invites for 1000.00 seedbonus points.', 'invite');

ALTER TABLE users ADD `seedbonus` decimal(10,1) NOT NULL;




[color=rgb(251, 160, 38)]blocks/login_blocks.php find[/color]
$privacylevel = T_($CURUSER["privacy"]);


Add after
$bonus = $CURUSER['seedbonus'];


Search (at end of line)
". T_("RATIO") .": $userratio


Add after :
<br>Seedbonus : <b><a href=mybonus.php>".$bonus."</a></b>


[color=rgb(251, 160, 38)]backend/Cleanup.php find[/color]
//LOCAL TORRENTS - MAKE NON-ACTIVE/OLD TORRENTS INVISIBLE
$deadtime = gmtime() - $site_config["max_dead_torrent_time"];
SQL_Query_exec("UPDATE torrents SET visible='no' WHERE visible='yes' AND last_action < FROM_UNIXTIME($deadtime) AND seeders = '0' AND leechers = '0' AND external !='yes'");



Add after :
// Seedbonus
$qry = "SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes'  AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'";

$res = SQL_Query_exec($qry);
while ( $row = mysqli_fetch_object($res) )
{
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "'");
}
// End


[color=rgb(251, 160, 38)]in backend/config.php find[/color]
$site_config['blocks_dir'] = getcwd().'/blocks';


After add
$site_config["bonuspertime"] = 0.5;


[color=rgb(251, 160, 38)]in account.php find[/color]
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>
   &nbsp;|&nbsp;


Add below
&nbsp;|&nbsp;
<?php print("<a href='mybonus.php'><b>My Seedbonus</b></a>");?>


[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="32" height="32" alt="" /><br />SQL Error<br /></a></td>


Add below
  <td colspan="5">&nbsp;</td>
</tr>
<tr>
 <td align="center"><a href=admincp.php?action=seedbonus><img src="images/admin/seedbonus.png" border=0 width=32 height=32><br>Management of Seed Bonus</a></td>
           </tr>


Search
} // End Forum management


Add after
#======================================================================#
# Seedbonus Manager
#======================================================================#
if ($action == "seedbonus" && $do != "change")
{

  if (get_user_class() < 3)
     show_error_msg("STOP", "Area reserved for people entitled! and you do not have permission !!!");
   if ($do == "del")
   {
       if (!@count($_POST["ids"])) show_error_msg("Error", "select nothing.", 1);
       $ids = array_map("intval", $_POST["ids"]);
       $ids = implode(", ", $ids);
       
       SQL_Query_exec("DELETE FROM `bonus` WHERE `id` IN ($ids)");
       autolink("admincp.php?action=seedbonus", "deleted entries");
   }

   $count = get_row_count("bonus");

   list($pagertop, $pagerbottom, $limit) = pager(25, $count, 'admincp.php?action=seedbonus&amp;');
                                                                                                                                                                                                                                                               
   $res = SQL_Query_exec("SELECT id, title, cost, value, descr, type FROM `bonus` ORDER BY `type` $limit");

   stdhead("Seedbonus Manager");
   navmenu();
                                                       
   begin_frame("Management of Seed Bonus");
   ?>

   <center>
This page displays all available options trade which users can exchange for seedbonus.<?php echo number_format($count); ?> ; <br><br><a href="admincp.php?action=seedbonus&amp;do=change&amp;id=null">Add</a> a new option?
   </center>

   <?php if ($count > 0): ?>
   <br />
   <form id="seedbonus" method="post" action="admincp.php?action=seedbonus">
   <input type="hidden" name="do" value="del" />
   <table border="0" cellpadding="3" cellspacing="0" width="100%" align="center" class="table_table">
   <tr>
       <th class="table_head">Title</th>
       <th class="table_head">Description</th>
       <th class="table_head">Points</th>
       <th class="table_head">Valeur</th>
       <th class="table_head">Type</th>
       <th class="table_head">Edit</th>
       <th class="table_head"><input type="checkbox" name="checkall" onclick="checkAll(this.form.id);" /></th>
   </tr>

   <?php while ($row = mysqli_fetch_object($res)):
 $row->value = ( $row->type == "traffic" ) ? mksize( $row->value ) : ( int ) $row->value;
 ?>
   <tr>
   <td class="table_col1" align="center"><?php echo htmlspecialchars($row->title); ?></td>
   <td class="table_col2"><?php echo htmlspecialchars($row->descr); ?></td>
   <td class="table_col1" align="center"><?php echo $row->cost; ?></td>
   <td class="table_col2" align="center"><?php echo $row->value; ?></td>
   <td class="table_col1" align="center"><?php echo $row->type; ?></td>
   <td class="table_col2" align="center"><a href="admincp.php?action=seedbonus&amp;do=change&amp;id=<?php echo $row->id; ?>">Edit</a></td>
   <td class="table_col1" align="center"><input type="checkbox" name="ids[]" value="<?php echo $row->id; ?>" /></td>
   </tr>
   <?php endwhile; ?>

   <tr>
       <td colspan="7" align="right">
       <input type="submit" value="Remove Selected" />
       </td>
   </tr>
   </table>            
   </form>
   <?php
   endif;

   if ($count > 25) echo $pagerbottom;

   end_frame();
   stdfoot();
}
       
if ($action == "seedbonus" && $do == "change")
{
   $row = null;
   if ( is_valid_id($_REQUEST['id']) )
   {
       $res = SQL_Query_exec("SELECT id, title, cost, value, descr, type FROM `bonus` WHERE `id` = '$_REQUEST[id]'");
       $row = mysqli_fetch_object($res);
   }

   if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
   {
       if ( empty($_POST['title']) or empty($_POST['descr']) or empty($_POST['type']) or !is_numeric($_POST['cost']) )
       {
               autolink($_SERVER['HTTP_REFERER'], "missing information.");
       }


$_POST["value"] = ( $_POST["type"] == "traffic" ) ? strtobytes( $_POST["value"] ) : ( int ) $_POST["value"];
       $var = array_map('sqlesc', $_POST);
       extract( $var );

       if ( $row == null )
       {
               SQL_Query_exec("INSERT INTO `bonus` (`title`, `descr`, `cost`, `value`, `type`) VALUES ($title, $descr, $cost, $value, $type)");
       }
       else
       {
               SQL_Query_exec("UPDATE `bonus` SET `title` = $title, `descr` = $descr, `cost` = $cost, `value` = $value, `type` = $type WHERE `id` = $id");
       }
                       
       autolink("admincp.php?action=seedbonus", "Updating the bonus seed.");
   }
       
   stdhead("Seedbonus Management");
   navmenu();

   begin_frame("Seedbonus Management");
   ?>

   <form method="post" action="admincp.php?action=seedbonus&amp;do=change">

   <?php if ($row != null): ?>
   <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
   <?php endif; ?>

   <table border="0" class="table_table" width="90%" cellpadding="3" align="center">
   <tr>
       <th class="table_head" colspan="2">Seedbonus Management</th>
   </tr>
   <tr>
       <td class="table_col1"><b>Title:</b></td>
       <td class="table_col2"><input type="text" name="title" value="<?php echo ( $row != null ? $row->title : null ); ?>" size="50" /></td>
   </tr>
   <tr>
       <td class="table_col1"><b>Points:</b></td>
       <td class="table_col2"><input type="text" name="cost" value="<?php echo ( $row != null ? $row->cost : null ); ?>" size="5" /></td>
   </tr>
   <tr>
       <td class="table_col1"><b>Type:</b></td>
       <td class="table_col2">
       <select name="type">
       <?php foreach (array('invite', 'traffic','VIP', 'other') as $type): ?>
       <option value="<?php echo $type; ?>" <?php echo ( $row != null && $row->type == $type ? 'selected="selected"' : null ); ?>><?php echo $type; ?></option>
       <?php endforeach; ?>
       </select>
       </td>
   </tr>
   <tr>
       <td class="table_col1"><b>Value:</b></td>
       <td class="table_col2"><input type="text" name="value" value="<?php echo ( $row != null ? $row->value : null ); ?>" size="10" /></td>
   </tr>
   <tr>
       <td class="table_col1" valign="top"><b>Description:</b></td>
       <td class="table_col2"><textarea name="descr" rows="5" cols="38"><?php echo ( $row != null ? $row->descr : null ); ?></textarea></td>
   </tr>
   <tr>
       <td colspan="2" align="right">
       <input type="reset" value="Cancel" />
       <input type="submit" value="To send" />
       </td>
   </tr>
   </table>
   </form>

   <?php
   end_frame();
   stdfoot();
}



in images/admin folder add seedbonus.png
upload to root bonus.php
Updated for V3 credit to Original Author

shoutbox post new members
in account-signup.php find

       $signupclass = '2';


after add

$msg_shout = sqlesc("New User: ".$wantusername." has joined.");
SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");


shoutbox post new torrent
in torrents-upload.php.php find
write_log( sprintf(T_("TORRENT_UPLOADED"), htmlspecialchars($name), $CURUSER["username"]) );


add after
$msg_shout = sqlesc("New Torrent: [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url] has been uploaded ".($anon == 'no' ? "by [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
   SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");
Adds new panel for admin, supermod and mod

in blocks/loginblock.php
find
<center><a href="account.php"><?php echo T_("ACCOUNT"); ?></a> <br />
<?php if ($CURUSER["control_panel"]=="yes") {print("<a href=\"admincp.php\">".T_("STAFFCP")."</a>");}?>
</center>


replace with
<center><a href="account.php"><?php echo T_("ACCOUNT"); ?></a>

<?php if($CURUSER["class"]=="5") {print ("<br/><a href=modcp.php>".T_("STAFFCP")."</a>");}?>
<?php if($CURUSER["class"]=="6") {print ("<br/><a href=smodcp.php>".T_("STAFFCP")."</a>");}?>
<?php if($CURUSER["class"]=="7") {print("<br/><a href=\"admincp.php\">".T_("STAFFCP")."</a>");}?>
</center>


in header.php
find
                    if ($CURUSER["control_panel"]=="yes") {
                       print("[<a href='admincp.php'>".T_("STAFFCP")."</a>] ");
                   }


replace with

if ($CURUSER["class"]>"7") {
   print("<a class='admincp' href=admincp.php>AdminCP</a> ");
}
if ($CURUSER["class"]>"6") {
   print("<a class='admincp' href=smodcp.php>SmodCP</a> ");
}
if ($CURUSER["class"]>"5") {
   print("<a class='admincp' href=modcp.php>ModCP</a> ");
}


Add the new cps and add images to images/admin :D

Updated for V3 credit to Original Author

in shoutbox.php find
    $query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT 20';
}


add below
if ($CURUSER) {

    //check for new pm's

    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')");

    $arr = mysqli_fetch_row($res);

    $unreadmail = $arr[0];

    if ($unreadmail)

        print("<font color='#ff0000' size='3'><b><center><blink>You Got A New PM </font>[<a href='mailbox.php?inbox' target='_blank'>$unreadmail</a>]</blink></center></b></a></font>&nbsp;&nbsp;");

}
Invite Tree [TTv3] — 2019-03-16 07:02:09 in v3 Mods Completed
Updated for V3 credit to Original Author

in block/inviteblock.php before
    </table>


add
    <?php if ($CURUSER["invitees"] > 0 ){ ?>
   <tr>
   <td align="center">
   <a href="invitetree.php"><?php echo T_("Invite Tree"); ?></a>
   </td>
   </tr>
   <?php } ?>


in account-details.php
<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?><br />


add after
    <?php if ($CURUSER["class"] >= 5 && $CURUSER["class"] > $user["class"]) { ?>[<a href="invitetree.php?id=<?php echo $user["id"]?>">Invite Tree</a>]<?php } ?><br />


Add invitetree.php to root
Updated for V3 credit to Original Author

This mod shows the usernames in groups colour. You can change the colours in the config.php

First we add in backend/functions.php
At bottom before?>
//===| Start class_user function
function class_user($name)
{
  global $site_config;
  $a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";
  $b = SQL_Query_exec($a);
  $c = @mysqli_fetch_row($b);
  switch ($c[0])
  {
     case 7: // Administrator
     $col = "".$site_config["administrator_color"]."";
     break;
     case 6: // Super Moderator
     $col = "".$site_config["super_moderator_color"]."";
     break;
     case 5: // Moderator
     $col = "".$site_config["moderator_color"]."";
     break;
     case 4: // Uploader
     $col = "".$site_config["uploader_color"]."";
     break;
     case 3: // VIP
     $col = "".$site_config["vip_color"]."";
     break;
     case 2: // Power User
     $col = "".$site_config["power_user_color"]."";
     break;
     case 1: // Member
     $col = "".$site_config["member_color"]."";
  }

  if($c[1] > 0) {
     $donor = "<img src='".$site_config[SITEURL]."/images/donor.png' title='Donor' border='0'>";
  } else { $donor = ""; }

  if($c[2] == "yes") {
     $warned = "<img src='".$site_config[SITEURL]."/images/warn.png' title='Warned' border='0'>";
  } else { $warned = ""; }

  if($c[3] == "no") {
  $disabled = "<img src='".$site_config[SITEURL]."/images/disabled.png' title='Disabled' border='0'>";
  } else { $disabled = ""; }

  return unesc("<font color='".$col."'>".$name."</font>".$donor."".$warned."".$disabled."");
}
//====| End class_user function


in same file
echo "<a href='account-details.php?id=$row[owner]'>$row[username]</a>";


replace with
echo "<a href='account-details.php?id=$row[owner]'>".class_user($row[username])."</a>";


In backend/config.php add
// Color of the Groups
$site_config['administrator_color'] = '#FF0000';   // Administrator
$site_config['super_moderator_color'] = '#00C000';   // Super Moderator
$site_config['moderator_color'] = '#007F00';   // Moderator
$site_config['uploader_color'] = '#00ABA6';   // Uploader
$site_config['vip_color'] = '#FF5E00';   // VIP
$site_config['power_user_color'] = '#BD8B00';   // Power User
$site_config['member_color'] = '#856A00';   // Member


Here are the changes i noticed

in account-details.php find
<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?><br />


replace with
<?php echo T_("USERNAME"); ?>: <?php echo class_user($user["username"])?><br />


in account.php find
<b><?php echo T_("USERNAME"); ?>:</b> <?php echo $CURUSER["username"]; ?><br />


replace with
<b><?php echo T_("USERNAME"); ?>:</b> <?php echo class_user($CURUSER["username"]); ?><br />


in blocks/newestmemberblock.php find
echo "<li><a href='account-details.php?id=$row[id]'>$row[username]</a></li>\n";      


replace with
echo "<li><a href='account-details.php?id=$row[id]'>" . class_user($row["username"]) . "</a></li>\n";


blocks/useronline.php block
echo "<li><a href='account-details.php?id=$row[id]'>$row[username]</a>".($i < $n ? ", " : "")."</li>\n";;


replace with

echo "<li><a href='account-details.php?id=$row[id]'>" . class_user($row[username]) . "</a>".($i < $n ? ", " : "")."</li>\n";;


in memberlist.php
print("<tr><td class='table_col1' align='left'><a href='account-details.php?id=$arr[id]'><b>".class_user($arr[username])."</b></a>" .($arr["donated"] > 0 ? "<img src='$site_config[SITEURL]/images/star.png' border='0' alt='Donated' />" : "")."</td>" .


replace with
print("<tr><td class='table_col1' align='left'><a href='account-details.php?id=$arr[id]'><b>$arr[username]</b></a>" .($arr["donated"] > 0 ? "<img src='$site_config[SITEURL]/images/star.png' border='0' alt='Donated' />" : "")."</td>" .


in shoutbox.hp
$query = "SELECT COUNT(*) FROM shoutbox WHERE message=".$_POST['message']." AND user='".$CURUSER['username']."' AND UNIX_TIMESTAMP('".get_date_time()."')-UNIX_TIMESTAMP(date) < 30";
   $query = "SELECT COUNT(*) FROM shoutbox WHERE message=".$_POST['message']." AND user='" . class_user($CURUSER["username"]) . "' AND UNIX_TIMESTAMP('".get_date_time()."')-UNIX_TIMESTAMP(date) < 30";


replace with
$query = "SELECT COUNT(*) FROM shoutbox WHERE message=".$_POST['message']." AND user='" . class_user($CURUSER["username"]) . "' AND UNIX_TIMESTAMP('".get_date_time()."')-UNIX_TIMESTAMP(date) < 30";


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


in torrent-completed.php
<td class="table_col1"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><?php echo $row["username"]; ?></a></td>         


replace with
<td class="table_col1"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><?php echo class_user($row["username"]); ?></a></td>


in forums.php find
$username = "<a href='account-details.php?id=$userid'>$arr[username]</a>";


replace with
$username = "<a href='account-details.php?id=$userid'>".class_user($arr['username'])."</a>";


find
$author = "<a href='account-details.php?id=$topic_userid'>$arr[username]</a>";


replace with
$author = "<a href='account-details.php?id=$topic_userid'>".class_user($arr['username'])."</a>";


find
$lpusername = "<a href='account-details.php?id=$lpuserid'>$arr[username]</a>";


replace with
$lpusername = "<a href='account-details.php?id=$lpuserid'>".class_user($arr['username'])."</a>";;


find
$lpauthor = "<a href='account-details.php?id=$topic_userid'>$arr[username]</a>";


replace with
$lpauthor = "<a href='account-details.php?id=$topic_userid'>".class_user($arr['username'])."</a>";


find
$lastposter = htmlspecialchars($user_arr['username']);


replace with
$lastposter = class_user($user_arr["username"]);


Add images in images folder

Note
Now, to put in action this modification, you must add the class_user function in every place where you see user name.
For example you must change:
$user["username"] to class_user($user["username"]) or
htmlspecialchars($user["username"]) to class_user($user["username"]) or
$arr[username] to class_user($arr[username]) or
$CURUSER["username"] to class_user($CURUSER["username"])
and so on...
if this causes errors try using this, this example uses $row
" . class_user($row[username]) . "
it was part of the old forums, not even sure who wrote the mod
All credit to: ArticWolf

Ok this is an simple mod to change the siteurl if using https
in thory should fix issues while browsers stating an mix of secure data and insecure data.
in confg.php

change:
$site_config['SITEURL'] = 'http://changemydomain.com';  //Main Site URL changemydomain.com to well your domain

To
if($_SERVER['SERVER_PORT'] != '443') 
   
   $site_config['SITEURL'] = 'http://changemydomain.com';  //Main Site URL changemydomain.com to well your domain
   
   else
   
   $site_config['SITEURL'] = 'https://changemydomain.com'; //Main Site URL changemydomain.com to well your domain


after that add:
$site_config['TSITEURL'] = 'http://changemydomain.com'; //Main Tracker URL


now farther down change:
$site_config['PASSKEYURL'] =  "$site_config[sITEURL]/announce.php?passkey=%s"; // Announce URL to use for passkey

To
$site_config['PASSKEYURL'] =  "$site_config[TSITEURL]/announce.php?passkey=%s"; // Announce URL to use for passkey


keep the old url for the announce_list aka
$site_config['announce_list'] = "http://mydomain/announce.php";
Open torrents-details.php and find
print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" alt='' /></a></td>");


Replace with
print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" title=\"Télécharger le torrent !\" /></a></td>");
print ("<td valign='top'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a>&nbsp;<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "\"><img src=\"".$site_config["SITEURL"]."/images/magnetique.png\" width=\"38\" height=\"36\" border=\"0\" title=\"Télécharger le torrent magnétique !\" /></a><br />");


find
print ("<td valign='top'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a><br />");

Add after
print ("<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "\"><font size=5pt>".T_("MAGNET")."</font></a><br />");


In english.php
Add
$LANG["MAGNET"] = "Magnet Torrent";
$LANG["MAGNET2"] = "Magnet";



This edit assumes that you are using passkey
to add a link on the index page to your magnets, in config.php add magnet as seen below. Some things seen below will be different than you, just add magnet and ignore the other stuff
$site_config["torrenttable_columns"] = "category,name,dl,magnet,imdb,tube,size,seeders,leechers,health,added";


in functions.php find
case 'dl':
print("<td class='ttable_col$x' align='center'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src='" . $site_config['SITEURL'] . "/images/icon_download.png' border='0' width='50' height='50'alt=\"Download .torrent\" /></a></td>");
break;


Add below
case 'magnet':
$shit = @mysql_fetch_array(@SQL_Query_exec("SELECT info_hash FROM torrents WHERE id=$id"));
print ("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $shit["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' width='50' height='50'title='Download via Magnet' /></a></td>");
        break;


also find
         case 'dl':
           echo "<th>".T_("DL")."</th>";
        break;

Add below
         case 'magnet':
           echo "<th>".T_("MAGNET2")."</th>";
        break;


Also, the only thing I have in my torrents-details.php is this
   print ("<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\">".T_("MAGNET")."</a><br>");


BONUS: .psd image to customize your image

Add the image in the folder IMAGES
All credits to original Authors

I didnt create this, just sharing it with a few small modifications
In admincp.php put this link with the other links you already have (adjust height and width as needed)
<td align="center"><a href="admincp.php?action=torrentclients"><img src="images/admin/clients.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("CLIENTS"); ?><br /></a></td>


also somewhere in admincp.php, put
/////TORRENT CLIENTS////////
if ($action == "torrentclients") {
if ($CURUSER["class"]  < 6)
   show_error_msg("Error", "Access denied.");

  $res12 = SQL_Query_exec("SELECT client, peer_id FROM peers GROUP BY client");

  stdhead("Torrent clients");

begin_frame("All Clients");

  print("<br /><table class=tabla_table align=center border=0 cellspacing=0 cellpadding=5>\n");
  print("<tr><th class=table_head>Client</th><th class=table_head>Peer ID</th><th class=table_head>To ban use</th></tr>\n");

while($arr12 = mysql_fetch_assoc($res12)) {
     $peer=$arr12[peer_id];
     $peer=substr($peer,0,8);
     $peer2=$peer;
print("<tr><td class=table_col1>&nbsp; $arr12[client] &nbsp;</td><td class=table_col2>&nbsp; $arr12[peer_id] &nbsp;</td><td class=table_col2>&nbsp; $peer2 &nbsp;</td></tr>\n");
}
  print("</table><br />\n");

end_frame();
navmenu();
stdfoot();
}
/////END TORRENT CLIENTS/////


english.php, put
$LANG["CLIENTS"] = "Torrent Clients Used";


place image in images/admin/ folder
[ATTACH]42[/ATTACH]

[ATTACH type="full"]5116[/ATTACH]
All credits to original Authors

this is a simple mod should give new users a 2GB upload and inf. ratio to get started (which you can change in the config) so new members dont get themselves in a ratio hole that they cant get out of. Your ratio is tracked normally, this just gives you a positive ratio to get started. I also added giving invites to new users. The default is ZERO, but feel free to do as you will. Edit the config as you please
in account-signup.php find
     SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip) VALUES (" .
    implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");


Change to
     SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, uploaded, downloaded, language, invites, class, ip) VALUES (" .
    implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["new_member_upload_ratio"], 0, $site_config["default_language"], $site_config["new_member_invites"], $signupclass, getip()))).")");


add to backend/config.php
$site_config['new_member_upload_ratio'] = 2147483648; //2147483648 = 2GB of upload and inf. ratio to help get started
$site_config['new_member_invites'] = 0 ;       // Every new user will get 0 invites to start with. Change this to whatever floats your boat. Does not affect the regular giving of invites set by you or the system
All credits to original Authors

Got bored and did this. Replace your rss.php with this code. requires images be added to image1 located in uploads/images/ folder. have fun.
<?php
//
//  TorrentTrader v2.x
//   $LastChangedDate: 2018-09-01
//      $LastChangedBy: MicroMonkey
//  
//   http://www.torrenttrader.org
//
//
//
// Validated at: http://feedvalidator.org
//
require_once("backend/functions.php");
dbconn();

if (isset($_GET["custom"])){
  stdhead(T_("CUSTOM_RSS_XML_FEED"));
  begin_frame(T_("CUSTOM_RSS_XML_FEED"));

  $rqt = "SELECT id, name, parent_cat FROM categories ORDER BY parent_cat ASC, sort_index ASC";
  $resqn = SQL_Query_exec($rqt);

  if ($_POST) {
     $params = array();

     if ($cats = $_POST["cats"]) {
        $catlist = array();
        foreach ($cats as $cat) {
           if (is_numeric($cat)) {
              $catlist[] = $cat;
           }
        }
        if ($catlist)
           $params[] = "cat=".implode(",", $catlist);
     }

     if ($_POST["incldead"])
        $params[] = "incldead=1";

     if ($_POST["dllink"])
        $params[] = "dllink=1";

     if (!$_POST["cookies"] && $CURUSER)
        $params[] = "passkey=$CURUSER[passkey]";

     if ($params)
        $param = "?".implode("&amp;", $params);
     else
        $param = "";

     echo "Your RSS link is: <a href=\"$site_config[SITEURL]/rss.php$param\">$site_config[SITEURL]/rss.php$param</a><br/><br/>";
  }
  ?>
  What is RSS? Take a look at the <a href="http://wikipedia.org/wiki/RSS_%28file_format%29"target= "blank">Wiki</a> to <a href="http://wikipedia.org/wiki/RSS_%28file_format%29"target= "blank">learn more</a>.<br /><br />

  <form action="rss.php?custom" method="post">
  <table border="0" cellpadding="5" cellspacing="0" class="table_table">
  <tr>
     <td class="table_col1" valign="top">Categories:</td>
     <td class="table_col2" valign="top">(Leave blank for All)<br /><br />
     <?php while ($row = mysql_fetch_array($resqn)) {
        echo '<input type="checkbox" name="cats[]" value="'.$row['id'].'" /> '.htmlspecialchars("$row[parent_cat] - $row[name]").'<br />';
     }
     ?>
     </td>
  </tr>
  <tr>
     <td class="table_col1"><?php echo T_("FEED_TYPE");?>:</td>
     <td class="table_col2">
        <input type="radio" name="dllink" value="1" checked="checked" /> Download link<br />
        <input type="radio" name="dllink" value="0" /> Details link<br />
     </td>
  </tr>
  <tr>
     <td class="table_col1"><?php echo T_("LOGIN_TYPE");?>:</td>
     <td class="table_col2">
          <input type="radio" name="cookies" value="0" checked="checked" /> Alternative (Passkey)<br/>
<!--         <input type="radio" name="cookies" value="1"  /> Standard (cookies)<br/> -->

       </td>
  </tr>
  <tr>
     <td class="table_col1"><?php echo T_("INCLUDE_DEAD");?>:</td>
     <td class="table_col2"><input type="checkbox" name="incldead" value="1" /></td>
  </tr>
  <tr>
     <td colspan="2" align="center"><input type="submit" value="Get Link" /></td>
  </tr>
  </table>
  </form>
  <br /><br />
  <div align="left">
  Quick information regarding our RSS:
  <ul>
  <li>Our RSS feeds are properly validated by true RSS 2.0 XML Parsing Standards. Visit <a rel="prettyPhoto[iframes]" href="https://www.feedvalidator.org/check.cgi?url=<?php echo ''.$site_config["SITEURL"].'' ?>/rss.php?iframe=true" target= "blank">FeedValidator.org</a> to validate.</li>
  <li>Our feeds display only the latest 50 uploaded Torrents as default.</li>
  </ul>
  </div>
  <?php
  end_frame();
  stdfoot();
  die();
}

$cat = $_GET["cat"];
$dllink  = (int)$_GET["dllink"];

$passkey = $_GET["passkey"];
if (!get_row_count("users", "WHERE passkey=".sqlesc($passkey)))
  $passkey = "";


$where = "";
$wherea = array();
if (!$incldead) {
  $wherea[] = "visible='yes'";
}

if ($cat) {
  $cats = implode(", ", array_unique(array_map("intval", explode(",", ( string ) $cat))));
  $wherea[] = "category in ($cats)";
}

if (is_valid_id($_GET["user"])) {
  $wherea[] = "owner=$_GET[user]";
}

if ($wherea)
  $where = "WHERE ".implode(" AND ", $wherea);


$limit = "LIMIT 50";

// start the RSS feed output
header("Content-Type: application/rss+xml; charset=$site_config[CHARSET]");

echo("<?xml version='1.0' encoding='$site_config[CHARSET]'?>");
echo("<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'><channel><generator>" . htmlspecialchars($site_config["SITENAME"]) . " RSS 2.0</generator><language>en</language>" .
"<title>" . $site_config["SITENAME"] . "</title><description>" . htmlspecialchars($site_config["SITENAME"]) . " RSS Feed</description><link>" . $site_config["SITEURL"] . "</link><copyright>Copyright " . htmlspecialchars($site_config["SITENAME"]) . "</copyright><pubDate>".date("r")."</pubDate>");

$res = SQL_Query_exec("SELECT torrents.image1, torrents.id, torrents.name, torrents.size, torrents.category, torrents.added, torrents.leechers, torrents.seeders, categories.parent_cat as cat_parent, categories.name AS cat_name FROM torrents LEFT JOIN categories ON category = categories.id $where ORDER BY added DESC $limit");
?>
<atom:link href='<?php echo ''.$site_config["SITEURL"].'' ?>/rss.php' rel='self' type='application/rss+xml' />
<?php
while ($row = mysql_fetch_array ($res)){
  list($image1,$id,$name,$size,$category,$added,$leechers,$seeders,$catname) = $row;

  if ($dllink) {
     if ($passkey)
        $link = "$site_config[SITEURL]/download.php?id=$id&amp;passkey=$passkey";
     else
        $link = "$site_config[SITEURL]/download.php?id=$id";
  } else {
     $link = $site_config["SITEURL"]."/torrents-details.php?id=$id&amp;hit=1";
  }

  $pubdate = date("r", sql_timestamp_to_unix_timestamp($added));

  echo("<item><title>" . htmlspecialchars($name) . "</title><guid>" . $link . "</guid><link>" . $link . "</link><pubDate>" . $pubdate . "</pubDate><category> " . $row["cat_parent"] . ": " . $row["cat_name"] . "</category><description> Category: " . $row["cat_parent"] . ": " . $row["cat_name"] . "  Size: " . mksize($size) . " Added: " . $added . " Seeders: " . $seeders . " Leechers: " . $leechers . "<![CDATA[<br/>]]><![CDATA[<img src=/uploads/images/".$image1.">]]></description></item>");
}
echo("</channel></rss>");
?>
This is an update for forums.php and Forum Management in admincp.php.

If you choose Privacy Level "Strong" in your Account Settings you will be completely anonymous in the forum.
The "warning" and "donor" icons working. With or without the class_user mod.
I have replaced The image buttons with css buttons so now you can change to your own language on the buttons.
Done some tweaking with the looks in admincp too.

In admincp.php

Replace all Forum management code with this:
// Forum management
if ($action == "forum") {

   $error_ac == "";
   if ($_POST["do"] == "add_this_forum") {
       
       $new_forum_name = $_POST["new_forum_name"];
       $new_desc = $_POST["new_desc"];
       $new_forum_sort = (int) $_POST["new_forum_sort"];
       $new_forum_cat  = (int) $_POST["new_forum_cat"];
       $minclassread = (int)  $_POST["minclassread"];
       $minclasswrite = (int) $_POST["minclasswrite"];
       $guest_read = sqlesc($_POST["guest_read"]);
       
       if ($new_forum_name == "") $error_ac .= "<li>".T_("CP_FORUM_NAME_WAS_EMPTY")."</li>\n";
       if ($new_desc == "") $error_ac .= "<li>".T_("CP_FORUM_DESC_WAS_EMPTY")."</li>\n";
       if ($new_forum_sort == "") $error_ac .= "<li>".T_("CP_FORUM_SORT_ORDER_WAS_EMPTY")."</li>\n";
       if ($new_forum_cat == "") $error_ac .= "<li>".T_("CP_FORUM_CATAGORY_WAS_EMPTY")."</li>\n";

       if ($error_ac == "") {
           $res = SQL_Query_exec("INSERT INTO forum_forums (`name`, `description`, `sort`, `category`, `minclassread`, `minclasswrite`, `guest_read`) VALUES (".sqlesc($new_forum_name).", ".sqlesc($new_desc).", ".sqlesc($new_forum_sort).", '$new_forum_cat', '$minclassread', '$minclasswrite', $guest_read)");
           if ($res)
               autolink("admincp.php?action=forum", T_("CP_FORUM_NEW_ADDED_TO_DB"));
           else
               echo "<h4>".T_("CP_COULD_NOT_SAVE_TO_DB")."</h4>";
       }
       else
           autolink("admincp.php?action=forum", $error_ac);
   }

   if ($_POST["do"] == "add_this_forumcat") {
       
       $new_forumcat_name = $_POST["new_forumcat_name"];
       $new_forumcat_sort = $_POST["new_forumcat_sort"];
       
       if ($new_forumcat_name == "") $error_ac .= "<li>".T_("CP_FORUM_CAT_NAME_WAS_EMPTY")."</li>\n";
       if ($new_forumcat_sort == "") $error_ac .= "<li>".T_("CP_FORUM_CAT_SORT_WAS_EMPTY")."</li>\n";

       if ($error_ac == "") {
           $res = SQL_Query_exec("INSERT INTO forumcats (`name`, `sort`) VALUES (".sqlesc($new_forumcat_name).", '".intval($new_forumcat_sort)."')");
           if ($res)
               autolink("admincp.php?action=forum", T_("CP_FORUM_THANK_YOU_NEW_CAT"));
           else
               echo "<h4>".T_("CP_COULD_NOT_SAVE_TO_DB")."</h4>";
       }
       else
           autolink("admincp.php?action=forum", $error_ac);
   }

   if ($_POST["do"] == "save_edit") {
       
       $id = (int) $_POST["id"];
       $changed_sort = (int) $_POST["changed_sort"];
       $changed_forum = sqlesc($_POST["changed_forum"]);
       $changed_forum_desc = sqlesc($_POST["changed_forum_desc"]);
       $changed_forum_cat = (int) $_POST["changed_forum_cat"];
       $minclasswrite = (int) $_POST["minclasswrite"];
       $minclassread  = (int) $_POST["minclassread"];
       $guest_read = sqlesc($_POST["guest_read"]);
       
       SQL_Query_exec("UPDATE forum_forums SET sort = '$changed_sort', name = $changed_forum, description = $changed_forum_desc, category = '$changed_forum_cat', minclassread='$minclassread', minclasswrite='$minclasswrite', guest_read=$guest_read WHERE id='$id'");
       autolink("admincp.php?action=forum", T_("CP_FORUM_UPDATE_COMPLETED"));
   }

   if ($_POST["do"] == "save_editcat") {
       
       $id = (int) $_POST["id"];
       $changed_sortcat = (int) $_POST["changed_sortcat"];
       
       SQL_Query_exec("UPDATE forumcats SET sort = '$changed_sortcat', name = ".sqlesc($_POST["changed_forumcat"])." WHERE id='$id'");
       autolink("admincp.php?action=forum", T_("CP_FORUM_UPDATE_COMPLETED"));
   }

   if ($_POST["do"] == "delete_forum" && is_valid_id($_POST["id"]))
   {
       SQL_Query_exec("DELETE FROM forum_forums WHERE id = $_POST[id]");
       SQL_Query_exec("DELETE FROM forum_topics WHERE forumid = $_POST[id]");
       SQL_Query_exec("DELETE FROM forum_posts WHERE topicid = $_POST[id]");
       SQL_Query_exec("DELETE FROM forum_readposts WHERE topicid = $_POST[id]");
       autolink("admincp.php?action=forum", T_("CP_FORUM_DELETED"));
   }
   
   if ($_POST["do"] == "delete_forumcat" && is_valid_id($_POST["id"]))
   {
       SQL_Query_exec("DELETE FROM forumcats WHERE id = $_POST[id]");
       
       $res = SQL_Query_exec("SELECT id FROM forum_forums WHERE category = $_POST[id]");
       
       while ( $row = mysql_fetch_assoc($res) )
       {
           $res2 = SQL_Query_exec("SELECT id FROM forum_topics WHERE forumid = $row[id]");
           
           while ( $arr = mysql_fetch_assoc($res2) )
           {
               SQL_Query_exec("DELETE FROM forum_posts WHERE topicid = $arr[id]");
               SQL_Query_exec("DELETE FROM forum_readposts WHERE topicid = $arr[id]");
           }
           
           SQL_Query_exec("DELETE FROM forum_topics WHERE forumid = $row[id]");
           SQL_Query_exec("DELETE FROM forum_forums WHERE id = $row[id]");
       }
       
       autolink("admincp.php?action=forum", T_("CP_FORUM_CAT_DELETED"));
   }
   
   stdhead(T_("FORUM_MANAGEMENT"));
   
   $groupsres = SQL_Query_exec("SELECT group_id, level FROM groups ORDER BY group_id ASC");
   while ($groupsrow = mysql_fetch_row($groupsres))
       $groups[$groupsrow[0]] = $groupsrow[1];

   if ($_GET["do"] == "edit_forum") {
       
       $id = (int) $_GET["id"];
       
       $q = SQL_Query_exec("SELECT * FROM forum_forums WHERE id = '$id'");
       $r = mysql_fetch_array($q);
       
       if (!$r)
            autolink("admincp.php?action=forum", T_("FORUM_INVALID"));
       
       begin_frame(T_("FORUM_MANAGEMENT_EDIT"));  
   ?>
         <form action="admincp.php?action=forum" method="post">
         <input type="hidden" name="do" value="save_edit" />
         <input type="hidden" name="id" value="<?php echo $id; ?>" />
         <table class='table_table' a-form' align='center' border='0' width='70%' cellspacing='2' cellpadding='5'>
         <tr class='f-form'>
         <td class='table_col1' align='right' width='30%'><?php echo T_("CP_FORUM_NEW_NAME_FOR_FORUM");?>:</td>
         <td class='table_col2' align='left'><input type="text" name="changed_forum" class="option" size="35" value="<?php echo $r["name"]; ?>" /></td>
         </tr><tr class='f-form'>
         <td class='table_col1' align='right'><?php echo T_("CP_FORUM_NEW_SORT_ORDER");?>:</td>
         <td class='table_col2' align='left'><input type="text" name="changed_sort" class="option" size="35" value="<?php echo $r["sort"]; ?>" /></td>
         </tr><tr class='f-form'>
         <td class='table_col1' align='right'><?php echo T_("CP_FORUM_DESCRIPTION");?>:</td>
         <td class='table_col2' align='left'><textarea cols='60' rows='5' name='changed_forum_desc'><?php echo $r["description"]; ?></textarea></td>
         </tr><tr class='f-form'>
         <td class='table_col1' align='right'><?php echo T_("CP_FORUM_NEW_CATEGORY");?>:</td>
         <td class='table_col2' align='left'><select name='changed_forum_cat'>
   <?php
   $query = SQL_Query_exec("SELECT * FROM forumcats ORDER BY sort, name");
   while ($row = mysql_fetch_array($query))
       echo "<option value='{$row['id']}'>{$row['name']}</option>";

   echo "</select></td></tr>
   <tr align='right' class='f-form'><td class='table_col1'>".T_("FORUM_MIN_CLASS_READ").":</td>
   <td class='table_col2' align='left'><select name='minclassread'>";

   foreach ($groups as $id => $level) {
       $s = $r["minclassread"] == $id ? " selected='selected'" : "";
       echo "<option value='$id' $s>$level</option>";
   }

   echo "</select></td></tr><tr class='f-form'><td class='table_col1' align='right'>".T_("FORUM_MIN_CLASS_POST").":</td>
   <td class='table_col2' align='left'><select name='minclasswrite'>";

   foreach ($groups as $id => $level) {
       $s = $r["minclasswrite"] == $id ? " selected='selected'" : "";
       echo "<option value='$id' $s>$level</option>";
   }
   ?>
   </select></td></tr><tr class='f-form'>
   <td class='table_col1' align='right'><?php echo T_("FORUM_ALLOW_GUEST_READ");?>:</td><td class='table_col2' align='left'><input type="radio" name="guest_read" value="yes" <?php echo $r["guest_read"] == "yes" ? "checked='checked'" : ""?> /><?php echo T_("YES");?> <input type="radio" name="guest_read" value="no" <?php echo $r["guest_read"] != "yes" ? "checked='checked'" : ""?> /><?php echo T_("NO");?></td></tr>
   <tr class='f-form'><td colspan='2' class='table_head' align='center'><input type="submit" class="button" value="<?php echo T_("CP_FORUM_CHANGE");?>" /></td></tr>
   </table>
   </form>
   <?php
       end_frame();
       stdfoot();
   }

if ($_GET["do"] == "del_forum") {
   
   $id = (int) $_GET["id"];
   
   $t = SQL_Query_exec("SELECT * FROM forum_forums WHERE id = '$id'");
   $v = mysql_fetch_array($t);
   
   if (!$v)
        autolink("admincp.php?action=forum", T_("FORUM_INVALID"));
   
   begin_frame(T_("CONFIRM"));
?>
   <form class='a-form' action="admincp.php?action=forum" method="post">
   <input type="hidden" name="do" value="delete_forum" />
   <input type="hidden" name="id" value="<?php echo $id; ?>" />
   <?php echo T_("CP_FORUM_REALY_DEL");?> <?php echo "<b> $v[name] ".T_("CP_FORUM_WITH")." ID$v[id] ???</b>"; ?> <?php echo T_("CP_FORUM_THIS_WILL_REALLY_DEL");?>.
   <input type="submit" name="delcat" class="button" value="<?php echo T_("CP_FORUM_DELETE");?>" />
   </form>
<?php
         end_frame();
         stdfoot();
}

if ($_GET["do"] == "del_forumcat") {
   
   $id = (int) $_GET["id"];

   $t = SQL_Query_exec("SELECT * FROM forumcats WHERE id = '$id'");
   $v = mysql_fetch_array($t);
   
   if (!$v)
        autolink("admincp.php?action=forum", T_("FORUM_INVALID_CAT"));
   
   begin_frame(T_("CONFIRM"));
?>
 <form class='a-form' action="admincp.php?action=forum" method="post">
 <input type="hidden" name="do" value="delete_forumcat" />
 <input type="hidden" name="id" value="<?php echo $id; ?>" />
     <?php echo T_("CP_FORUM_REALY_DEL_CAT");?><?php echo "<b> $v[name] ".T_("CP_FORUM_WITH")." ID$v[id] ???</b>"; ?> <?php echo T_("CP_FORUM_THIS_WILL_REALLY_DEL");?>.
     <input type="submit" name="delcat" class="button" value="<?php echo T_("CP_FORUM_DELETE");?>" />
     </form>
<?php
         end_frame();
         stdfoot();
}

if ($_GET["do"] == "edit_forumcat") {
   
   $id = (int) $_GET["id"];

   $q = SQL_Query_exec("SELECT * FROM forumcats WHERE id = '$id'");
   $r = mysql_fetch_array($q);
   
   if (!$r)
        autolink("admincp.php?action=forum", T_("FORUM_INVALID_CAT"));
       
   begin_frame(T_("CP_CATEGORY_EDIT"));
   ?>
   <form action="admincp.php?action=forum" method="post">
   <input type="hidden" name="do" value="save_editcat" />
   <input type="hidden" name="id" value="<?php echo $id; ?>" />
   <table class='table_table' a-form' align='center' border='1' width='50%' cellspacing='2' cellpadding='5'>
   <tr><td class='table_col1' align='right'><?php echo T_("CP_FORUM_NEW_NAME_CAT");?>:</td><td class='table_col2' align='left'><input type="text" name="changed_forumcat" class="option" size="35" value="<?php echo $r["name"]; ?>" /></td></tr>
   <tr><td class='table_col1' align='right'><?php echo T_("CP_FORUM_NEW_SORT_ORDER");?>:</td>
   <td class='table_col2' class='col1' align='left'><input type="text" name="changed_sortcat" class="option" size="35" value="<?php echo $r["sort"]; ?>" /></td></tr>
   <tr><td class='table_head' colspan='2' align='center'><input type="submit" class="button" value="<?php echo T_("CP_FORUM_CHANGE");?>" /></td></tr>
   </table>
   </form>
   <?php
   end_frame();
   stdfoot();
}
   
   if (!$do) {
       navmenu();
       begin_frame(T_("FORUM_MANAGEMENT"));
       $query = SQL_Query_exec("SELECT * FROM forumcats ORDER BY sort, name");
       $allcat = mysql_num_rows($query);
       $forumcat = array();
       while ($row = mysql_fetch_array($query))
           $forumcat[] = $row;

       echo "
   <form action='admincp.php' method='post'>  
   <input type='hidden' name='sid' value='$sid' />
<input type='hidden' name='action' value='forum' />
<input type='hidden' name='do' value='add_this_forum' />
<br /><table class='table_table' align='center' width='80%' cellspacing='0' cellpadding='4'>
<tr><th class='table_head' colspan='2' align='center'><u><b>".T_("CP_FORUM_NEW_FORUM")."</b></u></th></tr>
<tr>
<td class='table_col1' align='right'>".T_("CP_FORUM_NEW_NAME").":</td>
<td class='table_col2'><input type='text' name='new_forum_name' size='70' maxlength='30'  value='$new_forum_name' /></td>
</tr>
<tr>
<td class='table_col1' align='right'>".T_("CP_FORUM_SORT_ORDER").":</td>
<td class='table_col2'><input type='text' name='new_forum_sort' size='70' maxlength='10'  value='$new_forum_sort' /></td>
</tr>
<tr>
<td class='table_col1' align='right'>".T_("CP_FORUM_NEW_DESC").":</td>
<td class='table_col2'><textarea cols='50' rows='5' name='new_desc'>$new_desc</textarea></td>
</tr>
<tr>
<td class='table_col1' align='right'>".T_("CP_FORUM_NEW_CAT").":</td>
<td class='table_col2'><select name='new_forum_cat'>";
foreach ($forumcat as $row)
   echo "<option value='{$row['id']}'>{$row['name']}</option>";

echo "</select></td>
</tr>
<tr>
<td class='table_col1' align='right'>".T_("FORUM_MIN_CLASS_READ").":</td>
<td class='table_col2'><select name='minclassread'>";

foreach ($groups as $id => $level) {
   $s = $r["minclassread"] == $id ? " selected='selected'" : "";
   echo "<option value='$id' $s>$level</option>";
}

echo "</select></td></tr>
<tr>
<td class='table_col1' align='right'>".T_("FORUM_MIN_CLASS_POST").":</td>
<td class='table_col2'><select name='minclasswrite'>";

foreach ($groups as $id => $level) {
   $s = $r["minclasswrite"] == $id ? " selected='selected'" : "";
   echo "<option value='$id' $s>$level</option>";
}

echo "</select></td>
</tr>".
"<tr>
<td class='table_col1' align='right'>".T_("FORUM_ALLOW_GUEST_READ").":</td>
<td class='table_col2'><input type=\"radio\" name=\"guest_read\" value=\"yes\" checked='checked' />Yes, <input type=\"radio\" name=\"guest_read\" value=\"no\" />No</td></tr>".
"<tr>
<th class='table_head' colspan='2' align='center'>
<input type='submit' value='".T_("CP_FORUM_ADD_NEW_FORUM")."' />
<input type='reset' value='".T_("RESET")."' />
</th>
</tr>
</table>
</form>";
#if($error_ac != "") echo "<tr><td colspan='2' align='center' style='background:#eeeeee;border:2px red solid'><b>COULD  NOT ADD NEW forum:</b><br /><ul>$error_ac</ul></td></tr>\n";



echo "<table class='table_table' align='center' border='0' width='80%' cellspacing='0' cellpadding='4'>";
echo "<br /><tr><td colspan='7' align='center'><u><b>".T_("FORUM_CURRENT")."</b></u></td></tr>\n";
echo "<tr><th class='table_head' width='50'><font size='2'><b>".T_("ID")."</b></font></th><th class='table_head' width='100'>".T_("NAME")."</th><th class='table_head' width='180'>".T_("CP_FORUM_DESC")."</th><th class='table_head' width='15'>".T_("CP_FORUM_SORT")."</th><th class='table_head' width='80'>".T_("CP_FORUM_CATEGORY")."</th><th class='table_head' width='8'>".T_("EDIT")."</th><th class='table_head' width='8'>".T_("DEL")."</th></tr>\n";
$query = SQL_Query_exec("SELECT * FROM forum_forums ORDER BY sort, name");
$allforums = mysql_num_rows($query);
if ($allforums == 0) {
   echo "<tr><td class='table_col1' colspan='7' align='center'>".T_("CP_FORUM_NO_FORUMS_FOUND")."</td></tr>\n";
} else {
   while($row = mysql_fetch_array($query)) {
       foreach ($forumcat as $cat)
           if ($cat['id'] == $row['category'])
               $category = $cat['name'];
           
           echo "<tr><td class='table_col1' width='50' align='center'><font size='2'><b>".T_("ID")."($row[id])</b></font></td><td class='table_col2' width='100'> $row[name]</td><td class='table_col1'  width='120'>$row[description]</td><td class='table_col2' width='15' align='center'>$row[sort]</td><td class='table_col1' width='80'>$category</td>\n";
           echo "<td class='table_col2' width='8' align='center'><a href='admincp.php?action=forum&amp;do=edit_forum&amp;id=$row[id]'><img src='images/forum/edit.png' alt='[".T_("EDIT")."]' width='17' height='17' border='0' /></a></td>\n";
           echo "<td class='table_col1' width='8' align='center'><a href='admincp.php?action=forum&amp;do=del_forum&amp;id=$row[id]'><img src='images/forum/delete.png' alt='[".T_("CP_FORUM_DELETE_FORUM")."]' width='17' height='17' border='0' /></a></td></tr>\n";
   }
}
echo "</table><br /><br />";


echo "<form action='admincp.php?action=forum' method='post'>
<input type='hidden' name='do' value='add_this_forumcat' />
<br /><br /><table class='table_table' border='0' align='center' width='80%' cellspacing='0' cellpadding='4'>
<tr><th class='table_head' colspan='2' align='center'><u><b>".T_("CP_FORUM_NEW_CATEGORY")."</b></u></th></tr>
<tr>
<td class='table_col1' align='right'>".T_("FORUM_NAME_OF_NEW_CAT").":</td>
<td class='table_col2' class='f-form'><input type='text' name='new_forumcat_name' size='60' maxlength='30'  value='$new_forumcat_name' /></td>
</tr>
<tr>
<td class='table_col1' align='right'>".T_("FORUM_CAT_SORT_ORDER").":</td>
<td class='table_col2'><input type='text' name='new_forumcat_sort' size='60' maxlength='10'  value='$new_forumcat_sort' /></td>
</tr>
<tr>
<th class='table_head' colspan='2' align='center'>
<input type='submit' value='".T_("FORUM_ADD_NEW_CAT")."' />
<input type='reset' value='".T_("RESET")."' />
</th>
</tr>
</table>
</form>";

echo "<table class='table_table' align='center' border='0' width='80%' cellspacing='0' cellpadding='4'>";
echo "<br /><tr><td colspan='7' align='center'><u><b>".T_("CP_FORUM_CURRENT_CATEGORYS")."</b></u></td></tr>\n";
echo "<tr><th class='table_head' align='center' width='50'><font size='2'><b>".T_("ID")."</b></font></th><th class='table_head' width='120'>".T_("NAME")."</th><th class='table_head' width='18'>".T_("CP_FORUM_SORT")."</th><th class='table_head' width='18'>".T_("EDIT")."</th><th class='table_head' width='18'>".T_("DEL")."</th></tr>\n";

if ($allcat == 0) {
   echo "<tr class='table_col1'><td class='f-border' colspan='7' align='center'>".T_("FORUM_NO_CAT_FOUND")."</td></tr>\n";
} else {
   foreach ($forumcat as $row) {
       echo "<tr><td align='center' class='table_col1' width='50'><font size='2'><b>".T_("ID")."($row[id])</b></font></td><td class='table_col2' width='120'> $row[name]</td><td class='table_col1' align='center' width='18'>$row[sort]</td>\n";
       echo "<td class='table_col2' align='center' width='18'><a href='admincp.php?action=forum&amp;do=edit_forumcat&amp;id=$row[id]'><img src='images/forum/edit.png' alt='[".T_("EDIT")."]' width='17' height='17' border='0' /></a></td>\n";
       echo "<td class='table_col1' align='center' width='18'><a href='admincp.php?action=forum&amp;do=del_forumcat&amp;id=$row[id]'><img src='images/forum/delete.png' alt='[".T_("FORUM_DELETE_CATEGORY")."]' width='17' height='17' border='0' /></a></td></tr>\n";
   }
}
echo "</table><br />\n";



end_frame();
stdfoot();
   } // End New Forum


} // End Forum management


In every theme.css after the last }

insert:
.forumbutton {
   /*webkit-border-radius: 5px;
  -moz-border-radius: 5px;*/
  border-radius: 2px;
  border: 1px solid #FFF;
 
   /*border: none;*/
     
   padding: 2px;
   -moz-box-shadow: 0 0px 2px 1px #555;
  -webkit-box-shadow: 0 0px 2px 1px#555;
  box-shadow: 0 0px 2px 1px #555;
 
  font-weight: bolder;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  text-align: center;
   text-decoration: none;
   display: inline-block;
   
   margin: 2px 2px;
   cursor: pointer;

  background-image: url(images/f-cat-bg.jpg);
  background-repeat: repeat-x;
  background-position: center center;
  border: 1px solid #6a8603;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 1) inset;
  -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 1) inset;
  -moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 1) inset;
 
 
 
 
 
  }
.forumbutton {
   -webkit-transition-duration: 0.4s; /* Safari */
   transition-duration: 0.4s;
}

.forumbutton:hover {
   color: white;
   
}


In english.php

replace all code after // Forums
and // Forums Cpanel

with this:
// Forums
#################################################
$LANG["BTN_FORUM_POST_REPLY"] = "Post Reply";
$LANG["BTN_FORUM_PROFILE"] = "Profile";
$LANG["BTN_FORUM_PM"] = "PM";
$LANG["BTN_FORUM_REPORT"] = "Report";
$LANG["BTN_FORUM_TOP"] = "?";
$LANG["BTN_FORUM_EDIT"] = "Edit";
$LANG["BTN_FORUM_DELETE"] = "Delete";
$LANG["BTN_FORUM_QUOTE"] = "Quote";
$LANG["BTN_FORUM_ADD_REPLY"] = "add REPLY";
$LANG["BTN_FORUM_"] = "";
$LANG["BTN_FORUM_NEW_POST"] = "NEW POST";
$LANG["BTN_FORUM_"] = "";
$LANG["BTN_FORUM_"] = "";
#################################################

$LANG["FORUM_TITLE"] = "Title";
$LANG["FORUM_COMPOSE_THREAD"] = "Compose Message";
$LANG["FORUM_JUMP2"] = "Jump!";
$LANG["FORUM_WROTE"] = "Wrote";
$LANG["FORUM_DELETE_ENTIRE_TOPIC"] = "Delete Entire Topic";
$LANG["FORUM_LOCATION"] = "Location";
$LANG["FORUM_NOT_AVAILABLE"] = "Unfortunatley the forums are not currently available.";
$LANG["FORUM_NOTICE"] = "Notice";
$LANG["FORUM_TOPICS2"] = "topics";
$LANG["forum_posts_IN"] = "posts in";
$LANG["FORUM_OUR_MEMBER"] = "Our members have made";
$LANG["FORUM_NO_POSTS"] = "No Posts";
$LANG["FORUM_LAST_POST_BAD"] = "Bad forum last_post";
$LANG["FORUM_NO_CATEGORIES"] = "No Forum Categories";
$LANG["FORUM_TOPICS"] = "Topics";
$LANG["FORUM_INDEX"] = "Index";
$LANG["FORUM_HOME"] = "Forum Home";
$LANG["FORUM_UNKNOWN_ACTION"] = "Unknown action";
$LANG["FORUM_ERROR"] = "Forum Error";
$LANG["FORUM_SEARCH_FOR"] = "Search For:";
$LANG["FORUM_SEARCH_AGAIN"] = "Search again";
$LANG["FORUM_POST_ID"] = "Post ID";
$LANG["FORUM_NOTHING_FOUND"] = "Sorry, nothing found!";
$LANG["FORUM_POST_SUCCESSFULLY"] = "Post was edited successfully.";
$LANG["FORUM_CANNOT_BE_EMPTY"] = "Body cannot be empty!";
$LANG["FORUM_MOVE_THREAD"] = "Move this thread to:";
$LANG["FORUM_STICK_TOPIC"] = "Stick Topic";
$LANG["FORUM_UNSTICK_TOPIC"] = "UnStick Topic";
$LANG["FORUM_DELETE_TOPIC"] = "Delete Topic";
$LANG["FORUM_LOCK_TOPIC"] = "Lock Topic";
$LANG["FORUM_UNLOCK_TOPIC"] = "UnLock Topic";
$LANG["FORUM_RENAME_TOPIC"] = "Rename topic:";
$LANG["FORUM_REPLY"] = "Reply";
$LANG["FORUM_POSTED_BY"] = "Posted by";
$LANG["FORUM_BY"] = "by";
$LANG["FORUM_LAST_EDIT_BY"] = "Last edited by:";
$LANG["FORUM_UNKNOWN"] = "unknown";
$LANG["FORUM_VIEW_TOPIC"] = "View Topic:";
$LANG["FORUM_NEXT"] = "Next";
$LANG["FORUM_PREV"] = "Prev";
$LANG["FORUM_IS_EMPTY"] = "Forum is empty";
$LANG["FORUM_NO_ACCESS"] = "You do not have access to the forum this topic is in.";
$LANG["FORUM_ACCESS_DENIED"] = "Error: Access Denied";
$LANG["FORUM_TOPIC_NOT_VALID"] = "Topic Not Valid";
$LANG["FORUM_POST_ID_N/A"] = "Post id n/a";
$LANG["FORUM_COMPOSE_NEW_TREAD"] = "Compose New Thread";
$LANG["FORUM_NEW_TOPIC1"] = "New topic";
$LANG["FORUM_TOPIC_LOCKED"] = "Topic locked";
$LANG["FORUM_TOPIC_ID_N/A"] = "Topic id n/a";
$LANG["FORUM_NO_TOPIC_ID_RETURNED"] = "No topic ID returned";
$LANG["FORUM_BAD_FORUM_ID"] = "Bad forum ID";
$LANG["FORUM_BAD_TOPIC_ID"] = "Bad topic ID";
$LANG["FORUM_NO_FORUM_ID"] = "No Forum ID";
$LANG["FORUM_NO_LATEST_TOPICS"] = "No Latest Topics";
$LANG["FORUM_LAST_POST"] = "Last Post";
$LANG["FORUM_REPLIES"] = "Replies";
$LANG["FORUM_LATEST_TOPIC_TITLE"] = "Latest Topic Title";
$LANG["FORUM_SUBJECT"] = "Subject:";
$LANG["FORUM_NO_POST_FOUND"] = "No post found";
$LANG["FORUM_BODY_TEXT"] = "No body text.";
$LANG["FORUM_MUST_ENTER_SUBJECT"] = "You must enter a subject.";
$LANG["FORUM_WOOT"] = "w00t";
$LANG["FORUM_NO_FORUM_POSTER"] = "No Forum Posters";
$LANG["FORUM_MAXRESULTS_POSTS2"] = " posts, displaying first ";
$LANG["FORUM_MAXRESULTS_POSTS1"] = "Found more than ";
$LANG["FORUM_SEARCH_PHRASE"] = "Search Phrase: ";
$LANG["FORUM_SEARCH2"] = "Search Forum";
$LANG["FORUM_SEARCH"] = "Forum search";
$LANG["FORUM_TOPIC"] = "Topic";
$LANG["FORUM_ALL_FORUM_READ"] = "Mark All Forums Read.";
$LANG["FORUM_MAXRESULTS2"] = " items found, displaying first ";
$LANG["FORUM_MAXRESULTS1"] = "More than ";
$LANG["FORUM_UNREAD_TOPIC"] = "Unread Topic";
$LANG["FORUM_NEW_TOPICS"] = "New Topics";
$LANG["FORUM_TOPICS_WITH_UNREAD_POSTS"] = "Topics with unread posts";
$LANG["FORUM_NO_TOPICS_FOUND"] = "No topics found";
$LANG["FORUM_NO_NEW_POSTS"] = "Posts";
$LANG["FORUM_NEW_POSTS2"] = "New posts";

$LANG["FORUM_ADD_NEW_CAT"] = "Add new category";
$LANG["FORUM_ALLOW_GUEST_READ"] = "Allow Guests to Read";
$LANG["FORUM_BANNED"] = "Unfortunately you have been banned from accessing the forums.  Please contact a member of staff if you do not know the reason.";
$LANG["FORUM_CAT_SORT_ORDER"] = "Category Sort Order";
$LANG["FORUM_CONTROL"] = "Controls";
$LANG["FORUM_CURRENT"] = "Current Forums";
$LANG["FORUM_CURRENT_CATS"] = "Current Forum Categories";
$LANG["FORUM_DELETE_CATEGORY"] = "Delete Category";
$LANG["FORUM_ERROR"] = "Forum Error";
$LANG["FORUM_FAQ"] = "FAQ";
$LANG["FORUM_INVALID"] = "Invalid Forum.";
$LANG["FORUM_INVALID_CAT"] = "Invalid Forum Category.";
$LANG["FORUM_JUMP"] = "Quick Jump";
$LANG["FORUM_MANAGEMENT"] = "Forum Management";
$LANG["FORUM_MANAGEMENT_EDIT"] = "Edit Forum";
$LANG["FORUM_MARK_READ"] = "Mark All Read";
$LANG["FORUM_MIN_CLASS_POST"] = "Mininum Class Needed to Post";
$LANG["FORUM_MIN_CLASS_READ"] = "Mininum Class Needed to Read";
$LANG["FORUM_NAME_OF_NEW_CAT"] = "Name of the new Category";
$LANG["FORUM_NEW_POSTS"] = "View New Posts";
$LANG["FORUM_NEW_TOPIC"] = "New topic in";
$LANG["FORUM_NO_CAT_FOUND"] = "No Categories found";
$LANG["FORUM_POST"] = "Posts";
$LANG["forum_posts"] = "Forum Posts";
$LANG["FORUM_RANK"] = "Rank";
$LANG["FORUM_REPLY_TOPIC"] = "Reply to topic";
$LANG["FORUM_USER"] = "User";
$LANG["FORUM_WELCOME"] = "Welcome to our Forums";
$LANG["FORUMS"] = "Forums";
$LANG["FORUM_NOTHING_FOUND"] = "Nothing found";
$LANG["FORUM_BAD_FORUM_ID"] = "Bad forum id";
$LANG["FORUM_BANNED"] = "Forum Banned";
$LANG["FORUM_ERROR"] = "Forum Error";
$LANG["FORUM_NO_ID"] = "No Forum ID";
$LANG["FORUM_RULES"] = "Flaming or other anti-social behavior will not be tolerated.";
$LANG["FORUM_RULES2"] = "Please do try not to discuss upload/release-specific stuff here, post a torrent comment instead!<br /><br /><b>Please make sure to read the <a href='rules.php'>rules</a> before you post</b>";

$LANG["FORUMS_DEL_POST"] = "Delete post";
$LANG["FORUMS_DEL_POST_ONLY_POST"] = "Can't delete post; it is the only post of the topic. You should <a href='forums.php?action=deletetopic&amp;topicid=%s&amp;sure=1'>delete the topic</a> instead.\n";
$LANG["FORUMS_DEL_POST_SANITY_CHK"] = "Sanity check: You are about to delete a post. Click <a href='forums.php?action=deletepost&amp;postid=%s&amp;sure=1'>here</a> if you are sure.";
$LANG["FORUMS_DEL_TOPIC"] = "Delete topic";
$LANG["FORUMS_DEL_TOPIC_SANITY_CHK"] = "Sanity check: You are about to delete a topic. Click <a href='forums.php?action=deletetopic&amp;topicid=%s&amp;sure=1'>here</a> if you are sure.";
$LANG["FORUMS_DENIED"] = "Denied!";
$LANG["FORUMS_EDIT_POST"] = "Edit Post";
$LANG["FORUMS_GOTO_TOP_PAGE"] = "Go to the top of the page";
$LANG["FORUMS_LOCKED"] = "Locked";
$LANG["FORUMS_MOD_OPTIONS"] = "Moderator Options";
$LANG["FORUMS_NO_ID_FORUM"] = "No Forum Topic ID %s";
$LANG["FORUMS_NO_ID_POST"] = "No post with ID %s.";
$LANG["FORUMS_NOT_ALLOWED"] = "Not Allowed";
$LANG["FORUMS_NOT_FOUND"] = "Forum not found.";
$LANG["FORUMS_NOT_FOUND_POST"] = "Post not found";
$LANG["FORUMS_NOT_FOUND_TOPIC"] = "Topic not found.";
$LANG["FORUMS_NOT_PERMIT"] = "Not permitted";
$LANG["FORUMS_NOT_VAL_ID_OR_VAL_POST"] = "Not Valid Forum ID %s Or Not Valid Forum Topic ID %s";
$LANG["FORUMS_POST_REPLY"] = "Post Reply";
$LANG["FORUMS_REPORT_POST"] = "Report This Post";
$LANG["FORUMS_STICKY"] = "Sticky";
$LANG["FORUMS_SUBJECT"] = "Subject";
$LANG["FORUMS_TOPIC_LOCKED"] = "This topic is locked; no new posts are allowed.";
$LANG["FORUMS_YOU_MUST_ENTER_NEW_TITLE"] = "You must enter a new title!";
$LANG["FORUMS_YOU_NOT_PERM_POST_FORUM"] = "You are not permitted to post in this forum.";


// Forums Cpanel
$LANG["CP_FORUM_NO_FORUMS_FOUND"] = "No Forums found";
$LANG["CP_FORUM_CATEGORY"] = "Category";
$LANG["CP_FORUM_DESC"] = "Description";
$LANG["CP_FORUM_ADD_NEW_FORUM"] = "Add new forum";
$LANG["CP_FORUM_CURRENT_CATEGORYS"] = "Current Categorys";
$LANG["CP_FORUM_NEW_CATEGORY"] = "Make a New Category";
$LANG["CP_FORUM_NEW_FORUM"] = "Make a New Forum";
$LANG["CP_FORUM_SORT"] = "Sort";
$LANG["CP_FORUM_NEW_NAME_FOR_FORUM"] = "New Name for Forum";
$LANG["CP_FORUM_DESCRIPTION"] = "Description";
$LANG["CP_FORUM_CHANGE"] = "Change";
$LANG["CP_FORUM_DELETE"] = "Delete";
$LANG["CP_FORUM_WITH"] = "With";
$LANG["CP_FORUM_DELETE_FORUM"] = "Delete Forum";
$LANG["CP_FORUM_THANK_YOU_NEW_CAT"] = "Thank you, new forum cat added to db ...";

$LANG["CP_COULD_NOT_SAVE_TO_DB"] = "Could not save to DB - check your connection & settings!";
$LANG["CP_FORUM_CAT_DELETED"] = "forum cat deleted ...";
$LANG["CP_FORUM_CAT_NAME_WAS_EMPTY"] = "Forum cat name was empty";
$LANG["CP_FORUM_CAT_SORT_WAS_EMPTY"] = "Forum cat sort order was empty";
$LANG["CP_FORUM_CATAGORY_WAS_EMPTY"] = "Forum category was empty";
$LANG["CP_FORUM_DELETED"] = "forum deleted ...";
$LANG["CP_FORUM_DESC_WAS_EMPTY"] = "Forum-description was empty";
$LANG["CP_FORUM_NAME_WAS_EMPTY"] = "Forum-name was empty";
$LANG["CP_FORUM_NEW_ADDED_TO_DB"] = "Thank you, new forum added to db ...";
$LANG["CP_FORUM_NEW_CAT"] = "Forum Category";
$LANG["CP_FORUM_NEW_DESC"] = "Description of the new Forum";
$LANG["CP_FORUM_NEW_NAME"] = "Name of the new Forum";
$LANG["CP_FORUM_NEW_NAME_CAT"] = "New Name for Category";
$LANG["CP_FORUM_NEW_SORT_ORDER"] = "New Sort Order";
$LANG["CP_FORUM_NEW_SORT_ORDER"] = "New Sort Order";
$LANG["CP_FORUM_REALY_DEL"] = "Really delete the Forum";
$LANG["CP_FORUM_REALY_DEL_CAT"] = "Really delete the Forum category";
$LANG["CP_FORUM_SORT_ORDER"] = "Forum Sort Order";
$LANG["CP_FORUM_SORT_ORDER_WAS_EMPTY"] = "Forum sort order was empty";
$LANG["CP_FORUM_THIS_WILL_REALLY_DEL"] = "this will delete everything associated with it";
$LANG["CP_FORUM_UPDATE_COMPLETED"] = "<center><b>Update Completed</b></center>";


functions.php

replace:
if ($weeks > 0)
   return "$weeks wk" . ($weeks > 1 ? "s" : "");
 if ($days > 0)
   return "$days day" . ($days > 1 ? "s" : "");
 if ($hours > 0)
   return "$hours hr" . ($hours > 1 ? "s" : "");
 if ($mins > 0)
   return "$mins min" . ($mins > 1 ? "s" : "");
 return "< 1 min";


with:
if ($weeks > 0)
     return "$weeks ".T_("WK")."" . ($weeks > 1 ? "".T_("WKS")."" : "".T_("WKS2")."");
if ($days > 0)
     return "$days ".T_("DAY")."" . ($days > 1 ? "".T_("DAYS2")."" : "");
if ($hours > 0)
     return "$hours ".T_("HOUR")."" . ($hours > 1 ? "".T_("HOURS")."" : "".T_("HOURS2")."");
if ($mins > 0)
     return "$mins ".T_("MIN")."" . ($mins > 1 ? "".T_("MINS")."" : "".T_("MINS2")."");
     return "".T_("<1MIN")."";


english.php

insert:
///START TIME///
$LANG["WK"] = "wk";
$LANG["WKS"] = "s";
$LANG["WKS2"] = "  ";
$LANG["DAY"] = "day";
$LANG["DAYS2"] = "s";
$LANG["HOUR"] = "hour";
$LANG["HOURS"] = "s";
$LANG["HOURS2"] = "  ";
$LANG["<1MIN"] = "< 1 min";
$LANG["MIN"] = "min";
$LANG["MINS"] = "s";
$LANG["MINS2"] = "  ";
///END TIME///


In backend/config.php

insert:
$site_config["CLASS_USER"] = false; // if you have "class user" mod.
$site_config["BBCODE_WITH_PREVIEW"] = false; // if you have "bbcode with preview everywhere, users may change color of icon" mod. NOTE!! Dont't forget to change backend/bbcode.php!!!!!!


Change the false to true if you have the mod installed.

Place the images in images/forum catalog
[ATTACH]39._xfImport[/ATTACH]
[ATTACH]40._xfImport[/ATTACH]

Replace your forums.php with this:
All credits to original Authors

First, the torrents are scraped in torrents-details.php, is the first line in that the stats are updated with UDP trackers.
I tested this mod on a tracker with 12.000 of external torrents and after a while almost all these torrents have been updated by users.
You can also use mega_scrape.php but you need to set a cronjob to your server for this file. In this mode will work permanently.
If you run this file from your PC, you have to keep the browser open until this task is ready.

First of all extracts the attached arhive udpscraper.zip and upload all included files in your root.

In torrents-details.php under this line:
require_once("backend/BDecode.php");

Add these
require_once("backend/parse.php");
require_once("backend/udptscraper.php");


And somewhere below, replace the entire "scrape" code:
if ($row["external"]=='yes'){
       if ($scrape =='1'){
           print("<td valign='top' align='right'><b>Tracked: </b>EXTERNAL<br /><br />");
           $seeders1 = $leechers1 = $downloaded1 = null;

           $tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");
           while ($trow = mysql_fetch_assoc($tres)) {
               $ann = $trow["url"];
               $tracker = explode("/", $ann);
               $path = array_pop($tracker);
               $oldpath = $path;
               $path = preg_replace("/^announce/", "scrape", $path);
               $tracker = implode("/", $tracker)."/".$path;

               if ($oldpath == $path) {
                   continue; // Scrape not supported, ignored
               }

               // TPB's tracker is dead. Use openbittorrent instead
               if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker)) {
                   $tracker = "http://tracker.openbittorrent.com/scrape";
               }

               $stats = torrent_scrape_url($tracker, $row["info_hash"]);
               if ($stats['seeds'] != -1) {
                   $seeders1 += $stats['seeds'];
                   $leechers1 += $stats['peers'];
                   $downloaded1 += $stats['downloaded'];
                   SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = $stats[seeds], `leechers` = $stats[peers], `times_completed` = $stats[downloaded] WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");
               } else {
                   SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");

               }
           }

           if ($seeders1 !== null){ //only update stats if data is received
               print ("<b>".T_("LIVE_STATS").": </b><br />");
               print ("Seeders: ".number_format($seeders1)."<br />");
               print ("Leechers: ".number_format($leechers1)."<br />");
               print (T_("COMPLETED").": ".number_format($downloaded1)."<br />");

               SQL_Query_exec("UPDATE torrents SET leechers='".$leechers1."', seeders='".$seeders1."', times_completed='".$downloaded1."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$row['id']."'");
           }else{
               print ("<b>".T_("LIVE_STATS").": </b><br />");
               print ("<font color='#ff0000'>Tracker Timeout<br />Please retry later</font><br />");
           }

           print ("<form action='torrents-details.php?id=$id&amp;scrape=1' method='post'><input type="submit" name="submit" value="Update Stats" /></form></td>");
       }else{
           print ("<td valign='top' align='right'><b>Tracked:</b> EXTERNAL<br /><br /><form action='torrents-details.php?id=$id&amp;scrape=1' method='post'><input type="submit" name="submit" value="Update Stats" /></form></td>");
       }
   }

With this one
//===| Scrape External Torrents
   if ($row["external"]=='yes')
   {
       print ("<td width='160' align='right' valign='top'><table><tr>");
       if ($scrape =='1')
       {
           print("<td class='table_col1' width='150' valign='middle'>
           <div style='margin-top:5px; margin-bottom:10px; font:bold 16px Times' align='center'><font color='#FF2000'>".T_("EXTERNAL_TORRENT")."</font></div>");

           //===| UDP Scraper
           $resu = SQL_Query_exec("SELECT id, info_hash FROM torrents WHERE external = 'yes' AND id = $id");
           while ($rowu = mysql_fetch_array($resu))
           {
               $TorrentInfo = ParseTorrent("$site_config[torrent_dir]/$rowu[id].torrent");
               $ann = $TorrentInfo[0];
               $annlist = array();

               if ($TorrentInfo[6])
               {
                   foreach ($TorrentInfo[6] as $ann)
                   {
                       $annlist[] = $ann[0];
                   }
               }
               else
                   $annlist = array($ann);

               $seeders = $leechers = $downloaded = null;
               foreach ($annlist as $ann)
               {
                   $tracker = explode("/", $ann);
                   $path = array_pop($tracker);
                   $oldpath = $path;
                   $path = str_replace("announce", "scrape", $path);
                   $tracker = implode("/", $tracker)."/".$path;

                   if ($oldpath == $path)
                   {
                       continue;
                   }
                   if ($openbittorrent_done)
                       continue;

                   if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker))
                   {
                       $tracker = "http://tracker.openbittorrent.com/scrape";
                       $openbittorrent_done = 1;
                   }
                   if(preg_match('/udp:\/\//', $tracker))
                   {
                       $udp=true;
                       try
                       {
                           $timeout = 5;
                           $udp= new udptscraper($timeout);
                           $stats=$udp->scrape($tracker,$rowu["info_hash"]);
                           //print_r($stats); exit();
                           foreach ($stats as $idu=>$scrape)
                           {
                               $seeders += $scrape['seeders'];
                               $leechers += $scrape['leechers'];
                               $downloaded    += $scrape['completed'];
                           }
                       }
                       catch(ScraperException $e)
                       {
                           $e->isConnectionError();
                       }
                   }
                   else
                   {
                       $stats = torrent_scrape_url($tracker, $rowu["info_hash"]);
                   }

                   if ($stats['seeds'] != -1)
                   {
                       $seeders += $stats['seeds'];
                       $leechers += $stats['peers'];
                       $downloaded += $stats['downloaded'];

                       SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = '".$stats[seeds]."', `leechers` = '".$stats[peers]."', `times_completed` = '".$stats[downloaded]."' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
                   }
                   else
                   {
                       SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
                   }
               }

               if ($seeders !== null)
               {
                   SQL_Query_exec("UPDATE torrents SET leechers = '".$leechers."', seeders = '".$seeders."', times_completed = '".$downloaded."', last_action = '".get_date_time()."', visible = 'yes' WHERE id = '".$rowu['id']."'");
               }
               else
               {
                   SQL_Query_exec("UPDATE torrents SET last_action = '".get_date_time()."' WHERE id='".$rowu['id']."'");
               }
           }
           //===| End UDP Scraper
                 
           if ($seeders !== null)
           {
               print ("<div style='margin-bottom:5px; margin-left:20px'><b>".T_("LIVE_STATS")."</b>: </div>");
               print ("<div style='margin-left:20px'>".T_("SEEDERS").": <font color='limegreen'>".$seeders."</font></div>");
               print ("<div style='margin-left:20px'>".T_("LEECHERS").": <font color='#FF2000'>".$leechers."</font></div>");
               print ("<div style='margin-left:20px'>".T_("COMPLETED").": <font color='#0080FF'>".$downloaded."</font></div>");
           }
           else
           {
               print ("<div style='margin-top:10px; margin-bottom:5px' align='center'><b>".T_("LIVE_STATS")."</b>: </div>");
               print ("<div style='font:italic 14px Times' align='center'><font color='#FF2000'>".T_("TRACKERS_OFFLINE")."!</font></div>");
           }
           print ("<div style='margin-top:10px; margin-bottom:10px' align='center'>
               <a href='torrents-details.php?id=".$id."'><input type='submit' name='submit' value=".T_("SUBMIT")."></a>
           </div>");
           print ("</td>");
       }
       else
       {
           print ("<td class='table_col1' width='150' valign='middle' align='center'>
               <div style='margin-top:5px; margin-bottom:10px; font:bold 16px Times' align='center'><font color='#FF2000'>".T_("EXTERNAL_TORRENT")."</font></div>
               <div style='font:normal 12px Times' align='center'>".T_("UPDATE_STATS")."</div></div>
                   <form action='torrents-details.php?id=$id&amp;scrape=1' method='post'>
                       <div style='margin-top:5px; margin-bottom:10px' align='center'><input type='submit' name='submit' value=".T_("UPDATE")." /></div>
                   </form>
               </td>");
       }
       print ("</tr></table></td>");
   }
   //===| End Scrape External Torrents


Add to languages/english.php:
$LANG["UPDATE"] = "Update";
$LANG["EXTERNAL_TORRENT"] = "External Torrent";
$LANG["TRACKERS_OFFLINE"] = "All Trackers<br />are <b>Offline</b>";


And if you want to use mega_scrape.php manually, add this code wherever you want to see it:
echo "[<a href='mega_scrape.php'><b>Run Mega Scrape</b></a>]";
All credits to original Authors

First of all, add:
loggedinonly();

to index.php
after
dbconn();


and in account-login.php, account-signup.php, account-recover.php  and account-confirm-ok below dbconn();

(it's already changed in the files) insert:
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false


and in theme default header.php
after:
<body>

Add
<?php if ($CURUSER){ ?>


Find
<!-- END NAVIGATION -->

Add before
<?php } ?>


and in theme default footer.php

you can, (but not recommended to remove the credits in the footer) do this
Find
<!-- START FOOTER CODE -->

Add After
<?php if ($CURUSER){ ?>

Find
<!-- END FOOTER CODE -->

Add before
<?php } ?>


In index.php
Find
dbconn(true);

Add after
loggedinonly();


In default.css
Find
input[type=password] {
  color: #FF6600;
}

Replace with
input[type=password] {
  color: #FF6600;
   -moz-box-shadow: inset 0 0 0 1px #fff;
  -webkit-box-shadow: inset 0 0 0 1px#fff;
  box-shadow: inset 0 0 0 1px #fff;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  border: 1px solid #444;
}


Here are some file you can play around with. The code does not look the same in all themes so you may have to move the code around a bit until you the get the results you want.

unzip the ziparchive to your root. Backup your files or rename them, before you unzip files to your root.
All credits to the original Authors

admincp.php
Add
<td align="center"><a href="admincp.php?action=duplicateips"><img src="images/admin/double-ip.png" border="0" width="32" height="32" alt="" /><br />Double IP<br /></a></td>


And this
#======================================================================#
#  Duplicate IP's
#======================================================================#
if ($action == "duplicateips")
{
       $res = SQL_Query_exec("SELECT ip FROM users GROUP BY ip HAVING count(*) > 1");
       $num = mysql_num_rows($res);
       
       list($pagertop, $pagerbottom, $limit) = pager(25, $num, 'admincp.php?action=duplicateips&amp;');
       
       $res = SQL_Query_exec("SELECT id, username, class, email, ip, added, last_access, COUNT(*) as count FROM users GROUP BY ip HAVING count(*) > 1 ORDER BY id ASC $limit");

       stdhead(T_("DUPLICATEIP"));
       navmenu();
       if ($CURUSER["class"] < "7") {
       show_msg("Erreur", "Vous ne pouvez pas visualiser cette page!", 1);
       }
       begin_frame(T_("DUPLICATEIP"));
       ?>
       
       <center><?php echo T_("DUPLIATEIPINFO"); ?></center>

       <br />
       
       <?php if ($num > 0): ?>
       <br />
       <table border="0" cellpadding="3" cellspacing="0" width="100%" align="center" class="table_table">
       <tr>
                       <th class="table_head"><?php echo T_("USERNAME"); ?></th>
                       <th class="table_head"><?php echo T_("USERCLASS"); ?></th>
                       <th class="table_head"><?php echo T_("EMAIL"); ?></th>
                       <th class="table_head"><?php echo T_("IP"); ?></th>
                       <th class="table_head"><?php echo T_("ADDED"); ?></th>
                       <th class="table_head"><?php echo T_("COUNT"); ?></th>
       </tr>
       <?php while ($row = mysql_fetch_assoc($res)): ?>
       <tr>
                       <td class="table_col1" align="center"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><?php echo $row["username"]; ?></a></td>
                       <td class="table_col2" align="center"><?php echo get_user_class_name($row["class"]); ?></td>
                       <td class="table_col1" align="center"><?php echo $row["email"]; ?></td>
                       <td class="table_col2" align="center"><?php echo $row["ip"]; ?></td>
                       <td class="table_col1" align="center"><?php echo utc_to_tz($row["added"]); ?></td>
                       <td class="table_col1" align="center"><a href="admincp.php?action=usersearch&amp;ip=<?php echo $row['ip']; ?>"><?php echo number_format($row['count']); ?></a></td>
       </tr>
       <?php endwhile; ?>
       </table>                
       <?php else: ?>
                  <center><b><?php echo T_("NOTHING_FOUND"); ?></b></center>
       <?php
       endif;
                                                                                                                 
       if ($num > 25) echo $pagerbottom;

       end_frame();
       stdfoot();
}
#======================================================================#
#  End Duplicate IP's
#======================================================================#


/backend/config.php

Here you can determine how many IPs the same user can use.

insert:
// Max IP
$site_config["ipcheck"] = true; // Enable/disable
$site_config["accountmax"] = 1; // max number of accounts


account-signup.php
before:
if ($message == "") {


Add
      //check if IP is already a peer
           if ($site_config["ipcheck"] && $site_config["accountmax"] >= "1") {
           $ip = $_SERVER['REMOTE_ADDR'];
           $ipq = get_row_count("users", "WHERE ip = '$ip'");
           if ($ipq >= $site_config["accountmax"])
           $message = $site_config["SITENAME"]." only allows " . $site_config["accountmax"] . " user account per IP address. <br> If you want to create a new account, please contact an administrator.<br /><br /><font color=red> The limit for ip : $ip has been reached.</font><br /><br />Registration failed. <br /><a style='cursor: pointer;cursor:hand;' href='account-login.php'><font color=red>Click here to return to the login page.</font></a>";
   }
           $secret = mksecret(); //generate secret field

           $wantpassword = passhash($wantpassword);// hash the password
   

   if ($message != "")
       show_error_msg(T_("SIGNUP_FAILED"), $message, 1);


english.php
Add
// Double ip
$LANG['COUNT'] = "Count";
$LANG['DUPLICATEIP'] = 'Duplicate IP\'s';
$LANG['DUPLICATEIPINFO'] = "This page displays all users which the database shows them having more than one account associated by there ip.";

[ATTACH]32._xfImport[/ATTACH]
You must have snatchlist installed

Always remember to make a backup

Credit to original coders some from slab, spirtblue and some bits from mircomonkey

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

SQL
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';


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

Add in config.php  :
This is where everything is set - ban is at 50 be careful here to be reasonable you dont want to ban all members
//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


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


Add at the end before ?> :
//  Start List of Hit and Run

if ($action=="hnr")
{

   stdhead("List of Hit and Run");
   navmenu();
   if (get_user_class() < 6)
       show_error_msg("Acces Denied", 1);


   begin_frame("List of Hit and Run");
   $ressy = SQL_Query_exec("SELECT COUNT(*) FROM snatched where hnr='yes' $limit");
   $rowh = mysql_fetch_array($ressy);
   $count = $rowh[0];
   $hnrperpage = 50;
   list($pagertop, $pagerbottom, $limit) = pager($hnrperpage, $count, "admincp.php?action=hnr&");
   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( mysql_num_rows($result) != 0 )

   {

       print("$pagertop");


       print'<table class=table_table border=0 cellspacing=0 cellpadding=4 align=center>';
           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 align=center><b>Started</b></td>';
               print'<td class=table_head align=center><b>Last&nbsp;Action</b></td>';
           print'</tr>';
       while($row = mysql_fetch_assoc($result))

       {

           if ($site_config['MEMBERSONLY'])

           {

               $sql1 = "SELECT id, username FROM users WHERE id = $row[uid]";
               $result1 = SQL_Query_exec($sql1);
               $row1 = mysql_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 = mysql_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'</tr>';

           }

       }

       print'</table>';
       print("$pagerbottom");

   }

   else

   {

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

   }

   end_frame();
   stdfoot();

}
// End List of Hit and Run


in cleanup.php find:
//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()."'"); // ehd


search :
//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 ( mysql_num_rows($a) > 0 ) :
   while ($b = mysql_fetch_row($a)) :
   $c = SQL_Query_exec("SELECT COUNT( hnr ) FROM snatched WHERE uid = $b[0] AND hnr = 'yes'");
   $d = mysql_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 = mysql_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 = mysql_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 = mysql_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 ( mysql_num_rows($k) > 0 ) :
   while ($l = mysql_fetch_row($k)) :
   $m = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $l[0] AND enabled = 'yes' AND warned = 'yes'");
   $n = mysql_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


in account-details search :
$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 = mysql_fetch_row($qry);
$hnr = $res[0];
//End h&r


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


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



The next is optional to improve the torrent completed page
In torrents-completed find
  <tr>
    <th class="table_head"><?php echo T_("USERNAME"); ?></th>
    <th class="table_head"><?php echo T_("CURRENTLY_SEEDING"); ?></th>
    <th class="table_head"><?php echo T_("DATE_COMPLETED"); ?></th>
    <th class="table_head"><?php echo T_("RATIO"); ?></th>
 </tr>


Replace with
        <tr>
           <td class="table_head"> <b><?php echo T_("USERNAME"); ?></b> | <b><?php echo T_("RATIO"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("STARTED"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("COMPLETED"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("LAST_ACTION"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("UPLOADED"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("DOWNLOADED"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("RATIO"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("SEED_TIME"); ?></b> </td>
           <td class="table_head" align="center"> <b><?php echo T_("SEEDING"); ?></b> </td>
           <td class="table_head" align="center"> <font color="#FF1200"><b>H</b><small>&</small><b>R</b></font> </td>
       </tr>


Find
           <td class="table_col1"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><?php echo $row["username"]; ?></a></td>
          <td class="table_col2"><?php echo $peers; ?></td>
          <td class="table_col1"><?php echo utc_to_tz($row["date"]); ?></td>
          <td class="table_col2"><?php echo number_format($ratio, 2); ?></td>


replace with
              <td class="table_col1"><a href="account-details.php?id=<?php echo $row["id"]; ?>"><b><?php echo $row["username"]; ?></b></a> | <b><?php echo $ratio; ?></b></td>
               <td class="table_col2" align="center"><?php echo date('d.M.Y<\\b\\r>H:i', sql_timestamp_to_unix_timestamp($startdate));?></td>
               <td class="table_col1" align="center"><?php echo $comdate; ?></td>
               <td class="table_col2" align="center"><?php echo date('d.M.Y<\\b\\r>H:i', sql_timestamp_to_unix_timestamp($lastaction));?></td>
               <td class="table_col1" align="center"><?php echo $upload; ?></td>
               <td class="table_col2" align="center"><?php echo $download; ?></td>
               <td class="table_col1" align="center"><b><?php echo $tratio; ?></b></td>
               <td class="table_col2" align="center"><?php echo $seedtime; ?></td>
               <td class="table_col1" align="center"><?php echo $peers; ?></td>
               <td class="table_col2" align="center"><b><?php echo $hnr; ?></b></td>


Find
           $ratio = ($row["downloaded"] > 0) ? $row["uploaded"] / $row["downloaded"] : 0;
          $peers = (get_row_count("peers", "WHERE torrent = '$id' AND userid = '$row[id]' AND seeder = 'yes'")) ? "<font color='green'>" . T_("YES") . "</font>" : "<font color='#ff0000'>" . T_("NO") . "</font>";


Replace with
            if ($row['downloaded'] > 0)
           {
               $ratio = $row['uploaded'] / $row['downloaded'];
               $ratio = number_format($ratio, 2);
               $color = get_ratio_color($ratio);
               if ($color)
                   $ratio = "<font color=#ff0000>$ratio</font>";
           } else if ($row['uploaded'] > 0)
               $ratio = 'Inf.';
           else
               $ratio = '---';
           $comdate = date("d.M.Y<\\b\\r><\\s\\m\\a\\l\\l>H:i</\\s\\m\\a\\l\\l>", utc_to_tz_time($row["date"]));
           $peers = (get_row_count("peers", "WHERE torrent = '$id' AND userid = '$row[id]'")) ? "<font color='#27B500'><b>".T_("YES")."</b></font>" : "<font color='#FF1200'><b>".T_("NO")."</b></font>";
           $res2 = SQL_Query_exec("SELECT uload, dload, stime, utime, ltime, hnr FROM snatched WHERE tid = '$id' AND uid = '$row[id]'");
           $row2 = mysql_fetch_assoc($res2);
           if ($row2['dload'] > 0)
           {
               $tratio = $row2['uload'] / $row2['dload'];
               $tratio = number_format($tratio, 2);
               $color = get_ratio_color($tratio);
               if ($color)
                   $tratio = "<font color=#ff0000>$tratio</font>";
           } else if ($row2['uload'] > 0)
               $tratio = 'Inf.';
           else
               $tratio = '---';
           $startdate = utc_to_tz(get_date_time($row2['stime']));
           $lastaction = utc_to_tz(get_date_time($row2['utime']));
           $upload = "<font color='#27B500'><b>".mksize($row2["uload"])."</b></font>";
           $download = "<font color='#FF1200'><b>".mksize($row2["dload"])."</b></font>";
           $seedtime = $row2['ltime'] ? mkprettytime($row2['ltime']) : '---';
           if ($row2['hnr'] != "yes") { $hnr = "<font color='#27B500'><b>".T_("NO")."</b></font>";  } else { $hnr = "<font color='#FF1200'><b>".T_("YES")."</b></font>"; }

Add image hitnrun_list.png to images/admin folder[ATTACH]31._xfImport[/ATTACH]

Add required.php to root
hey the double facepalm is usually me lol....
its not a theme change as such, its a whole new IPB version.  give a little time and ill adjust it.
Welcome Back — 2012-01-03 21:56:05 in General Chat
i screwed up when doing a dump godaddy...
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