Run this sql against your database using whatever tools you use (phpmyadmin, etc)
Add to languages/english.php
Search : torrents-upload.php
Add After :
Search :
Add After :
Search :
Replace with:
torrents-details.php Search :
Add After :
Search :
Add After :
torrents-edit.php Search :
Add After :
Search :
Add After :
in backend/functions.php add anywhere
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)
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');