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

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

2022-05-17 17:39:22
* update 19/05/2022

Bonjour,
voici le mod TMDB    --> https://www.themoviedb.org/
crée par ???
Modifier par Gollum
* Ajout détection automatique du lien TMBD dans le NFO, il ajoute le code $tmbd

- Possibilité de avoir les infos en Français ,anglais, etc...  a configuration a réglé

fonctionne sur les Films et séries

- dans le dossier  : imdb/configuration/default.php  
$cnf['apikey'] = 'APIKEY ICI';    ajouter votre clés TMBD
$cnf['lang'] = 'fr';  changer la langue
Commençons

---------------------------------------------------------------------------------------
Post update 05/19/2022

Hello,
here is the TMDB mod --> https://www.themoviedb.org/
created by ???
Modifier by Gollum
* Added automatic detection of the TMBD link in the NFO, it adds the code $tmbd
- Possibility of having the information in French, English, etc... a configuration has been settled

works on Films and series

- in the folder:  imdb/configuration/default.php
$cnf['apikey'] = 'APIKEY HERE'; add your TMBD keys
$cnf['lang'] = 'en'; change the language

let's start

SQL

CREATE TABLE `tmdb` (
 `id` int(10) NOT NULL AUTO_INCREMENT,
 `id_torrent` int(10) 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,
 `saison` int(10) NOT NULL,
 `episodes` int(10) NOT NULL,
 `statut` varchar(100) CHARACTER SET utf8 NOT NULL,
 `casts` int(10) NOT NULL,
 `review` int(10) NOT NULL,
 UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


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


config.php

Mettre le nom que vous avais mis dans cat_parent de movies et tv
--------------------------------------------------------------------------
Put the name you put in cat_parent of movies and tv

ajouter / Add

#===============================================#
# Start List cat_parent Films et Tv: By Gollum  #
#===============================================#
$config['MOVIES'] = "Movies"; // Mettre Votre nom cat parent.Films
$config['DOCUMENTARIES'] = "Documentaries"; // Mettre Votre nom cat parent.Films
$config['TV'] = "TV";  // Mettre Votre nom cat parent.TV
$config['Pack_Series'] = "Pack_Series";  // Mettre Votre nom cat parent.TV
#===============================================#
#  End List cat_parent Films et Tv: By Gollum   #
#===============================================#


functions.php

Chercher / search

$row = @mysqli_fetch_assoc(@SQL_Query_exec("SELECT image1,image2 FROM torrents WHERE id=$id"));


Remplacer / Replace

$row = @mysqli_fetch_assoc(@SQL_Query_exec("SELECT image1,image2,tmdb FROM torrents WHERE id=$id"));


Chercher / search

@unlink($site_config["nfo_dir"]."/$id.nfo");


Ajouter après / Add after

#========================#
#  Start TMBD By Gollum  #
#========================#
@unlink($site_config['cache_dir']."/tmdb_cache/".$id."_".$row['tmdb'].".cache");
@unlink("tmdb/tmdb_posters/".$id."_".$row['tmdb'].".jpg");
SQL_Query_exec("DELETE FROM tmdb WHERE id_torrent = $id");
#=======================#
#  End TMBD By Gollum   #
#=======================#


Ajouter a la Fin page / Add to End Page

#=============================#
#  Start DATE TMBD By Gollum  #
#=============================#
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 DATE TMBD By Gollum  #
#===========================#


torrent_upload.php

Chercher / search

//end upload images


Ajouter apres / Add after

#========================#
#  Start TMBD By Gollum  #
#  SEARCH TMBD in NFO #
#========================#
$nfoo = str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilename));
$to_check = sqlesc($nfoo);
$found = strpos($to_check, 'themoviedb.org/movie/')+21;
if($found == 21){
$found = strpos($to_check, 'themoviedb.org/tv/')+18;
}
$set_tmdb = substr($to_check, $found, 6);
$set_tmdb = preg_replace("/[^0-9]/","",$set_tmdb);
if(is_numeric($set_tmdb)){
$tmdb = $set_tmdb;
}else{
$tmdb = '';
}
// nothing found in NFO search in the $_POST
if($tmdb == ''){
if (!empty($_POST["tmdb"]))
$tmdb = $_POST["tmdb"];
}
#=======================#
#  End TMBD By Gollum   #
#=======================#


,last_action


Ajouter apres / Add after

,tmdb


Chercher / search


, '".get_date_time()."'



Ajouter apres / Add after


, ".sqlesc($tmdb)."


Chercher / search

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


