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
TMDB
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

2021-05-08 20:05:30
Hello I finally found the mode, but on v3, at home it is not in the sql table once uploaded, thank you for helping me to make it work correctly.

SQL:
CREATE TABLE `filmothequemdb` (
 `id` int(10) UNSIGNED NOT NULL,
 `id_tmdb` int(10) NOT NULL,
 `titre` varchar(255) CHARACTER SET utf8 NOT NULL,
 `duree` varchar(100) CHARACTER SET utf8 NOT NULL,
 `producteur` varchar(255) CHARACTER SET utf8 NOT NULL,
 `genre` varchar(255) CHARACTER SET utf8 NOT NULL,
 `resume` text CHARACTER SET utf8 NOT NULL,
 `acteur` text CHARACTER SET utf8 NOT NULL,
 `ba` varchar(100) CHARACTER SET utf8 NOT NULL,
 `date` varchar(15) CHARACTER SET utf8 NOT NULL,
 `image` varchar(50) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE `seriethequemdb` (
 `id` int(10) UNSIGNED NOT NULL,
 `id_tmdb` int(10) NOT NULL,
 `titre` varchar(255) CHARACTER SET utf8 NOT NULL,
 `image` varchar(50) CHARACTER SET utf8 NOT NULL,
 `saison` int(10) NOT NULL,
 `episodes` int(10) NOT NULL,
 `statut` varchar(100) CHARACTER SET utf8 NOT NULL,
 `date` varchar(15) CHARACTER SET utf8 NOT NULL,
 `createur` varchar(255) CHARACTER SET utf8 NOT NULL,
 `genre` varchar(255) CHARACTER SET utf8 NOT NULL,
 `resume` text CHARACTER SET utf8 NOT NULL,
 `acteur` text CHARACTER SET utf32 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

ALTER TABLE torrents ADD `tmdb` varchar(125) CHARACTER SET utf8 NOT NULL;

SQL UPDATE 12-05-20121 BY MicroMonkey

In the cache folder you will create a folder with the torrent name and you will create in the torrent folder two other folder with the name of the movie and series
Example of the path:  /cache/torrent/film
Example of the path:  /cache/torrent/serie

Do the same in the uploads / images folder :
Example of the path:  upload/images/tmdb/film
Example of the path:  upload/images/tmdb/serie

Add the folder named tmdb to the root of the site.

Add at the end of backend/functions.php this line:
// TMDB
 function duree_sec($time) {
   $tabTemps = array("jours" => 86400,"h." => 3600,"min." => 60);
   $result = "";
   foreach($tabTemps as $uniteTemps => $nombreSecondesDansUnite)
       {
       $$uniteTemps = floor($time/$nombreSecondesDansUnite);
       $time = $time%$nombreSecondesDansUnite;
       if($$uniteTemps > 0 || !empty($result))
       $result .= $$uniteTemps." $uniteTemps ";
       }
   return $result;
}

// Fonction qui calcule les Heures Minutes d'une duree en sec'
function duree($time){
$tabTemps = array("jours" => 86400,"h." => 60,"min." => 1);
$result = "";
foreach($tabTemps as $uniteTemps => $nombreSecondesDansUnite){
$$uniteTemps = floor($time/$nombreSecondesDansUnite);
$time = $time%$nombreSecondesDansUnite;
if($$uniteTemps > 0 || !empty($result))
$result .= $$uniteTemps." $uniteTemps ";
}
return $result;
}
// End TMDB


In torrents-upload.php search:
,last_action


and add :
,tmdb


search:
, '".get_date_time()."


And add:
', ".sqlesc($tmdb)."


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


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


Add after :
// TMDB
print ("<tr><td class='table_col1' align='right' width='180'><b>".T_("TMDB_URL").": </b></td><td class='table_col2' ><input type='text' 'name='tmdb' size='60' value='".htmlspecialchars($row['tmdb'])."' />&nbsp;<a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/Torrents/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a><br /><i>".T_("FORMAT").": </i> <span style='color:IndianRed; font-size: 15px;'><b>Seulement ajouter le nombre a la fin de url, exemple: 60735 </b></span><br/></td></tr>");


In torrents-edit.php look for :
    //update images
   $img1action = $_POST['img1action'];
   if ($img1action == "update")
       $updateset[] = "image1 = " .sqlesc(uploadimage(0, $row["image1"], $id));
   if ($img1action == "delete") {
       if ($row[image1]) {
           $del = unlink($site_config["torrent_dir"]."/images/$row[image1]");
           $updateset[] = "image1 = ''";
       }
   }


Add before :
    //TMDB
   if ( $_POST['tmdb'] != $row['tmdb']){
   $updateset[] = "tmdb = " . sqlesc($_POST["tmdb"]);
   $TTCache->Delete("tmdb/$id"); // A verifier le fonction
   }


Search :
echo "<tr><td class='table_col1' align='right'><b>".T_("LANG").": </b></td><td class='table_col2'>".$langdropdown."</td></tr>";


Add before :
print ("<tr><td class='table_col1' align='right' width='180'><b>".T_("TMDB_URL").": </b></td><td class='table_col2' ><input type='text' 'name='tmdb' size='60' value='".htmlspecialchars($row['tmdb'])."' />&nbsp;<a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/Torrents/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a><br /><i>".T_("FORMAT").": </i> <span style='color:#FF0000; font-size: 15px;'><b>Seulement ajouter le nombre a la fin de url, exemple: 60735 </b></span><br/></td></tr>");


In torrents-detail.php look for:
torrents.freeleech,


Add :
torrents.tmdb,


Search :L
echo "</div></td></tr></table></center><br /><br />";
//end download box


Add after :
echo "<fieldset class='download'>";

echo "<table cellpadding='3' border='0' width='100%'>";
//print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n"); Fonction deplacer dans l include et modifié
//---------------------------------------------------------------TMDB -------------------------------------------------------


if(!empty($row["tmdb"]) && $row["cat_parent"] == 'Movies' ){

$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("filmothequemdb"," WHERE id_tmdb = ".$id_tmdb."");
if($total >0)
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/traitement_film.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/creation_film.php");
die();
}
}

//inclusion de la partie tmdb série si actif dans le config que l'url de tmdb est enregistree et que la catégorie est série
//attention de specifier le bon nom de la categorie série de votre base de donnée par defaut Séries
/*
elseif(!empty($row["allocine"]) or !empty($row["imdb"]) or !empty($row["tmdb"]) && $row["cat_parent"] == 'Serie TV' ){
*/



elseif(!empty($row["tmdb"]) && $row["cat_parent"] == 'TV'  ){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("seriethequemdb"," WHERE id_tmdb = ".$id_tmdb."");
if($total > 0)
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/traitement_serie.php");

else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/creation_serie.php");
die();
}
}
//else // si pas de lien TMDB
/////END description

