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

Error sending PM — 2025-12-23 18:15:54 in v3 Support
CREATE TABLE `blocked` (
 `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` int(10) UNSIGNED NOT NULL DEFAULT 0,
 `blockid` int(10) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
 UNIQUE KEY `userfriend` (`userid`,`blockid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `warnings` (
 `id` int(10) NOT NULL AUTO_INCREMENT,
 `userid` int(10) NOT NULL DEFAULT '0',
 `reason` varchar(255) NOT NULL DEFAULT '',
 `added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `expiry` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `warnedby` int(10) NOT NULL DEFAULT '0',
 `type` varchar(30) NOT NULL DEFAULT '',
 `active` enum('yes','no') DEFAULT 'yes',
 PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;



// ADD WARNING
$res = SQL_Query_exec("SELECT id,username FROM users WHERE class = 1 AND warned = 'no' AND enabled='yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");

if ($res && mysqli_num_rows($res) > 0){
   $timenow = get_date_time();
   $reason = "You have been warned because of having low ratio. You need to get a ".$minratio." before next ".$length." days or your account may be banned.";
   $expiretime = gmdate("Y-m-d H:i:s", gmtime() + (86400 * $length));

   while ($arr = mysqli_fetch_assoc($res)){
       SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ('".$arr["id"]."','".$reason."','".$timenow."','".$expiretime."','0','Poor Ratio')");
       SQL_Query_exec("UPDATE users SET warned='yes' WHERE id='".$arr["id"]."'");
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr["id"]."', '".$timenow."', '".$reason."', '0')");
       write_log("Auto Leech warning has been <b>added</b> for: <a href='account-details.php?id=".$arr["id"]."'>".$arr["username"]."</a>");
   }
}

// REMOVE WARNING
$res1 = 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");

if ($res1 && mysqli_num_rows($res1) > 0){
   $timenow = get_date_time();
   $reason = "Your warning of low ratio has been removed. We highly recommend you to keep a your ratio up to not be warned again.\n";

   while ($arr1 = mysqli_fetch_assoc($res1)){
       write_log("Auto Leech warning has been removed for: <a href='account-details.php?id=".$arr1["id"]."'>".$arr1["username"]."</a>");
       SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = '".$arr1["id"]."'");
       SQL_Query_exec("UPDATE warnings SET expiry = '$timenow', active = 'no' WHERE userid = $arr1[id]");
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr1["id"]."', '".$timenow."', '".$reason."', '0')");
   }
}

// BAN WARNED USERS
$res = SQL_Query_exec("SELECT users.id, users.username, UNIX_TIMESTAMP(warnings.expiry) AS expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND class = 1 AND enabled='yes' AND warned = 'yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");

if ($res && mysqli_num_rows($res) > 0){
   $timenow = get_date_time();
   while ($arr = mysqli_fetch_assoc($res)){
       if (gmtime() - $arr["expiry"] >= 0) {
           SQL_Query_exec("UPDATE users SET enabled='no', warned='no' WHERE id='".$arr["id"]."'");
           write_log("User <a href='account-details.php?id=".$arr["id"]."'>".$arr["username"]."</a> has been banned (Auto Leech warning).");
       }
   }
}

// REMOVE OTHER WARNINGS
$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 warned = 'yes'  AND enabled='yes' AND warnings.active = 'yes' AND warnings.expiry < '".get_date_time()."'");

if ($res) {
   while ($arr1 = mysqli_fetch_assoc($res)){
       SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $arr1[id]");
       SQL_Query_exec("UPDATE warnings SET active = 'no' WHERE userid = $arr1[id] AND expiry < '".get_date_time()."'");
       write_log("Removed warning for $arr1[username]. Expiry: $arr1[expiry]");
   }
}

// WARN USERS THAT STILL HAVE ACTIVE WARNINGS
SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE warned = 'no' AND id IN (SELECT userid FROM warnings WHERE active = 'yes')");
I’m testing TT to see how it behaves on PHP 8.5, and so far it’s working stably. We’ll fix the small issues as we go.

Regards
ALTER TABLE users MODIFY gender VARCHAR(10) NULL;
Thanks guys.
Well done,  you rock ;)
css error & no error sql — 2025-11-26 20:40:41 in v3 Support
Where the problem was  

