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
IMDb mod (using OMDb for data)
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2019-01-03 19:07:39
Run this sql against your database using whatever tools you use (phpmyadmin, etc)
ALTER TABLE `torrents` ADD `imdb` varchar(80) DEFAULT NULL;   


Add to languages/english.php
$LANG["_IMDB_"] = "DB";
$LANG["IMDB"] = "Internet Movie Database:";
$LANG["IMDB_LINK"] = "Link";
$LANG["IMDB_INFO"] = "If a valid imdb is given we can autofill the description.";
$LANG["IMDB_RELEASED"] = "Released";
$LANG["IMDB_RATED"] = "Rated";
$LANG["IMDB_ALIAS"] = "Also Known As";
$LANG["IMDB_GENRE"] = "Genre";
$LANG["IMDB_DIRECTOR"] = "Director";
$LANG["IMDB_YEAR"] = "Year";
$LANG["IMDB_WRITER"] = "Writer";
$LANG["IMDB_RUNTIME"] = "Runtime";
$LANG["IMDB_VOTES"] = "Votes";
$LANG["IMDB_ACTORS"] = "Actors";
$LANG["IMDB_PLOT"] = "Plot";
$LANG["IMDB_SHORT"] = "IMDB";
$LANG["IMDB_LASTUPDATED"] = "Last Updated";




Search : torrents-upload.php

$shortfname = $torrent = $matches[1];
     if (!empty($_POST["name"]))
          $name = $_POST["name"];


Add After :

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


Search :

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 After :

print ("<tr><td align='right'>" . T_("IMDB") . ": </td><td align='left'> <input type='text' name='imdb' size='60' value='" . $_POST['imdb'] . "' /><br />(Link from IMDB. <b>Only for movie.</b>)<br /><font color=red><b>You Must include a Imdb at all times on Upload</b></font>\n</td></tr>");


Search :

    $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()."')");


Replace with:

    $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, imdb) 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()."', '".$imdb."')"); 


torrents-details.php Search :
torrents.name,


Add After :

torrents.imdb,


Search :

//END DEFINE RATING VARIABLE
    echo "<br />";


Add After :

$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->Alias = 'N/A';
                $_data->imdbVideo = null;
                }
                $TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ): ?>
        <fieldset class="download">
        <legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
        <table border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
        <td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
        <td valign="top">
        <b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
        <b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
        <b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
        <b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
        <b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
        <b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
        <b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
        <b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
        <b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
        <b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
        <b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
        </td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null): ?>
        <td valign="top" align="center">
<?php echo $rating; ?><br /><br />
        <b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
    </td>
        <?php endif; ?>
    </tr>
     <tr>
        <td align="right" colspan="3">
        <b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
     </td>
     </tr>
     </table>
     </fieldset>
     <br />

<?php if ( strlen( $_data->imdbVideo ) > 3 ): ?>
        <center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
<?php endif;
endif;


torrents-edit.php Search :


     if (@is_uploaded_file($nfofilename) && @filesize($nfofilename) > 0){
           @move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
           $updateset[] = "nfo = 'yes'";
       }//success
   }


Add After :

if (!empty($_POST["name"]))
   $updateset[] = "name = " . sqlesc($_POST["name"]);
if ( $_POST['imdb'] != $row['imdb'] ){
    $updateset[] = "imdb = " . sqlesc($_POST["imdb"]);
    $TTCache->Delete("imdb/$id");
}


Search :

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


Add After :

echo "<tr><td class='table_col1' align='right'><b>".T_("IMDB")."</b></td><td class='table_col2'><input type=\"text\" name=\"imdb\" value=\"" . htmlspecialchars($row["imdb"]) . "\" size=\"60\" /></td></tr>"; 



in backend/functions.php add anywhere

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



Add the contents of the cache folder to cache imdb and chmod 0777
Add the imdb folder to root and chmod 0777
Add the uploads folder and chmod 0777 (it will add a new folder inside of uploads)
Add IMDB.php and TTIMDB.php to the backend folder

Go get your free api key to use the omdb database http://omdbapi.com/

Open backend/TTIMDB.php, add your key at the top as you see below (replace KEY_HERE with your key)
private $_nodes = array('https://omdbapi.com/?apikey=KEY_HERE&i=%s'); 
imdb.rar
Download
2019-03-25 02:04:45
updated and/or fixed the thread above. Post for issues. Also works on TT 3.0
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)
2019-03-25 10:06:04
[ATTACH type="full" alt="2599"]2599._xfImport[/ATTACH]

It works. i wish someone made a cool details page.
Screenshot_2.png
Screenshot_2.png
2019-03-27 00:30:20
If for any reason you would like to add the image and plot description to the DB. Usually only useful if you have other mods that display these things, like site catalogs, torrent details page, the balloon mod, etc. It does no harm in adding these edits either way other than adding more info to your DB, so if a few kb is a concern, well......... In torrents-details.php find

$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->Alias = 'N/A';
                $_data->imdbVideo = null;
                }

