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
TT 3.8.3 PHP8 (Not completed)
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / V4 / Downloads & Updates

2025-11-02 13:28:44
Hi Botanicar, message received on my end, 100% with you!

I'm a beginner...

- I propose changing the staff panel from the old one. I've worked on the code to adapt it for mysqli, making it much more secure than the classic version and working well.










~ I've created a Trailer mode with PrettyPhoto, in addition to its associated options.

~ I'll try to work on images with Highslide.

For the rest, I'll take it step by step, as my head is full of reliable suggestions that could work with PHP 8+.
Last edited by spiritblue on 2025-11-02 13:35:41
2025-11-08 02:40:38
I went to the CP staff and clicked on [FORCE CLEAN] and it gave me this error >>
Warning: Undefined array key 1 in /home/xxx/public_html/admincp.php on line 48


Chercher dans admincp.php:
$ver = explode(" ",$_SERVER["SERVER_SOFTWARE"],3);
return ($ver[0] . " " . $ver[1]);


Remplacer par  :
function getServerSoftwareVersion(): string {
   $serverSoftware = $_SERVER['SERVER_SOFTWARE'] ?? php_sapi_name();

   // If it's an integrated PHP server or FPM, we try to retrieve the PHP version directly.
   if (stripos($serverSoftware, 'PHP') !== false) {
       return 'PHP ' . PHP_VERSION;
   }

   // Otherwise, we cut the chain and take the first two pieces if possible.
   $parts = preg_split('/\s+/', trim($serverSoftware));
   if (count($parts) >= 2) {
       return $parts[0] . ' ' . $parts[1];
   }

   return $serverSoftware; // gross value of relief
}


Let me know if there's a problem, I'll do my best ;)
Last edited by spiritblue on 2025-11-08 02:42:33
2025-11-08 17:51:31
Dès qui a plusieurs membres du staff ça donne une erreur, je vous donne la correction :

Dans shoutedit.php chercher :
    // Check if the user is the owner of the message or an admin
   if ($CURUSER["id"] != $arr["userid"] && get_user_class() < 6) {
       show_error_msg("Error", "Denied!", 1);
   }


Remplacer par :
// Check if the user is the owner of the message or an admin
   function edit_shout($arr) {
   global $CURUSER;

   if ($CURUSER["id"] != $arr["userid"] && get_user_class() < 6) {
       show_error_msg("Error", "Denied!", 1);
       }
   }
// End


Last edited by spiritblue on 2025-11-08 17:52:28
2025-11-09 03:09:35
account-signup.php

line 137

change $signupclass = '7';
to             $signupclass = '8';

since you have site owner as group 8
2025-11-09 10:19:06
Changed this part of account-singup.php file
Because we have eight different member groups, we have missed that group eight is the "owner", the change was made immediately and is updated on github as well.


	
//make first member admin
if ($numsitemembers == '0') {
$signupclass = '8';
} else {
$signupclass = '1';
}



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-11-11 14:28:49
Updated IMDB with cast images and trailer




2025-11-11 21:37:53
Thanks Coco, the video with prettyPhoto is great!
--------
We'll have to think about getting a Gollum mode for TMDB.
Last edited by spiritblue on 2025-11-11 21:39:32
2025-11-11 22:44:38
The thing I've been thinking about for years when it comes to TT (regardless of which version we use) is to get rid of the $image1 and $image2 fields and have the images from iMDB instead... then we reduce space and load the cache which in turn is a better version of the available data.

Of course then we have another problem then... if (as they usually do) iMDB changes its source code and information we have to "reprogram" our entire code which is a difficult thing...


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-11-13 01:15:36
Update Block Users Online

Add lang :
======
// Block usersonline
$LANG["ONLINE_USERS_TODAY"] = "Online Users Today";
$LANG["CLASS_USER_FONDATOR"] = "Fondator";
$LANG["CLASS_USER_ADMINISTRATOR"] = "Administrator";
$LANG["CLASS_USER_SUPER_MODERATOR"] = "Super Moderator";
$LANG["CLASS_USER_MODERATOR"] = "Moderator";
$LANG["CLASS_USER_VIP"] = "V.I.P";
$LANG["CLASS_UPLOADER"] = "Uploader";
$LANG["CLASS_USER_POWER"] = "Power User";
$LANG["CLASS_USER"] = "User";
$LANG["CLASS_SYSTEM"] = "Robot";


In usersonline_block.php replace all with :
==========================
<?php

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

begin_block( T_("ONLINE_USERS_TODAY") );

$expires = 60; // Cache time in seconds

