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

This mod seems incomplete and is missing some code maybe

where do we insert into the avps table if anyone has mod and can search avps - in the admincp the table is used just for recording sent emails and doesn't look like its needed

we have select  
DB::run("SELECT inactive.value_s AS userid, inactive.value_i AS last_mail, inactive.value_u AS mails, users.username FROM inactive LEFT JOIN users ON inactive.value_s=users.id WHERE inactive.arg='inactivemail' LIMIT 1"); 


and update
DB::run("update inactive set value_i='$date', value_u='$count', value_s='$userid' WHERE arg='inactivemail' ");
looks like it should be row
$row['descr']
not sure if you finished this but to view on torrents today edit orderby

$orderby = "ORDER BY torrents.added DESC, torrents.id DESC";
in progress because i cant test fully on v3 so might need some tweeking

1) First transfer all files to root - check folder but should not write other any files
2) Make account at TMDB and go to settings/api to get v3 key https://www.themoviedb.org/settings/api
3) Enter api key in libraries/TMDB.php (line 17)

Then to test classes are working go to YOURSITEURL/movie-database.php

Hopefully you can see all the examples and the class is working fine - let me know if this page works please

Then we can add some sql and cache

sql - renamed tables
CREATE TABLE `tmdbfilm` (
 `id` int(10) NOT NULL AUTO_INCREMENT,
 `id_tmdb` int(10) NOT NULL DEFAULT 0,
 `title` varchar(255) DEFAULT NULL,
 `duration` varchar(100) DEFAULT NULL,
 `producer` varchar(255) DEFAULT NULL,
 `genre` varchar(255) DEFAULT NULL,
 `plot` text DEFAULT NULL,
 `actor` longtext DEFAULT NULL,
 `trailer` varchar(100) DEFAULT NULL,
 `date` datetime DEFAULT NULL,
 `image` varchar(50) DEFAULT NULL,
 UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM;

-- --------------------------------------------------------

--
-- Table structure for table `tmdbshow`
--

CREATE TABLE `tmdbshow` (
 `id` int(10) NOT NULL AUTO_INCREMENT,
 `id_tmdb` int(10) NOT NULL DEFAULT 0,
 `title` varchar(255) DEFAULT NULL,
 `image` varchar(50) DEFAULT NULL,
 `season` int(10) DEFAULT NULL,
 `episodes` int(10) DEFAULT NULL,
 `status` varchar(100) DEFAULT NULL,
 `date` datetime DEFAULT NULL,
 `creator` varchar(255) DEFAULT NULL,
 `genre` varchar(255) DEFAULT NULL,
 `plot` text DEFAULT NULL,
 `actor` longtext DEFAULT NULL,
 UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM;

ALTER TABLE torrents ADD `tmdb` varchar(125) DEFAULT NULL;


in torrents-upload.php
find
	if (!empty($_POST["name"]))
$name = $_POST["name"];


add below
if (!empty($_POST['tmdb']))
          $imdb = unesc($_POST['tmdb']);


find
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."')");


add &tmdb example
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, tmdb) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time().", '".$tmdb."'')");


find
print ("<tr><td align='right'>" . T_("TORRENT_NAME") . ": </td><td align='left'><input type='text' name='name' size='60' value='" . $_POST['name'] . "' /><br />".T_("THIS_WILL_BE_TAKEN_TORRENT")." \n</td></tr>");


add below
print ("<tr><td align='right'>" . T_("TMDB") . ": </td><td align='left'> <input type='text' name='tmdb' size='60' value='" . $_POST['tmdb'] . "' /><br />(Link from TMDB. <b>Only for movie.</b>)<br />\n</td></tr>");


now upload torrent with category Anime and add TMDB link example https://www.themoviedb.org/movie/399566-godzilla-vs-kong

now to test TT side is working go to YOURSITEURL/movie-test.php?id=THE_ID_OF_UPLOADED_TORRENT

once i know base works on v3 i can add to torrents-details, edit etc

movie-database.php and movie-test.php are just to test everythings working and the classes are separate the only file that interacts with TT is the TMDBS.php the S on the end  is for sql - add or retrieve sql to TT.
Seed Bonus [TTv3] — 2021-11-11 16:00:22 in v3 Mods Completed
lets check block first - save your original file in case you have other mods in block file - this is just quick test