Ajouter apres / Add after

#========================#
#  Start TMBD By Gollum  #
#========================#
print ("<tr><td align='right' width='180'><b>".T_("TMDB_URL").": </b></td><td><input placeholder='Format: Ajouter le nombre de url, exemple: 60735' type='text' name='tmdb' size='60' value='" . $_POST['tmdb'] . "' /> <a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a></td></tr>");
#=======================#
#  End TMBD By Gollum   #
#=======================#


torrent-edite.php

Chercher / search

SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id");


ajouter avant / add before

#========================#
#  Start TMBD By Gollum  #
#========================#
if ( $_POST['tmdb'] != $row['tmdb']){
$updateset[] = "tmdb = " . sqlesc($_POST["tmdb"]);
$sql = SQL_Query_exec("SELECT tmdb FROM torrents WHERE id = $id");
$row1 = mysqli_fetch_array($sql);
SQL_Query_exec("DELETE FROM tmdb WHERE id_torrent = ".$id."");
@unlink($site_config['cache_dir']."/tmdb_cache/".$id."_".$row1["tmdb"].".cache");
@unlink("tmdb/tmdb_posters/".$id."_".$row1["tmdb"].".jpg");
}
#=======================#
#  End TMBD By Gollum   #
#=======================#


Chercher / search

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


Ajouter après / Add after

#========================#
#  Start TMBD By Gollum  #
#========================#
echo "<tr><td class='table_col1' align='right' width='60'><b>".T_("TMDB_URL").": </b></td><td class='table_col2' ><input type=\"text\" name=\"tmdb\" value=\"".htmlspecialchars($row["tmdb"])."\" placeholder='FORMAT: Le nombre de URL, ex: 60735' size='30'/> <a href='https://www.themoviedb.org/' target='_blank'><img border='0' src='images/tmdb.png' width='82' height='33' title='Dirigez-vous sur TMDb' style='vertical-align: middle;'></a></td></tr>";
#=======================#
#  End TMBD By Gollum   #
#=======================#


torrent-detail.php

Chercher / search

torrents.freeleech,


Ajouter apres / Add after

torrents.tmdb,


Chercher / search

$shortname = CutName(htmlspecialchars($row["name"]), $char1);


Ajouter apres / Add after

#===============================================#
# Start TMBD cat_parent Films et Tv: By Gollum  #
#===============================================#
// MOVIES
if(!empty($row["cat_parent"] == $config['MOVIES']))  // Réglage dans config.php
$Film .= "Film";
if(!empty($row["cat_parent"] == $config['DOCUMENTARIES'])) // Réglage dans config.php
$Film .= "Film";
// TV
if(!empty($row["cat_parent"] == $config['TV'])) // Réglage dans config.php
$Serie .= "Serie";
if(!empty($row["cat_parent"] == $config['Pack_Series'])) // Réglage dans config.php
$Serie .= "Serie";
#===============================================#
#  End TMBD cat_parent Films et Tv: By Gollum   #
#===============================================#


Chercher / search

print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n");
print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");


Remplacer par / replace with

#========================#
#  Start TMBD By Gollum  #
#========================#

if(!empty($row["tmdb"]) && $Film){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total >0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_film.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_film.php");
die();
}

}elseif(!empty($row["tmdb"]) && $Serie){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total > 0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_serie.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_serie.php");
die();
}
}else{
print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n");
print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");
}
#=======================#
#  End TMBD By Gollum   #
#=======================#


Ajouter les dossier dans le root / Add folders to root

Normalement j'ai rien oublier
Desoler pour language mais je suis francais
--------------------------------------------------------------
Normally I forgot nothing
sorry for language but i am french





Prendre le dossier Zip tmbd ok   / Take Zip folder tmbd ok


TMBD MOD.zip
File missing
tmdb Ok.zip
File missing
Last edited by Gollum on 2022-05-19 12:46:52
2022-05-17 21:58:48
Wow, merci Gollum, je test tout çà dès j'ai plus de temps
=========================================
Wow, thanks Gollum, I'll test all that as soon as I have more time
2022-05-18 13:37:29
Thanks Gollum works great
----------------------------------------------
Merci Gollum marche très bien



2022-05-18 21:09:11
Does this get trailers also?
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)
2022-05-19 04:46:31
MicroMonkey:
Does this get trailers also?


Yes MM, get trailers also
2022-05-19 12:53:23
salut
Mise a jour du poste 19/05/2022
Ajout détection automatique du lien TMBD dans le NFO, il ajoute le code $tmbd
------------------------------------------------------------------------------------------
Hello
Post update 05/19/2022
Added automatic detection of the TMBD link in the NFO, it adds the code $tmbd