//print ("<tr><td align='center' colspan='2'><b><br /><font size='5'><font color='#95BFC9'> Présentation Manuelle </font></font></b><br /><center> ".format_comment($row["descr"])." </center></td></tr>");

echo "</tr></table></fieldset><br /></div>";
//---------------------------------------------------------------End TMDB -------------------------------------------------------
// Original
(Take note that you must change the name of your category according to your category number you have defined on your site.
Line:
if(!empty($row["tmdb"]) && $row["cat_parent"] == 'Movies' ){



You must add the number in the case and not all the url link from TMDB.com

Example : 399566
For Url: https://www.themoviedb.org/movie/399566-godzilla-vs-kong

You must register on TMDB to get your key api
Your api key to add the tmdb / configuration / all.php and default.phpfile

~ Make sure to set all cache folders 777 .

Download the tmdb file here

Update by SLy 12-05-2021
- modules/traitement_film.
- modules/traitement_serie.php

Last edited by spiritblue on 2021-05-14 08:17:02
2021-05-09 12:27:00
nice. I will check this out later. Thanks for sharing. Im sure we can make it work using the full URL. Its a bummer having to copy a small piece of a URL to use. Imma try this later
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)
Last edited by MicroMonkey on 2021-05-09 12:34:58
2021-05-09 15:24:32
bonjour,
je l ai fais fonctionner en l'état , il reste des imperfections a résoudre !
je peux vous donner une url (un serveur test )ou vous pouvez le voir fonctionner .
un mail en mp et je vous donne une invitation .

on pourras tester le systeme d invitation de la v3 ^^

Traduction Google :
Hello,
I made it work as is, there are still imperfections to resolve!
i can give you a url (a test server) or you can see it working a mp mail and i give you an invite.

we can test the invitation system of v3 ^^
Last edited by SLy on 2021-05-09 15:51:33
2021-05-10 08:14:13
thanks MicroMonkey  :D
2021-05-11 21:22:00
Database Error in torrents-details.php on line 28: Unknown column 'torrents.tmdb' in 'field list'. Query was: SELECT torrents.anon, torrents.recommended, torrents.thanks, torrents.seeders, torrents.tube, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.imdb, 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, torrents.tmdb, torrents.bgsubtitle, torrents.bgaudio, 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 = 133.


I followed step by step, but error :)
2021-05-12 00:02:31
Perhaps try this in SQL. I havent tried this mod yet, so Im just taking a stab at it
ALTER TABLE torrents ADD `tmdb` varchar(125) CHARACTER SET utf8 NOT NULL;

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)
Last edited by MicroMonkey on 2021-05-12 10:52:48
2021-05-12 04:41:10
Thanks MM this working, but nothing is displayed, maybe not work on localhost