if (($rows = $TTCache->Get("usersonlinetoday_block", $expires)) === false) {
$res = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND username != 'System' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400 ORDER BY username");
  $rows = array();

while ($row = mysqli_fetch_assoc($res)) {
  $rows[] = $row;
}
  $TTCache->Set("usersonlinetoday_block", $rows, $expires);
}
echo "<div id='uOnline' class='list' align='left'>";
echo "<button class=\"Tsiz\"><i class=\"fas fa-database\"></i><font color=\"" . $site_config['system_color'] . "\">   ".T_("CLASS_SYSTEM")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user\"></i><font color=\"" . $site_config['user_color'] . "\">   ".T_("CLASS_USER")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user-tie\"></i><font color=\"" . $site_config['power_user_color'] . "\">   ".T_("CLASS_USER_POWER")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-ban text-red\"></i><font color=\"" . $site_config['uploader_color'] . "\">   ".T_("CLASS_USER_POWER")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user-shield\"></i><font color=\"" . $site_config['vip_color'] . "\">   ".T_("CLASS_USER_VIP")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user-cog\"></i><font color=\"" . $site_config['moderator_color'] . "\">   ".T_("CLASS_USER_MODERATOR")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user-astronaut\"></i><font color=\"" . $site_config['super_moderator_color'] . "\">   ".T_("CLASS_USER_SUPER_MODERATOR")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-user-graduate\"></i><font color=\"" . $site_config['administrator_color'] . "\">   ".T_("CLASS_USER_ADMINITRATOR")."</font></button> ";
echo "<button class=\"Tsiz\"><i class=\"fas fa-gavel\"></i><font color=\"" . $site_config['siteowner_color'] . "\">   ".T_("CLASS_USER_FONDATOR")."</font></button> ";
echo "<hr>";
if (!$rows) {
  echo T_("NO_USERS_ONLINE");
  } else {
echo "<ul>\n";
  for ($i = 0, $cnt = count($rows), $n = $cnt - 1; $i < $cnt; $i++) {
  $row = &$rows[$i];


switch ( $row['class'] ){

case 9:
$row["username"] = "<font color=\"" . $site_config['system_color'] . "\">" . $row["username"] . "</font>"; //Robot
break;
case 8:
$row["username"] = "<font color=\"" . $site_config['siteowner_color'] . "\">" . $row["username"] . "</font>"; //Fondator
break;
case 7:
$row["username"] = "<font color=\"" . $site_config['administrator_color'] . "\">" . $row["username"] . "</font>"; //Administrator
break;
case 6:
$row["username"] = "<font color=\"" . $site_config['super_moderator_color'] . "\">" . $row["username"] . "</font>"; //Power Moderator
break;
case 5:
$row["username"] = "<font color=\"" . $site_config['moderator_color'] . "\">" . $row["username"] . "</font>"; //Moderator
break;
case 4:
$row["username"] = "<font color=\"" . $site_config['uploader_color'] . "\">" . $row["username"] . "</font>"; //Uploader
break;
case 3:
$row["username"] = "<font color=\"" . $site_config['vip_color'] . "\">" . $row["username"] . "</font>"; //V.I.P
break;
case 2:
$row["username"] = "<font color=\"" . $site_config['power_user_color'] . "\">" . $row["username"] . "</font>"; //Power User
break;
case 1:
$row["username"] = "<font color=\"" . $site_config['user_color'] . "\">" . $row["username"] . "</font>"; //Members
break;
}

  $warned = null;

if ( $row['warned'] == 'yes' ){
  $warned = '<sup><i class="fas fa-ban text-red"></i></sup>';
}

  $donated = null;

if ($row['donated'] > 0){
  $donated = '<sup><i class="fas fa-star text-gold fa-spin"></i></sup>';
}

  echo "<li>  <a href='account-details.php?id=$row[id]'>  $row[username] $warned $donated  </a>".($i < $n ? ", " : "")."</li>\n";
}
  echo "</ul><br/></div>\n";
}
end_block();
?>


In my spare time... Not much, but it's nice.😉

UPDATE, 15-11-2025
==============

Add to your theme file (theme.css) :
---------------------------------------
/* -- Liste User block -- */
.list {
display: flex;
flex-direction: column;
}

.Tsiz {
background-color:#f5f5f5;
-moz-border-radius: 2;
border-radius: 2px;
font-family: "Cagliostro", sans-serif;
font-size: 12px;
padding: 2px 4px 2px 4px;
border: solid #505050 1px;
text-decoration: none;
text-align: left;
min-width:75px;
margin-bottom: 5px;
}


Example :
======

Last edited by spiritblue on 2025-11-15 14:38:47
2025-11-13 14:30:36
Yes it's nice mate  👍
2025-11-13 17:47:39
@spiritblue
change:

echo "<div id='uOnline' class='bMenu' ><center>";


for

echo "<div id='uOnline' class='list' align='left'>";


in css file change class Tsiz to:


.list {
 display: flex;
 flex-direction: column;
}

.Tsiz {
 background-color:#f5f5f5;
 -moz-border-radius: 2;
 border-radius: 2px;
 font-family: "Cagliostro", sans-serif;
 font-size: 12px;
 padding: 2px 4px 2px 4px;
 border: solid #505050 1px;
 text-decoration: none;
 text-align: left;
 min-width:75px;
 margin-bottom: 5px;
}



to get all class on same line and justified to left side
[img=https://i.postimg.cc/XYw9x8fg/Screenshot-2.jpg][/img]



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2025-11-13 18:51:12
2025-11-13 20:39:46
Thanks coco   👍

Big thanks Botanicar, Much better classification 👌
2025-11-15 10:08:11
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
PHPMailer.zip
Download

Last edited by coco on 2025-11-15 21:25:17
2025-11-15 16:29:54
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:)
2025-11-15 17:34:36
I also have some instructions for using gmail with phpmailer if that helps anyone. I just put it on the main github page for TTv3 https://github.com/MicrosoulV3/TorrentTrader-v3
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
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: 4
  • Members: 0
  • Guests online: 4
  • Comments: 3
  • Messages: 1,728