MicroMonkey
Quote:
Does this get trailers also?


oui il y a les bandes annonces sur les films
sur les séries tv je regard pourquoi il ne trouve pas les bandes annonces
-------------------------------------
yes there are movie trailers
on the tv series I look why he can't find the trailers
2022-05-23 13:30:33
Bonjour

#1 Merci beaucoup Gollum, fonctionne très bien.
#2  Avant installation faite vous un fichier teste avec phpinfo() et assurez-vous que vous que vous avez la fonction php-curl


Super mode, merci encore.

=============================================

Hello

#1 Thank you very much Gollum, works great.
#2 Before installation, make a test file with phpinfo() and make sure you have the php-curl function


Great fashion, thanks again.

2022-06-22 04:25:18
it is not taking the image , i use external link for poster not intenal image1 upload

Untitled.png
File missing
2022-06-23 19:23:33
Check for true or false,

 var_dump(extension_loaded('curl'));
2022-06-25 11:18:32
looks like it is enabled
Untitled.png
File missing
2022-06-26 20:23:25
What debugging have you done? You have posted a image showing a broken image link, have you not checked the field to see if there is something there? there are times using external images are bad as they can be blocked based on referrer / http authentication.
2022-06-27 09:48:16
it works now i just give permision to tmdb_posters and looks like it works now.
Thank you all for help
2022-07-08 22:36:50
english,..

Hello everyone I need your help because I made all the changes and the tmdb function does not appear in the detail of the torrent, I already had the allocine code and I replaced the allocine code with the tmdb code as below and the tmdb description does not appear?

I have already added the api key in the folder
tmdb/configuration/default.php

with this api key as example e7xf4c1ab4193677c562998s6863d88h





French,..

Bonjour tout le monde j'ai besoin de votre aide car j'ai fait toutes les modifications et la fonction tmdb n'apparaît pas dans le détail du torrent, j'avais déjà le code allocine et j'ai remplacé le code allocine par le code tmdb comme ci-dessous et la description tmdb n'apparaît pas ?

J'ai déjà ajouté la clé api dans le dossier
tmdb/configuration/default.php

avec cette clé api comme exemple e7xf4c1ab4193677c562998s6863d88h







I have replaced in torrents-details.php
j'ai remplacer dans torrents-details.php
///Allocine

if ( get_user_class() >= 0 )

if(!empty($row["allocine"])){
if ((($_data = $TTCache->Get("allocine/$id", 86400)) === false))
{
require_once("backend/api-allocine-helper.php");

preg_match('#https://www.allocine.fr/film/fichefilm_gen_cfilm=(.*?).html#is',$row["allocine"],$code);
$code = $code[1];

$film = new AlloHelper;
$profile = 'medium';

try
{
$allocine = $film->movie( $code, $profile );

$_data->titre = $allocine->title;
$_data->genre = $allocine->genre->implode();
if(array_key_exists('poster',$allocine->getArray()))
$_data->affiche = $allocine[poster][href];

$_data->titre_original = $allocine->originalTitle;
if(array_key_exists('productionYear',$allocine->getArray()))
$_data->annee_prod = $allocine->productionYear;
if(array_key_exists('nationality',$allocine->getArray()))
$_data->pays = $allocine->nationality->implode();
if(array_key_exists('release',$allocine->getArray()))
$_data->date_sortie = $allocine->release->releaseDate;
if(array_key_exists('synopsis',$allocine->getArray()))
$_data->synopsis = $allocine->synopsis;
if(array_key_exists('castingShort',$allocine->getArray()))
$_data->realisateur = $allocine->castingShort->directors;

$_data->acteurs = $allocine->castingShort->actors;
$_data->bande_annonce = $allocine->trailer->href;
}
catch( ErrorException $error )
{
echo "Erreur n°", $error->getCode(), ": ", $error->getMessage(), PHP_EOL;
}

$TTCache->Set("allocine/$id", $_data, 86400);
}
?>
<fieldset class="download">
<legend><b><img src="images/allocine-ico.png"><?php echo $_data->titre; ?></b>

</legend>


<center><table border='0' width='90%'>



<b>"SYNOPSIS"</b>

<tr>
<td width="230"><img src="<?php echo $_data->affiche; ?>" alt="<?php echo $_data->titre; ?>" title="<?php echo $_data->titre; ?>" height="317px" width="214px" /></td>
<td valign="top">
<b>...</b><br />


<a href="<?php echo $row['allocine']; ?>" target="_blank">

<img src="images/lien-allocine.png" alt="Allocine"/></a>


</a><br /><br />
<b>Titre original</b><br /> <?php echo $_data->titre_original ?><br /><br />
<b>Date de sortie</b><br /> <?php echo $_data->date_sortie; ?><br /><br />
<b><?php echo T_("ANNEE_PROD"); ?></b><br /> <?php echo $_data->annee_prod; ?><br /><br />
<b>Genre</b><br /> <?php echo $_data->genre; ?><br /><br />
<b>Origine</b><br /> <?php echo $_data->pays; ?><br /><br />
<b>Acteurs</b><br /> <?php echo $_data->acteurs; ?><br /><br />
<b>Synopsis</b><br /> <?php echo $_data->synopsis; ?><br /><br />

</td>
</tr>
</table>

</fieldset>

<center>

</center>


<?php }