login_block.php replace all code for this
<?php
if (!$CURUSER) {
begin_block(T_("LOGIN"));
?>
<form method="post" action="account-login.php">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td>
<table border="0" cellpadding="1" align="center">
<tr>
<td align="center"><font face="verdana" size="1"><b><?php echo T_("USERNAME"); ?>:</b></font></td>
</tr><tr>
<td align="center"><input type="text" size="12" name="username" /></td>
</tr><tr>
<td align="center"><font face="verdana" size="1"><b><?php echo T_("PASSWORD"); ?>:</b></font></td>
</tr><tr>
<td align="center"><input type="password" size="12" name="password"  /></td>
</tr><tr>
<td align="center"><input type="submit" value="<?php echo T_("LOGIN"); ?>" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">[<a href="account-signup.php"><?php echo T_("SIGNUP");?></a>]<br />[<a href="account-recover.php"><?php echo T_("RECOVER_ACCOUNT");?></a>]</td> </tr>
</table>
   </form>
<?php
end_block();

} else {

begin_block($CURUSER["username"]);

$avatar = htmlspecialchars($CURUSER["avatar"]);
if (!$avatar)
$avatar = $site_config["SITEURL"]."/images/default_avatar.png";

$userdownloaded = mksize($CURUSER["downloaded"]);
$useruploaded = mksize($CURUSER["uploaded"]);
$privacylevel = T_($CURUSER["privacy"]);
   $bonus = $CURUSER['seedbonus'];
if ($CURUSER["uploaded"] > 0 && $CURUSER["downloaded"] == 0)
$userratio = "Inf.";
elseif ($CURUSER["downloaded"] > 0)
$userratio = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);
else
$userratio = "---";

print ("<center><img width='80' height='80' src='$avatar' alt='' /></center><br />" . T_("DOWNLOADED") . ": $userdownloaded<br />" . T_("UPLOADED") . ": $useruploaded<br />".T_("CLASS").": ".T_($CURUSER["level"])."<br />" . T_("ACCOUNT_PRIVACY_LVL") . ": $privacylevel<br />". T_("RATIO") .": $userratio<br>Seedbonus : <b><a href=mybonus.php>".$bonus."</a></b>");

?>


<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>
<?php
end_block();
}
?>
Seed Bonus [TTv3] — 2021-11-10 14:34:14 in v3 Mods Completed
What is the error in admincp sqlerr
announce — 2021-11-09 16:06:29 in v3 Support
i would recommend using micromonkeys to try - the only real difference from yours is it is missing u.doner in $userfields

your announce looked ok but i cant test v3 announce to check any errors, but i did notice this with both, the peer cache mod. backend/cache.php is a class and to use cache you must use global $TTCache that looks a little off to me - or you can use v3 original and add snatched
Error come — 2021-11-09 15:45:42 in v3 Support
this seems to work for me on your comments.php

<?php
require_once("backend/functions.php");
require_once("backend/bbcode.php");
dbconn();

if ($site_config["MEMBERSONLY"]) {
  loggedinonly();
}


$id = (int)$_GET["id"];
$type = $_GET["type"];
$edit = (int)$_GET["edit"];
$delete = (int)$_GET["delete"];
$dossier = $CURUSER['bbcode'];

if ($edit == 1 || $delete == 1 || $_GET["takecomment"] == 'yes') loggedinonly();

if (!isset($id) || !$id || ($type != "torrent" && $type != "news"))
show_error_msg(T_("ERROR"), T_("ERROR"), 1);