Not the iframe itself, but the way it was inserted into header.php.  
It was placed inside <p align="right"> and then immediately followed by <div class="infobar">  this makes the HTML invalid.  
When the HTML is invalid, the browser starts to “swallow” styles and break the layout.

Regards

PS: data527.click is a domain from an advertising network, added for banners and click tracking.
Our friend use TT for this.
:)
https://leech24.net
IP: 194.63.140.131

Man, this isn’t serious the site isn’t even hosted on Cloudflare.
css error & no error sql — 2025-11-26 19:30:26 in v3 Support
header.php fix

<!-- Start Infobar -->
<div style="text-align:right; margin-bottom:10px;" class="ads">
 <iframe data-aa="1503515" src="//ad.a-ads.com/1503515?size=468x60"
         style="width:468px; height:60px; border:0; padding:0; overflow:hidden; background-color:transparent;">
 </iframe>

 <ins style="width:468px; height:60px"
      data-width="468" data-height="60"
      class="hd778359206"
      data-domain="//data527.click"
      data-affquery="/3bf6770543b59946c5d7/d778359206/?placementName=leech24">
   <script src="//data527.click/js/responsive.js" async></script>
 </ins>
</div>

<div class="infobar">
 <?php
   if (!$CURUSER){
       echo "[<a href=\"account-login.php\">".T_("LOGIN")."</a>]<b> ".T_("OR")." </b>[<a href=\"account-signup.php\">".T_("SIGNUP")."</a>]";
   } else {
       print (T_("LOGGED_IN_AS").": ".$CURUSER["username"]."");
       echo " [<a href=\"account-logout.php\">".T_("LOGOUT")."</a>] ";
       if ($CURUSER["control_panel"]=="yes") {
           print("[<a href='admincp.php'>".T_("STAFFCP")."</a>] ");
       }
       // check for new pm's...
 ?>
</div>
I’m currently testing TT on PHP 8.5 and it’s performing quite well. There are some minor errors, but we’ll fix them



Regards
For users who are already registered, their passwords are automatically converted to Argon2id and they don’t need to change anything. For new users, this is handled automatically as well
First change function passhash in backend/functions.php like this:

 
function passhash($text) {
   GLOBAL $site_config;

   switch (strtolower($site_config["passhash_method"])) {
       case "argon2id":
           // Argon2id password hashing
           return password_hash($text, PASSWORD_ARGON2ID);
       case "sha1":
           return sha1($text);
       case "md5":
           return md5($text);
       case "hmac":
           $ret = hash_hmac($site_config["passhash_algorithm"], $text, $site_config["passhash_salt"]);
           return $ret ? $ret : die("Config Error: Unknown algorithm '".$site_config["passhash_algorithm"]."'");
       default:
           die("Unrecognised passhash_method. Check your config.");
   }
}


And below add new 2 functions:

function tt_hash_password(string $plain): string {
   $options = [
       'memory_cost' => 1<<16, // 64 MB
       'time_cost'   => 4,
       'threads'     => 1,
   ];
   return password_hash($plain, PASSWORD_ARGON2ID, $options);
}

function tt_verify_password(string $plain, string $hash): bool {
   if (substr($hash, 0, 9) === '$argon2id') {
       return password_verify($plain, $hash);
   } elseif (strlen($hash) === 40 && preg_match('/^[0-9a-f]{40}$/i', $hash)) {
       // legacy SHA1
       return hash_equals($hash, sha1($plain));
   } else {
       // fallback for any other hash
       return password_verify($plain, $hash);
   }
}


In backend/config.php change lines for password hashing:

// Password hashing with argon2id
$site_config["passhash_method"] = "argon2id";

// Password hashing - Once set, cannot be changed without all users needing to reset their passwords
//$site_config["passhash_method"] = "sha1"; // Hashing method (sha1, md5 or hmac). Must use what your previous version of TT did or all users will need to reset their passwords

// Only used for hmac.
//$site_config["passhash_algorithm"] = "sha1"; // See http://php.net/hash_algos for a list of supported algorithms.
//$site_config["passhash_salt"] = "b0c7d2e3f5a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2q3r4s5t6u7v8w9x0y1z2A3B4C5"; // Shouldn't be blank. At least 20 characters of random text.


And download from archive my account-login.php and account-signup.php
Test this and take a feedback.
It should authenticate all users using argon2id, and for new accounts, also store them with argon2id

PS: And cnange column password in table users into the database to varchar(255)
And also this value need like this 'threads'     => 1, in functions.pbp and in account-login.pnp
memberlist.php
--------------------------------------------------------------
Here is the same file, but with a few improvements for php8.4

<?php
#================================#
#       TorrentTrader 3.8.3      #
#  http://torrenttrader.uk       #
#--------------------------------#
#    Created by M-Jay            #
#    Modified by MicroMonkey,    #
#    Coco, Botanicar, spiritblue #
#================================#

require_once("backend/functions.php");
dbconn();
loggedinonly();

if ($CURUSER["view_users"]=="no")
  show_error_msg(T_("ERROR"), T_("NO_USER_VIEW"), 1);

$search = trim($_GET['search'] ?? '');
$class = (int) ($_GET['class'] ?? 0);
$letter = trim($_GET['letter'] ?? '');

$q = $query = '';

if ($search !== '') {
   $query = "username LIKE " . sqlesc("%$search%") . " AND status='confirmed'";
   $q = "search=" . htmlspecialchars($search);
} elseif ($letter !== '') {
   if (strlen($letter) === 1 && strpos("abcdefghijklmnopqrstuvwxyz", strtolower($letter)) !== false) {
       $query = "username LIKE " . sqlesc($letter . "%") . " AND status='confirmed'";
       $q = "letter=" . htmlspecialchars($letter);
   } else {
       $query = "status='confirmed'";
   }
} else {
   $query = "status='confirmed'";
}

if ($class) {
   $query .= " AND class=$class";
   $q .= ($q ? "&" : "") . "class=$class";
}

stdhead(T_("USERS"));
begin_frame(T_("USERS"));

print("<center><br /><form method='get' action='memberlist.php'>\n");
print(T_("SEARCH").": <input type='text' size='30' name='search' value='".htmlspecialchars($search)."' />\n");
print("<select name='class'>\n");
print("<option value='-'>(Tous Les Grades)</option>\n");

$res = SQL_Query_exec("SELECT group_id, level FROM groups");
while ($row = mysqli_fetch_assoc($res)) {
   $selected = ($class && $class == (int)$row['group_id']) ? " selected='selected'" : "";
   print("<option value='".(int)$row['group_id']."'".$selected.">".htmlspecialchars($row['level'])."</option>\n");
}
print("</select>\n");
print("<input type='submit' value='".T_("SEARCH")."' />\n");
print("</form></center>\n");

print("<p align='center'>\n");
print("<a href='memberlist.php'><b>".T_("ALL")."</b></a> - \n");

foreach (range("a", "z") as $l) {
   $L = strtoupper($l);
   if ($l == strtolower($letter))
       print("<b>$L</b>\n");
   else
       print("<a href='memberlist.php?letter=$l'><b>$L</b></a>\n");
}

print("</p>\n");

$page = (int) ($_GET['page'] ?? 1);
$perpage = 25;

$res = SQL_Query_exec("SELECT COUNT(*) AS c FROM users WHERE $query");
$arr = mysqli_fetch_assoc($res);
$total = (int)$arr['c'];

$pages = ($total > 0) ? (int)ceil($total / $perpage) : 1;

if ($page < 1) $page = 1;
if ($page > $pages) $page = $pages;

$pagemenu = '';
for ($i = 1; $i <= $pages; ++$i) {
   if ($i == $page)
       $pagemenu .= "$i\n";
   else
       $pagemenu .= "<a href='?$q&page=$i'>$i</a>\n";
}

$browsemenu = '';
if ($page > 1)
   $browsemenu .= "<a href='?$q&page=" . ($page - 1) . "'>[Prev]</a>";

$browsemenu .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

if ($page < $pages)
   $browsemenu .= "<a href='?$q&page=" . ($page + 1) . "'>[Next]</a>";

$offset = max(0, ($page - 1) * $perpage);

$res = SQL_Query_exec("SELECT users.*, groups.level
                      FROM users
                      INNER JOIN groups ON groups.group_id=users.class
                      WHERE $query
                      ORDER BY username
                      LIMIT $offset,$perpage");

print("<br /><table border='0' class='table_table' width='98%' cellpadding='3' cellspacing='3' align='center'>
<tr><th class='table_head'>" . T_("USERNAME") . "</th>
<th class='table_head'>" . T_("REGISTERED") . "</th>
<th class='table_head'>" . T_("LAST_ACCESS") . "</th>
<th class='table_head'>" . T_("CLASS") . "</th>
<th class='table_head'>" . T_("COUNTRY") . "</th></tr>\n");

while ($arr = mysqli_fetch_assoc($res)) {
   $countryId = (int)$arr['country'];
   $cres = SQL_Query_exec("SELECT name,flagpic FROM countries WHERE id=$countryId");
   $carr = mysqli_fetch_assoc($cres);

   if ($carr) {
       $country = "<td align='center' class='table_col1' style='padding:0px'>
       <img src='".$site_config["SITEURL"]."/images/countries/".htmlspecialchars($carr['flagpic'])."'
       title='".htmlspecialchars($carr['name'])."'
       alt='".htmlspecialchars($carr['name'])."' width='33' height='27'/></td>";
   } else {
       $country = "<td align='center' class='table_col1' style='padding:0px'>
       <img src='".$site_config["SITEURL"]."/images/countries/unknown.gif' alt='Unknown' /></td>";
   }

   $avatar = $arr['avatar'] ? htmlspecialchars($arr['avatar']) : $site_config["SITEURL"]."/themes/".$THEME."/images/default_avatar.png";

   print("<tr><td width='20%' class='table_col1' align='center'>
   <a href='account-details.php?id=".(int)$arr['id']."'><b>" . class_user($arr["username"]) . "</b><br/>
   <img class='avatar' src='".$avatar."'/></a></td>
   <td align='center' class='table_col2'>".utc_to_tz($arr["added"])."</td>
   <td align='center' class='table_col1'>".utc_to_tz($arr["last_access"])."</td>
   <td class='table_col2' align='center'>" . T_($arr["level"]) . "</td>$country</tr>\n");
}
print('</table>');

print("<br /><p align='center'>$pagemenu<br />$browsemenu</p>");
end_frame();
stdfoot();
?>
Thanks @spiritblue mate. Thanks for that.

Regards from me ;)
LOGOUT_COOKIE issue — 2025-11-15 19:22:16 in v3 Support
Did you follow the instructions I wrote in the post and did you add the PHPMailer folder?

PS: I dont understend you. What(where) is the problem.
On your site  or micromonkey site???????????????
Gmail vs Brevo for email sending:

- Gmail is picky (capricious):  
 - Authentication: Gmail now requires OAuth2 for most apps. The old “less secure apps” option is gone.  
 - Limits: Standard accounts have a daily sending limit (around 500 emails), which is a problem for trackers or sites with many users.  
 - Filters: Even with correct setup, Gmail often sends bulk emails to Spam unless you configure SPF/DKIM/DMARC.  
 - Complexity: Setting up PHPMailer with Gmail is more complicated — you need to handle ports (587 TLS, 465 SSL) and maintain OAuth tokens.  

- Brevo (formerly Sendinblue) free plan works great:  
 - Easy integration: Works directly with PHPMailer or even native mail() via SMTP.  
 - Good deliverability: Emails reach the inbox instead of spam because Brevo provides SPF/DKIM configuration.  
 - Free plan: Gives a decent daily/monthly quota, enough for a test tracker or small site.  
 - Dashboard: Lets you track sent/opened emails, which is a bonus compared to Gmail SMTP.  
On my site, the mass email sending works, as well as the password recovery. I’ve only tested whether registration works, but I think everything will be fine.

Tested and working:)
New Send Mail for TTv8.4
-----------------------------------------------------------------------
First need to add PHPMailer folder to backend folder from archive below

After that change file backend/mail.php like this:

<?php

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require_once __DIR__ . "/PHPMailer/PHPMailer.php";
require_once __DIR__ . "/PHPMailer/SMTP.php";
require_once __DIR__ . "/PHPMailer/Exception.php";

$GLOBALS["TTMail"] = new TTMail;

class TTMail {
   var $type;

   var $smtp_host;
   var $smtp_port = 25;
   var $smtp_ssl = false;
   var $smtp_auth = false;

   var $smtp_user;
   var $smtp_pass;

   function __construct () {
       GLOBAL $site_config;

       switch (strtolower($site_config["mail_type"])) {
           case "pear":
               $this->smtp_ssl = $site_config["mail_smtp_ssl"];
               $this->smtp_host = $this->smtp_ssl
                   ? "ssl://".$site_config["mail_smtp_host"]
                   : $site_config["mail_smtp_host"];

               $this->type      = "pear";
               $this->smtp_port = $site_config["mail_smtp_port"];
               $this->smtp_auth = $site_config["mail_smtp_auth"];
               $this->smtp_user = $site_config["mail_smtp_user"];
               $this->smtp_pass = $site_config["mail_smtp_pass"];

               if (!@include_once("Mail.php")) {
                   trigger_error("Config is set to use PEAR Mail but it is not installed.", E_USER_WARNING);
                   $this->type = "php";
               }
           break;

           case "smtp":
               $this->type      = "smtp";
               $this->smtp_host = $site_config["mail_smtp_host"];
               $this->smtp_port = $site_config["mail_smtp_port"];
               $this->smtp_ssl  = $site_config["mail_smtp_ssl"];
               $this->smtp_auth = $site_config["mail_smtp_auth"];
               $this->smtp_user = $site_config["mail_smtp_user"];
               $this->smtp_pass = $site_config["mail_smtp_pass"];
           break;

           case "php":
           default:
               $this->type = "php";
       }
   }

   function Send ($to, $subject, $message, $additional_headers = "", $additional_parameters = "") {
       GLOBAL $site_config;

       if (preg_match("!^From:(.*)!m", $additional_headers, $matches)) {
           $from = trim($matches[1]);
       } else {
           $from = $site_config["SITEEMAIL"];
       }

       $additional_headers = preg_replace("!^From:(.*)!m", "", $additional_headers);
       $additional_headers .= "\nFrom: $from\nReturn-Path: $from";
       $additional_headers = trim($additional_headers);
       $additional_headers = preg_replace("!\n+!", "\n", $additional_headers);

       switch ($this->type) {
           case "pear":
               $headers = array(
                   "From" => $from,
                   "Return-Path" => $from,
                   "To" => $to,
                   "Subject" => $subject
               );
               $params = array(
                   "host" => $this->smtp_host,
                   "port" => $this->smtp_port,
                   "auth" => $this->smtp_auth,
                   "username" => $this->smtp_user,
                   "password" => $this->smtp_pass
               );
               $smtp = Mail::Factory("smtp", $params);
               $smtp->send($to, $headers, $message);
           break;

           case "smtp":
               try {
                   $mail = new PHPMailer(true);
                   $mail->isSMTP();
                   $mail->Host       = $this->smtp_host;
                   $mail->SMTPAuth   = $this->smtp_auth;
                   $mail->Username   = $this->smtp_user;
                   $mail->Password   = $this->smtp_pass;
                   $mail->SMTPSecure = $this->smtp_ssl ? 'tls' : false;
                   $mail->Port       = $this->smtp_port;

                   $mail->setFrom($from, $site_config["SITENAME"]);
                   $mail->addAddress($to);
                   $mail->Subject = $subject;
                   $mail->Body    = $message;
                   
                   $mail->AltBody = strip_tags($message);
                   $mail->CharSet = "UTF-8";
                   $mail->isHTML(true);

                   $mail->send();
               } catch (Exception $e) {
                   trigger_error("SMTP Mail error: " . $e->getMessage(), E_USER_WARNING);
               }
           break;

           case "php":
           default:
               @mail($to, $subject, $message, $additional_headers, $additional_parameters);
           break;
       }
   }
}

function sendmail ($to, $subject, $message, $additional_headers = "", $additional_parameters = "") {
   $GLOBALS["TTMail"]->Send($to, $subject, $message, $additional_headers, $additional_parameters);
}
?>


In backend/config.php change parts for Mail setting like this:
Note: In this case I use Brevo (Free forever) https://www.brevo.com/pricing/

// Mail settings
$site_config["mail_type"]      = "smtp";
$site_config["mail_smtp_host"] = "smtp-relay.brevo.com"; // SMTP server hostname
$site_config["mail_smtp_port"] = 587;                    // TLS порт (or 465 for SSL)
$site_config["mail_smtp_ssl"]  = true;                   // true for SSL/TLS
$site_config["mail_smtp_auth"] = true;                   // must be true
$site_config["mail_smtp_user"] = "YOUR_ACCOUNT";         // your account
$site_config["mail_smtp_pass"] = "YOUR_API_KEY";         // API key(this is a password)


In file admincp.php in parts Mass Mail change function sendmail like this:

sendmail($row["email"], $subject, $body, "Content-type: text/html; charset=utf-8");


In file account-signup.php change parts like this:

// NO ADMIN CONFIRM, BUT EMAIL CONFIRM  
           $body = "<html><body>
           <p>".T_("YOUR_ACCOUNT_AT")." ".$site_config["SITENAME"]." ".T_("HAS_BEEN_APPROVED_EMAIL")."</p>
           <p><a href='".$site_config["SITEURL"]."/account-confirm.php?id=$id&secret=$psecret'>".T_("CONFIRM_ACCOUNT")."</a></p>
           <p>".T_("HAS_BEEN_APPROVED_EMAIL_AFTER")."</p>
           <p>".T_("HAS_BEEN_APPROVED_EMAIL_DELETED")."</p>
           <p>".$site_config["SITENAME"]." ".T_("ADMIN")."</p>
           </body></html>";


And below function sendmail like this:

sendmail($email, "Account Confirmation - ".$site_config["SITENAME"], $body, "Content-type: text/html; charset=utf-8");


In file account-recover.php change parts like this:

$body = "<html><body>
                <p>Someone from ".$_SERVER["REMOTE_ADDR"]." requested account recovery.</p>
                <p><b>User name:</b> ".$arr["username"]."</p>
                <p>To change your password, click this link:<br>
                <a href='".$site_config["SITEURL"]."/account-recover.php?id=$id&secret=$secmd5'>Reset Password</a></p>
                <p>Regards,<br>".$site_config["SITENAME"]."</p>
                </body></html>";

            sendmail($arr["email"], "Password Recovery - ".$site_config["SITENAME"], $body, "Content-type: text/html; charset=utf-8");


https://www.mediafire.com/file/g85h370kjat3f6x/PHPMailer.zip/file

Hopefully I’m not forgetting anything. Test it and let me know if it works.
Thanks and Regards


Screenshot from my ACP
https://i.ibb.co/4RLDMv4B/Screenshot-2.png
Yes it's nice mate  👍
Updated IMDB with cast images and trailer



Of course you need to have the IMDB mod installed on the tracker, otherwise this cannot work. I think that goes without saying.
Thanks mate
-----------------------------------------------------------------------
Need to be installed this Mod https://torrenttrader.uk/post/9734

I successfully upgraded the IMDB integration to be compatible with PHP 8.4



IMDB Mod working with php8.4
------------------------------------------------------------
First and important add this function in backend/functions.php:


spl_autoload_register(function ($f) {
   require_once('backend/' . $f . '.php');
});


Change file TTIMDB.php like this:
-------------------------------------------------------------

<?php

class TTIMDB
{
   private $_nodes = ['https://www.omdbapi.com/?apikey=YOUR_OMDB_KEY&i=%s'];

   public function get($uri = null)
   {
       if (preg_match('#tt(\d+)#', $uri, $m)) {
           return $this->_try($m[0]);
       }
       return false;
   }

   private function _try($id)
   {
       for ($i = 0; $i < count($this->_nodes); $i++) {
           if ($data = $this->_request($id, $i)) {
               return $data;
           }
       }
       return false;
   }

   private function _request($id, $i)
   {
       $ch = curl_init();
       if ($ch) {
           curl_setopt($ch, CURLOPT_URL, sprintf($this->_nodes[$i], $id));
           curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
           curl_setopt($ch, CURLOPT_TIMEOUT, 5);
           curl_setopt($ch, CURLOPT_USERAGENT, 'TT API Client v1.0');
           curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
           $data = curl_exec($ch);
           curl_close($ch);
           return !empty($data) ? $this->_parse($data) : false;
       }
       return false;
   }

   private function _parse($data)
   {
       $info = json_decode($data);
       return ($info && !isset($info->Error)) ? $info : false;
   }

   public function getImage($poster, $id) {
       return (!empty($poster) && $poster !== "N/A")
           ? $poster
           : "images/imdb/no-poster.png";
   }

   public function getRating($rating) {
       return (!empty($rating) && $rating !== "N/A")
           ? $rating . "/10"
           : null;
   }

   public function renderStars10($rating) {
   if (empty($rating) || $rating === "N/A") {
       return '<span class="no-rating">Not rated</span>';
   }

   $stars = round($rating);
   $html = '<div class="stars">';
   for ($i = 1; $i <= 10; $i++) {
       $html .= ($i <= $stars)
           ? '<span class="star full">★</span>'
           : '<span class="star empty">☆</span>';
   }
   $html .= " <span class=\"rating-text\">($rating/10)</span></div>";
   return $html;
}


   public function getRated($rated) {
       return (!empty($rated) && $rated !== "N/A")
           ? $rated
           : "Unrated";
   }

   public function getReleased($released) {
       return (!empty($released) && $released !== "N/A")
           ? $released
           : "Unknown";
   }

   public function getUpdated($timestamp) {
       return !empty($timestamp)
           ? date("d-m-Y H:i", $timestamp)
           : "n/A";
   }
}
?>

------------------------------------------------------------------
In torrents-details.php add in IMDB part like this:


      //===| Start IMDb
$TTIMDB = new TTIMDB;

if ((($_data = $TTCache->Get("imdb/$id", 900)) === false) && ($_data = $TTIMDB->Get($row['imdb'])))
{
$_data->Poster = $TTIMDB->getImage($_data->Poster, $id);
if ( ! isset( $_data->imdbTime ) )
{
$_data->imdbTime = time();
$_data->imdbVideo = null;
}
$TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ): ?>
<fieldset class="download">
<legend><b><?php echo T_("IMDB_SHORT"); ?></b> • <?php echo $_data->Title; ?></legend>                                                        
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>"class="polaroid" height="350px" width="244px" /></td>
<td valign="top">
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null) { ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<div class="f-border imdb-box" style="padding:7px; margin-bottom:10px">
<table border="0" cellpadding="3" cellspacing="0">
<tr><td colspan="2"><?php echo $TTIMDB->renderStars10($_data->imdbRating); ?></td></tr>
<tr><td width="1%"><b><?php echo T_("IMDB_RATED"); ?></b>:</td><td> <?php echo $TTIMDB->getRated( $_data->Rated ); ?></td></tr>
<tr><td width="1%"><b><?php echo T_("IMDB_VOTES"); ?></b>:</td><td> <?php echo $_data->imdbVotes; ?> </td></tr>
</table>
</div>
</td></tr></table>
<?php } else { ?>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<div class="f-border" style="padding:7px; margin-bottom:10px">
<table border="0" cellpadding="3" cellspacing="0">
<tr><td><img src="images/imdb/00.png" border="0"></td></tr>
<tr><td><?php echo T_("NOT_YET_RATED"); ?>...</td></tr>
</table>
</div>
</td></tr></table>.........



This is the important lines: !!!(need to be changed like this):

<div class="f-border imdb-box" style="padding:7px; margin-bottom:10px">
<tr><td colspan="2"><?php echo $TTIMDB->renderStars10($_data->imdbRating); ?></td></tr>

-------------------------------------------------------------------------------
In theme.css add this:

.stars {
   font-size: 20px;
   color: gold;
   display: inline-block;
}
.star.empty {
   color: #ccc;
}
.no-rating {
   color: #999;
   font-style: italic;
}

.imdb-box {
   width: 100%;
   max-width: 600px;
}

.rating-text {
   font-size: 14px;
   color: #ffd700;
   margin-left: 6px;
   vertical-align: middle;
}

PS: File imdb.class.php no need in this case, rename or delete.
Thats all.

Regards from me

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