add below
/// add poster to image 1 in DB
         if (($imdb_image = $TTIMDB->getImage_1($_data->Poster, $site_config['torrent_dir'] . "/images/", $id))) {
         SQL_Query_exec("UPDATE `torrents` SET `image1` = '" . $imdb_image . "' WHERE `id` = $id");
         }
/// end add poster to image 1 in DB

/// add a description pulled from the IMDB plot and put it in mysql as the descr
if ($row['descr'] === DEFAULT_DESCRIPTION) {
 $stmt = $GLOBALS['DBconnector']->prepare('UPDATE `torrents` SET `descr` = ? WHERE `id` = ?');
 $stmt->bind_param('si', $_data->Plot, $id);
 $stmt->execute();
}
/// end add description

at the top of torrents-details find
require_once("backend/functions.php");

above put
const DEFAULT_DESCRIPTION = 'No description given.';

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 2023-02-06 03:57:37
2019-03-27 02:49:45
I think my old details page was pretty decent, maybe not the best, but not too bad. I can see about moving some of those edits into this copy. Would take me a bit of time to test it all, but I may be able to make it look a bit nicer, but I suck at anything graphics related, but maybe could do something with the layout. no promises. I know my limitations and they are plentiful lol. I remember wanting to shove the IMDB and details page together so they weren't so spread out on the page anyways. Maybe I will go back and revisit that idea. Since I dont run a site anymore, these ideas just kinda went away
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)
2019-05-13 22:03:41
"arne, post: 33577, member: 5":

[ATTACH type="full" alt="2599"]2599[/ATTACH]

It works. i wish someone made a cool details page.

[ATTACH type="full" alt="5048"]5048[/ATTACH]

Maybe like that, Arne?
1557784987406.png
1557784987406.png



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
2019-05-14 04:43:28
"Botanicar, post: 66580, member: 19833":

[ATTACH type="full" alt="5048"]5048[/ATTACH]

Maybe like that, Arne?

YAP
2019-06-16 17:08:47
mine looks like this, since we are sharing. This is from my old 2.08 micro edition. If you want to take it apart and play with any code, just go download it from https://sourceforge.net/projects/tt-2-08-micro-edition/
[ATTACH type="full"]5067[/ATTACH]
Capture.PNG
Capture.PNG

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)
Unknown User
2019-11-05 19:45:28
with what i can replace  endif; in ttv2.7 ? is not supported
2019-11-05 22:51:34
try this, in torrents-details.php
$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->Alias = 'N/A';
                $_data->imdbVideo = null;
                }
                $TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ) { ?>
        <fieldset class="download">
        <legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
        <table border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
        <td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
        <td valign="top">
        <b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
        <b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
        <b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
        <b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
        <b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
        <b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
        <b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
        <b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
        <b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
        <b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
        <b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
        </td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null){ ?>
        <td valign="top" align="center">
<?php echo $rating; ?><br /><br />
        <b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
    </td>
        <?php } ?>
    </tr>
     <tr>
        <td align="right" colspan="3">
        <b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
     </td>
     </tr>
     </table>
     </fieldset>
     <br />

<?php if ( strlen( $_data->imdbVideo ) > 3 ){ ?>
        <center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
<?php }
}

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)
Unknown User
2019-11-06 05:24:00
[USER=311]MicroMonkey[/USER]

Is breaking the code ! No error ...
2019-11-06 11:54:12
endif should work just fine. I just assumed you needed them changed to a brace, which is what I did. Perhaps you have too many endif; or the code is misplaced. try downloading the old version I converted in the post above and check out that code. It worked perfectly when I quit using 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)
Unknown User
2019-11-07 02:31:55
Don't know why people are using the omdb api when this mod was made with it's own api with a few regex changes it will work again if I get time I'll update it and post
Unknown User
2019-11-07 05:05:48
"serph, post: 67455, member: 1398":

Don't know why people are using the omdb api when this mod was made with it's own api with a few regex changes it will work again if I get time I'll update it and post

Thx
Unknown User
2019-11-21 15:42:30
Hi everyone,
I have small problem with link to IMDB page on torrent detail page. [ATTACH]5248[/ATTACH]  The full address of this link is https://mytracker.com/[url='https://www.imdb.com/title/tt0455275/']tt0455275[/url]  but it should actually be right https://www.imdb.com/title/tt0455275/

This is the code I'm using
// IMDB code start     
$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->Alias = 'N/A';
                $_data->imdbVideo = null;
                }
                $TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ): ?>
        <fieldset class="download">
        <legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
        <table border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
        <td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
        <td valign="top">
        <b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
        <b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
        <b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
        <b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
        <b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
        <b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
        <b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
        <b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
        <b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
        <b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
        <b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
        </td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null): ?>
        <td valign="top" align="center">
<?php echo $rating; ?><br /><br />
        <b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
    </td>
        <?php endif; ?>
    </tr>
     <tr>
        <td align="right" colspan="3">
        <b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
     </td>
     </tr>
     </table>
     </fieldset>
     <br />

<?php if ( strlen( $_data->imdbVideo ) > 3 ): ?>
        <center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
// IMDB code end    
IMDB-link-problem.png
IMDB-link-problem.png
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