if ($edit=='1'){
$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT user, torrent, news FROM comments WHERE id=$id"));
// here
if($row['torrent'] == 0) {
$tid = $row['news'];
} else {
$tid = $row['torrent'];
}
//
  if (($type == "torrent" && $CURUSER["edit_torrents"] == "no" || $type == "news" && $CURUSER["edit_news"] == "no") && $CURUSER['id'] != $row['user'])  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

$save = (int)$_GET["save"];

if($save){
$text = sqlesc($_POST['text']);

$query="UPDATE comments SET text=$text WHERE id=$id";
$result=SQL_Query_exec($query);
write_log("<a href=account-details.php?id=".$CURUSER['id']."><b>".$CURUSER['username']."</a></b> ID a été édité pour se commentaire: <b>$id</b> du torrent: [<a href=torrents-details.php?id=$id><b>$id</b></a>]");
// here
if ($type == 'torrent') {
   autolink("torrents-details.php?id=$tid", 'success');
   die();
} else {
autolink("comments.php?type=news&id=$tid", 'success');
   die();
}           autolink("torrents-details.php?id=$id", "Commentaire a été modifiée avec succès.");
          //
#write_log($CURUSER['username']." a modifié le commentaire: ID:$id");
#show_error_msg(T_("COMPLETE"), "Commentaire Modifié !",1);
}

stdhead("Edit Comment");

$res = SQL_Query_exec("SELECT * FROM comments WHERE id=$id");
$arr = mysqli_fetch_array($res);

      begin_frame(T_("EDITCOMMENT"));
      print("<center><b>".T_("EDITCOMMENT")." </b><p>\n");
      print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");
      print textbbcode("comment","text",$dossier, htmlspecialchars($arr["text"]));
      print("<center><p><input type=\"submit\" value=\"Soumettre les modifications\" /></p></center></form></center>\n");
      end_frame();
      stdfoot();
      die();
#begin_frame(T_("EDITCOMMENT"));
#print("<center><b> ".T_("EDITCOMMENT")." </b><p>\n");
#print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");
#print textbbcode("comment","text", htmlspecialchars($arr["text"]));
#print("<p><input type=\"submit\" value=\"Submit Changes\" /></p></form></center>\n");
#end_frame();
#stdfoot();
#die();
}

if ($delete=='1'){
if ($CURUSER["delete_news"] == "no" && $type == "news" || $CURUSER["delete_torrents"] == "no" && $type == "torrent")  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);
   // here
$res = SQL_Query_exec("SELECT torrent, news FROM comments WHERE id=$id");
$row = mysqli_fetch_assoc($res);
if ($row["torrent"] == 0) {
$news_id = $row['news'];
SQL_Query_exec("DELETE FROM comments WHERE id = $id");
   write_log($CURUSER['username']." has deleted comment: ID: $id");
   autolink("comments.php?type=news&id=$news_id", 'Commentaire a été supprimé avec succès.');
   die();
} else {
$tid = $row['torrent'];
SQL_Query_exec("UPDATE torrents SET comments = comments - 1 WHERE id = $row[torrent]");
SQL_Query_exec("DELETE FROM comments WHERE id = $id");
   write_log($CURUSER['username']." has deleted comment: ID: $id");
   autolink("torrents-details.php?id=$tid", 'Commentaire a été supprimé avec succès.');
   die();
}
//
}


stdhead(T_("COMMENTS"));


//take comment add
if ($_GET["takecomment"] == 'yes'){
$body = $_POST['body'];

if (!$body)
show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);

if ($type =="torrent"){
SQL_Query_exec("UPDATE torrents SET comments = comments + 1 WHERE id = $id");
}

SQL_Query_exec("INSERT INTO comments (user, ".$type.", added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")");

if (mysqli_affected_rows($GLOBALS["DBconnector"]) == 1)
show_error_msg(T_("COMPLETED"), "Votre commentaire a été ajouté avec succès.", 0);
else
show_error_msg(T_("ERROR"), T_("UNABLE_TO_ADD_COMMENT"), 0);
}//end insert comment

//NEWS
if ($type =="news"){
$res = SQL_Query_exec("SELECT * FROM news WHERE id = $id");
$row = mysqli_fetch_array($res);

if (!$row){
show_error_msg(T_("ERROR"), "Nouvelles Id invalide", 0);
stdfoot();
}

begin_frame(T_("NEWS"));
echo htmlspecialchars($row['title']) . "<br /><br />".format_comment($row['body'])."<br />";
end_frame();

}