Edit: My mistake wrong path in torrents-details.php
require_once($_SERVER["DOCUMENT_ROOT"]."/test/tmdb/modules/traitement_serie.php");

change to yours

in my case
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_serie.php");

But again error:

Last edited by coco on 2021-05-12 05:02:29
2021-05-12 10:43:39
at first glance that looks like a permission issue.
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)
2021-05-12 15:57:05
make sure you have the directory (s) in the cache
for example in traitement_serie.php :
if ((($_data = $TTCache->Get("torrent/tmdb/serie/$id_tmdb", 1728000)) === false))
and not :
if ((($_data = $TTCache->Get("cache/torrent/tmdb/serie/$id_tmdb", 1728000)) === false))
Last edited by SLy on 2021-05-12 16:01:51
2021-05-12 23:13:50
I come to update the files above but on my side it does not display anything on the sql table, it is empty and therefore nothing has to be edited in the input tag
2021-05-12 23:36:23
make sure to set all cache folders 777. If you add a new folder to cache, you need to set it as well to 777 to allow www-data to write to it.
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)
2021-05-13 16:48:22
MicroMonkey:
make sure to set all cache folders 777. If you add a new folder to cache, you need to set it as well to 777 to allow www-data to write to it.


Unfortunately buddy it does not help at all in my case, have tried with all possible and available solutions.
Maybe someone else has managed to get it started and share it with us


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
2021-05-13 23:06:24
have you tried to chown your web directory this way. This is assuming you are using apache. This will fix alot of permission problems since apache and www-data is what writes to the cache
sudo chown -R www-data:www-data /var/www/YOUR_WEBSITE_FOLDER

If that works, then you would have to chown back to
sudo chown -R $USER:www-data /var/www/YOUR_WEBSITE_FOLDER

in order to overwrite files, otherwise you will not have permission to do so. Then you would just chown back to www-data. Pretty easy
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)
Last edited by MicroMonkey on 2021-05-13 23:17:17
2021-05-14 08:02:13
Oh yes, of course that was the first option to do. In the centos Web Panel there is this option for "fix-all-perimisions" for the named user.

I will try some more options and solutions over the weekend to check my entries in certain files so I will come back with the result

Thanks and hello everyone, have a nice weekend guys


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
2021-11-07 07:28:05
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
tt tmdb mod v3.zip
File missing
Last edited by M-jay warn on 2021-11-07 13:10:21
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728