// en Allocine







avec
with

#========================#
#  Start TMBD By Gollum  #
#========================#

if ( get_user_class() >= 1 )


if(!empty($row["tmdb"]) && $Film){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total >0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_film.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_film.php");
die();
}

}elseif(!empty($row["tmdb"]) && $Serie){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total > 0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_serie.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_serie.php");
die();
}
}else{
print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n");
print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");
}
#=======================#
#  End TMBD By Gollum   #
#=======================#


Last edited by niki on 2022-07-08 22:38:52
2022-07-09 03:23:55
you need this also in torrent-details.php

// MOVIES
if(!empty($row["cat_parent"] == $config['MOVIES']))
$Film .= "Film";
if(!empty($row["cat_parent"] == $config['DOCUMENTARIES']))
$Film .= "Film";
// TV
if(!empty($row["cat_parent"] == $config['TV']))
$Serie .= "Serie";
if(!empty($row["cat_parent"] == $config['Pack_Series']))
$Serie .= "Serie";



2022-07-09 07:00:49
Thanks for your help and I already put the code as below in the torrents-details.php file and there is just the original torrenttrader description that appears but the description with the TMBD image does not appear ??



Merci pour ton aide et j'ai déjà mis les code comme ci-dessous dans le fichier torrents-details.php et il y à juste la description de torrenttrader d'origine qui apparait mais la description avec l'image de TMBD n'apparait pas ??


#===============================================#
# Start TMBD cat_parent Films et Tv: By Gollum  #
#===============================================#
// MOVIES
if(!empty($row["cat_parent"] == $config['Films']))  // Réglage dans config.php
$Film .= "Film";
if(!empty($row["cat_parent"] == $config['Films'])) // Réglage dans config.php
$Film .= "Film";
// TV
if(!empty($row["cat_parent"] == $config['Serie'])) // Réglage dans config.php
$Serie .= "Serie";
if(!empty($row["cat_parent"] == $config['Serie'])) // Réglage dans config.php
$Serie .= "Serie";
#===============================================#
#  End TMBD cat_parent Films et Tv: By Gollum   #
#===============================================#









#========================#
#  Start TMBD By Gollum  #
#========================#

if(!empty($row["tmdb"]) && $Film){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total >0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_film.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_film.php");
die();
}

}elseif(!empty($row["tmdb"]) && $Serie){
$id_tmdb = $row["tmdb"];
$champ = "id_tmdb";
$total = get_row_count("tmdb"," WHERE id_torrent = $id AND id_tmdb = ".$id_tmdb."");

if($total > 0)
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/traitement_serie.php");
else{
print ("</table>");
require_once($_SERVER["DOCUMENT_ROOT"]."/tmdb/modules/creation_serie.php");
die();
}
}else{
print("<tr><td align='left'><b>".T_("NAME").":</b></td><td>" . $shortname . "</td></tr>\n");
print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");
}
#=======================#
#  End TMBD By Gollum   #
#=======================#








below is my code for the config.php file
c-dessous mon code du fichier config.php

#===============================================#
# Start List cat_parent Films et Tv: By Gollum  #
#===============================================#
$config['MOVIES'] = "Films"; // Mettre Votre nom cat parent.Films
$config['DOCUMENTARIES'] = "Films"; // Mettre Votre nom cat parent.Films
$config['TV'] = "Serie";  // Mettre Votre nom cat parent.TV
$config['Serie'] = "Serie";  // Mettre Votre nom cat parent.TV
#===============================================#
#  End List cat_parent Films et Tv: By Gollum   #
#===============================================#


Last edited by niki on 2022-07-09 07:04:32
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