//TORRENT
if ($type =="torrent"){
$res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = $id");
$row = mysqli_fetch_array($res);

if (!$row){
show_error_msg(T_("ERROR"), "Nouveau Id invalide", 0);
stdfoot();
}
  echo "<center><table><tr><td width=50% height=50% class=ttable_head colspan=2 align=center style=line-height:100px;padding-top:14px;vertical-align:middle;font-size:20px;><b>".T_("COMMENTSFOR").":</b> <a href='torrents-details.php?id=".$row['id']."'>".htmlspecialchars($row['name'])."</a></td></tr></table></center><br />";
#echo "<center><b>".T_("COMMENTSFOR")."</b> <a href='torrents-details.php?id=".$row['id']."'>".htmlspecialchars($row['name'])."</a></center><br />";
}

begin_frame(T_("COMMENTS"));

$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE $type = $id");
$subrow = mysqli_fetch_array($subres);
$commcount = $subrow[0];

if ($commcount) {
list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id=$id&type=$type&");
$commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE $type = $id ORDER BY comments.id $limit";
$commres = SQL_Query_exec($commquery);
}else{
unset($commres);
}

if ($commcount) {
print($pagertop);
commenttable($commres, $type);
print($pagerbottom);
}else {
print("<br /><b>" .T_("NOCOMMENTS"). "</b><br />\n");
}

echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type=$type&id=$id&takecomment=yes\">";
#echo textbbcode("comment","body")."<br />";
echo textbbcode("comment","body","$dossier")."<br />";
echo "<input type=\"submit\"  value=\"".T_("ADDCOMMENT")."\" />";
echo "</form></center>";

end_frame();

stdfoot();
?>
TMDB — 2021-11-08 19:34:10 in v3 Mods in Progress
You can always try this In top of torrentsdetails below <?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);


This might help reveal issue - that code is for testing only
announce — 2021-11-08 19:30:17 in v3 Support
Change it back and post your announce code looks like there is a error somewhere in announce.php
Error come — 2021-11-08 14:40:55 in v3 Support
if this works spirtblue i would suggest removing other edits

this seems to work on torrents & news, i add //////  to help locate changes in autolink we use $tid

if ($edit=='1'){
/////
$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT user, torrent, news FROM comments WHERE id=$id"));
if($row['torrent'] == 0) {
$tid = $row['news'];
} else {
$tid = $row['torrent'];
}
//////
   if (($type == "torrent" && $CURUSER["edit_torrents"] == "no" || $type == "news" && $CURUSER["edit_news"] == "no") && $CURUSER['id'] != $row['user'])  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

$save = (int)$_GET["save"];

if($save){
$text = sqlesc($_POST['text']);

$query="UPDATE comments SET text=$text WHERE id=$id";
$result=SQL_Query_exec($query);
write_log($CURUSER['username']." has edited comment: ID:$id");
/////
if ($type == 'torrent') {
   autolink("torrents-details.php?id=$tid", 'success');
   die();
} else {
autolink("comments.php?type=news&id=$tid", 'success');
   die();
}
///////
}

stdhead("Edit Comment");

$res = SQL_Query_exec("SELECT * FROM comments WHERE id=$id");
$arr = mysqli_fetch_array($res);

begin_frame(T_("EDITCOMMENT"));
print("<center><b> ".T_("EDITCOMMENT")." </b><p>\n");
print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");
print textbbcode("comment","text", htmlspecialchars($arr["text"]));
print("<p><input type=\"submit\"  value=\"Submit Changes\" /></p></form></center>\n");
end_frame();
stdfoot();
die();
}

if ($delete=='1'){
if ($CURUSER["delete_news"] == "no" && $type == "news" || $CURUSER["delete_torrents"] == "no" && $type == "torrent")  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);
   /////////
$res = SQL_Query_exec("SELECT torrent, news FROM comments WHERE id=$id");
$row = mysqli_fetch_assoc($res);
if ($type == "torrent") {
if ($row["torrent"] > 0) {
SQL_Query_exec("UPDATE torrents SET comments = comments - 1 WHERE id = $row[torrent]");
$tid = $row['torrent'];
SQL_Query_exec("DELETE FROM comments WHERE id = $id");
       write_log($CURUSER['username']." has deleted comment: ID: $id");
       autolink("torrents-details.php?id=$tid", 'Comment deleted OK');
       die();
}
} else {
  $tid = $row['news'];
   SQL_Query_exec("DELETE FROM comments WHERE id = $id");
   write_log($CURUSER['username']." has deleted comment: ID: $id");
   autolink("comments.php?type=news&id=$tid", 'Comment deleted OK');
   die();
}
///////
}


stdhead(T_("COMMENTS"));
Error come — 2021-11-07 20:49:20 in v3 Support
played with v3 and it will be easier to use sql instead of passing $id about

get torrent id from comment table - add torrent
	$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT user, torrent FROM comments WHERE id=$id"));
$tid = $row['torrent'];


so
if ($edit=='1'){
$row = mysqli_fetch_assoc(SQL_Query_exec("SELECT user, torrent FROM comments WHERE id=$id"));
$tid = $row['torrent'];

   if (($type == "torrent" && $CURUSER["edit_torrents"] == "no" || $type == "news" && $CURUSER["edit_news"] == "no") && $CURUSER['id'] != $row['user'])  
show_error_msg(T_("ERROR"),T_("ERR_YOU_CANT_DO_THIS"),1);

$save = (int)$_GET["save"];

if($save){
$text = sqlesc($_POST['text']);

$query="UPDATE comments SET text=$text WHERE id=$id";
$result=SQL_Query_exec($query);
write_log($CURUSER['username']." has edited comment: ID:$id");

autolink("torrents-details.php?id=$tid", 'success');
die();
invite — 2021-11-07 18:14:09 in v3 Support
Can not see that in v3 can you search cleanup.php Botanicar for INVITE_TIMEOUT might be some code we can use
Error come — 2021-11-07 16:52:09 in v3 Support
my mistake $id is comment id  :unsure

try replace these in comments.php

replace
print("<form method=\"post\" name=\"comment\" action=\"comments.php?type=$type&edit=1&save=1&id=$id\">\n");


with
print("<form method=\"post\" name=\"comment\" action=\"comments.php?tid=$tid&type=$type&edit=1&save=1&id=$id\">\n");


find
$id = (int)$_GET["id"];


below add
$tid = (int)$_GET["tid"];


find
autolink("torrents-details.php?id=$id", "Commentaire a été modifiée avec succès.");


replace with
autolink("torrents-details.php?id=$tid", "Commentaire a été modifiée avec succès.");


in torrents detail
find
commenttable($commres, 'torrent');


replace
commenttable($commres, 'torrent', $id);


in functions.php (commenttable)
find
function commenttable($res, $type = null) {


replace with
function commenttable($res, $type = null, $tid = 0) {


find
        if ($type == "torrent" && $CURUSER["edit_torrents"] == "yes" || $type == "news" && $CURUSER["edit_news"] == "yes" || $CURUSER['id'] == $row['user']) 
           $edit = '[<a href="comments.php?id='.$row["id"].'&type='.$type.'&edit=1">Edit</a>] ';


replace with
        if ($type == "torrent" && $CURUSER["edit_torrents"] == "yes" || $type == "news" && $CURUSER["edit_news"] == "yes" || $CURUSER['id'] == $row['user']) 
           $edit = '[<a href="comments.php?tid=$tid&id='.$row["id"].'&type='.$type.'&edit=1">Edit</a>] ';
TMDB — 2021-11-07 15:27:35 in v3 Mods in Progress
this will sort out using the url instead of just the numbers,

in backend/tttmdb.php
find
class TTtmdb
{


add below
    public static function getId($url)
   {
       $parts = explode('/', $url);
       $id_tmdb = strtok($parts[4], '-');
       return $id_tmdb;
   }


in torrents-details edits change x4
$id_tmdb = $row["tmdb"];


for
$id_tmdb = TTtmdb::getId($row["tmdb"]);
Error come — 2021-11-07 13:55:53 in v3 Support
See if it works without back  in url $idback
autolink("torrents-details.php?id=$id", "Commentaire a été modifiée avec succès.");
die();
invite — 2021-11-07 11:46:09 in v3 Support
For reference this is the code in cleanup.php
//DELETE PENDING USER ACCOUNTS OVER TIMOUT AGE
$deadtime = gmtime() - $site_config["signup_timeout"];
SQL_Query_exec("DELETE FROM users WHERE status = 'pending' AND added < FROM_UNIXTIME($deadtime)");


So to change edit this line in config.php

$site_config['signup_timeout'] = '259200';


It's set at 3 days - for 30 days maybe try 2592000
TMDB — 2021-11-07 07:28:05 in v3 Mods in Progress
my imdb mod has broke half of trailers have stopped working not sure if anyone else has had this recently but i am fed up of changing it all the time   :devil

so i played with this mod - not sure if anyone has this working 100% so now i have it working thought i would convert for v3

i made quite a few changes so this is just the base and ill post rest when i know its working on v3
backup your files first :thumb Place you api key in backend/tmdbconfig.php

1) add the sql from folder - i got errors with one above

2) copy full folder to root except torrents-details.php

3) i add torrents-details.php as guide but here are the edits
before
dbconn();

add - important here we say which cat name in array so you can do many
require_once("backend/TTtmdb.php");
define('MovieCats', array('Movies')); // movie cats eg array('Movies','MoviesHD')
define('SerieCats', array('Anime')); // serie cat eg array('Anime','tv')


find
$res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");

add tmdb to query - think i missed this in attached file
torrents.tmdb


find
if (!$row || ($row["banned"] == "yes" && $CURUSER["edit_torrents"] == "no"))
show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);

below add
        if(!empty($row["tmdb"]) && in_array($row["cat_parent"], SerieCats)) {
           $id_tmdb = $row["tmdb"];
           $total = get_row_count("seriethequemdb"," WHERE id_tmdb = ".$id_tmdb."");
           if($total == 0) {
               TTtmdb::createSerie($id_tmdb, $id);
           }
       } elseif(!empty($row["tmdb"]) && in_array($row["cat_parent"], MovieCats)) {
           $id_tmdb = $row["tmdb"];
           $total = get_row_count("filmothequemdb"," WHERE id_tmdb = ".$id_tmdb."");
           if($total == 0) {
               TTtmdb::createFilm($id_tmdb, $id);
           }
       }


find
//end download box

add below
echo "<fieldset class='download'>";
echo "<table cellpadding='3' border='0' width='100%'>";

if(!empty($row["tmdb"]) && in_array($row["cat_parent"], SerieCats)) {
   $id_tmdb = $row["tmdb"];
   $total = get_row_count("seriethequemdb"," WHERE id_tmdb = ".$id_tmdb."");
   if($total > 0) {
       TTtmdb::getSerie($id_tmdb);
   }
} elseif(!empty($row["tmdb"]) && in_array($row["cat_parent"], MovieCats)) {
   $id_tmdb = $row["tmdb"];
   $total = get_row_count("filmothequemdb"," WHERE id_tmdb = ".$id_tmdb."");
   if($total > 0) {
       TTtmdb::getFilm($id_tmdb);
   }
}

echo "</tr></table></fieldset><br /></div>";


4) much more but before to test
   *  at top of torrentsdetails select cat define('SerieCats', array('Anime'));
   *  go to torrents table and manually enter a tmdb number eg series 60735 or 399566 for a film
Server load — 2021-11-06 04:05:00 in v3 Support
i remember having some issue here, i cant think of exactly what it was but i remember a few pieces not working and i spent some time playing with the code, this is my server block - you can delete the two serverload4/5.php from the backend folder if this code works

in serverload_block.php
after begin_block(T_("SERVER_LOAD"));  and  before //echo("<b>Current Users:</b> $users[0]<br>

replace with this
    if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") {
       // Get total physical memory (this is in bytes)
       $cmd = "wmic ComputerSystem get TotalPhysicalMemory";
       @exec($cmd, $outputTotalPhysicalMemory);
       // Get free physical memory (this is in kibibytes!)
       $cmd = "wmic OS get FreePhysicalMemory";
       @exec($cmd, $outputFreePhysicalMemory);
       if ($outputTotalPhysicalMemory && $outputFreePhysicalMemory) {
           // Find total value
           foreach ($outputTotalPhysicalMemory as $line) {
               if ($line && preg_match("/^[0-9]+\$/", $line)) {
                   $memoryTotal = $line;
                   break;
               }
           }
           // Find free value
           foreach ($outputFreePhysicalMemory as $line) {
               if ($line && preg_match("/^[0-9]+\$/", $line)) {
                   $memoryFree = $line;
                   $memoryFree *= 1024; // convert from kibibytes to bytes
                   break;
               }
           }
       }
       $memtotal = mksize($memoryFree);
       $memused = mksize($memoryTotal);

       $users = ["none"];
       $loadnow = "";
       $load5 = "";
       $load15 = "";
       $operatingsystem = "";
       $up = "";

   } else {
       // Users and load information
       $reguptime = exec("uptime");
       if ($reguptime) {
           if (preg_match("/up (.*), *(\d) (users?), .*: (.*), (.*), (.*)/", $reguptime, $uptime)) {
               $up = preg_replace("!(\d\d):(\d\d)!", '\1h\2m', $uptime[1]);
               $users[0] = $uptime[2];
               $users[1] = $uptime[3];
               $loadnow = $uptime[4];
               $load5 = $uptime[5];
               $load15 = $uptime[6];
           }
       } else {
           $up = "--";
           $users[0] = "NA";
           $users[1] = "--";
           $loadnow = "NA";
           $load5 = "--";
           $load15 = "--";
       }

       // Operating system
       $temp = file_get_contents("/proc/version");
       if ($temp) {
           $osarray = explode(" ", $temp);
           $distros = [
               "Gentoo", "/etc/gentoo-release",
               "Fedora Core", "/etc/fedora-release",
               "Slackware", "/etc/slackware-version",
               "Cobalt", "/etc/cobalt-release",
               "Debian", "/etc/debian_version",
               "Mandrake", "/etc/mandrake-release",
               "Mandrake", "/etc/mandrakelinux-release",
               "Yellow Dog", "/etc/yellowdog-release",
               "Red Hat", "/etc/redhat-release",
               "Arch Linux", "/etc/arch-release",
           ];

           $distro = "";
           if (file_exists("/etc/lsb-release")) {
               $lsb = file_get_contents("/etc/lsb-release");
               preg_match('!DISTRIB_DESCRIPTION="(.*)"!', $lsb, $distro);
               $distro = $distro[1];
           } else {
               do {
                   if (file_exists($distros[1])) {
                       $distro = file_get_contents($distros[1]);
                       $distro = "$distros[0] " . preg_replace("/[^0-9]*([0-9.]+)[^0-9.]{0,1}.*/", "\\1", $distro);
                       break;
                   }
                   array_shift($distros);
                   array_shift($distros);
               } while (count($distros));
           }

           if (!$distro) {
               $distro = "Unknown Distro";
           }

           $operatingsystem = "$distro ($osarray[0] $osarray[2])";
       } else {
           $operatingsystem = "(N/A)";
       }

       // RAM usage
       $meminfo = @file_get_contents("/proc/meminfo");
       preg_match("!^MemTotal:\s*(.*) kB!m", $meminfo, $memtotal);
       $memtotal = $memtotal[1] * 1024;
       preg_match("!^MemFree:\s*(.*) kB!m", $meminfo, $memfree);
       $memfree = $memfree[1] * 1024;
       preg_match("!^Buffers:\s*(.*) kB!m", $meminfo, $buffers);
       $buffers = $buffers[1] * 1024;
       preg_match("!^Cached:\s*(.*) kB!m", $meminfo, $cached);
       $cached = $cached[1] * 1024;

       $memused = mksize($memtotal - $memfree - $buffers - $cached);
       $memtotal = mksize($memtotal);
   }

TorrentTrader 3.0 — 2021-11-04 16:04:06 in v3 Download
just installed v3 and noticed

1) error reporting should be disabled in functions at top - it should only be used in dev mode
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);


2) in functions around line 807 thisEach is there but the function is commented out
while (list($code, $url) = thisEach($smilies))
$s = str_replace($code, '<img border="0" src="'.$site_config["SITEURL"].'/images/smilies/'.$url.'" alt="'.$code.'" title="'.$code.'" />', $s);


should be
	foreach($smilies as $code => $url) {
       $s = str_replace($code, '<img border="0" src="'.$site_config["SITEURL"].'/images/smilies/'.$url.'" alt="'.$code.'" title="'.$code.'" />', $s);
}


if i notice anything else ill post  :thumb
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