@details.php ADD ABOVE
PHP Code:
if (!empty($row["descr"]))
PHP Code:
//----------------------------------------------------------------Auto iMDB mod by Axxel------------------------------------------------------------------
if (($row["url"] != "")AND(strpos($row["url"], imdb))AND(strpos($row["url"], title)))
{
$thenumbers = ltrim(strrchr($row["url"],'tt'),'tt');
$thenumbers = ereg_replace("[^A-Za-z0-9]", "", $thenumbers);
$movie = new imdb ($thenumbers);
$movieid = $thenumbers;
$movie->setid ($movieid);
$plot = $movie->plot();
$plotoutline = $movie->plotoutline();
$gen = $movie->genres();
$cast = $movie->cast();
$director = $movie->director();
$write = $movie->writing();
$produce = $movie->producer();
$compose = $movie->composer();
if (($photo_url = $movie->photo_localurl() ) != FALSE) {
$autodata = '<img class=glossy src="'.$photo_url.'" style="float:left; margin-right:5px;">';
} else {
$autodata = '<img img src="/imdb/images/default.png" style="float:left; margin-right:5px;">';
}
$autodata .= "<strong><a href=\"http://www.imdb.com/title/tt$movieid\"><font size=\"3\" style=\"border-bottom: 1px dotted; text-decoration: none;\">" . "".$movie->title ()."</a></font> <font size=\"3\"><b> " . "(".$movie->year ().")</b></strong></size></font><br />\n";
$autodata .= "<i><font color=\"#999999\"> " . "".$movie->tagline ()."</font></i><br />\n";
$autodata .= "<br />\n<strong> Genres: </strong>";
for ($i = 0; $i + 1 < count($gen); $i++) {
$autodata .= "$gen[$i], ";
}
$autodata .= "$gen[$i]";
$autodata .= "<br /><br />\n<strong> Rating: </strong>" . "".$movie->rating ()." <font size=\"1\"><u> " . "(".$movie->votes ()." votes)</size></u></font><br /><br />\n";
$autodata .= "<strong> Language: </strong>" . "".$movie->language ()."<br />\n";
$autodata .= "<br />\n<strong> Runtime: </strong>" . "".$movie->runtime ()."" . " mins<br /><br /></strong>\n";
if (!empty($plot)) {
$autodata .= "<strong> Plot Outline: </strong><br />\n";
for ($i = 0; $i < count ($plot); $i++) {
$autodata .= "<br />\n<font color=\"red\">[x] </font>";
$autodata .= "$plot[$i]";
$autodata .= "<br></br>\n";
break;
}
}
if (!empty($director)) {
$autodata .= "<strong><font color=\"blue\"> Director: </font></strong>";
for ($i = 0; $i < count ($director); $i++) {
$autodata .= "<a target=\"_blank\" href=\"http://www.imdb.com/name/nm" . "".$director[$i]["imdb"]."" ."\">" . "".$director[$i]["name"]."" . "</a><br />\n";
}
}
if (!empty($write)) {
$autodata .= "<strong><font color=\"blue\"> Writing By: </font></strong>";
for ($i = 0; $i < count ($write); $i++) {
$autodata .= "<a target=\"_blank\" href=\"http://www.imdb.com/name/nm" . "".$write[$i]["imdb"]."" ."\">" . "".$write[$i]["name"]."" . "</a> ";
}
}
if (!empty($compose)) {
$autodata .= "<br />\n<strong><font color=\"blue\"> Music: </font></strong>";
for ($i = 0; $i < count($compose); $i++) {
$autodata .= "<a target=\"_blank\" href=\"http://www.imdb.com/name/nm" . "".$compose[$i]["imdb"]."" ." \">" . "".$compose[$i]["name"]."" . "</a> ";
}
}
?>
<script type="text/javascript">
function imdb_more(imdb_area, imdb_link) {
var imdb_area = get_item(imdb_area);
var imdb_link = get_item(imdb_link);
if (imdb_area.style.display == "") {
imdb_area.style.display = "none";
imdb_link.innerHTML = "More";
eraseCookie("IMDbXz");
} else {
imdb_area.style.display = "";
imdb_link.innerHTML = "Less";
createCookie("IMDbXz", "1", "100");
}
}
function get_item(id){
itm = null;
if (document.getElementById){
itm = document.getElementById(id);
} else if (document.all){
itm = document.all[id];
} else if (document.layers) {
itm = document.layers[id];
}
return itm;
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(365*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
</script>
<?
$smallth .= "<br /><i><a href=\"javascript:imdb_more('imdb_area', 'imdb_link');\"><font style=\"border-bottom: 1px dotted; text-decoration: none; font-size: 7pt; color: grey;\" id=\"imdb_link\">More</font></a></i>\n";
$autodata .= "<br /><br></br><br><div style=\"display:none\" id=\"imdb_area\"><strong> Cast: </strong><br></br>\n";
for ($i = 0; $i < count ($cast); $i++) {
if ($i > 9) {
break;
}
$autodata .= "<font color=\"blue\"></font> " . "<a target=\"_blank\" href=\"http://www.imdb.com/name/nm" . "".$cast[$i]["imdb"]."" ."\">" . "".$cast[$i]["name"]."" . "</a> " . " as <strong><font color=\"orange\">" . "".$cast[$i]["role"]."" . " </font></strong></br>\n";
}
if (!empty($produce)) {
$autodata .= "<br />\n<strong>Produced By: </strong><br></br>";
for ($i = 0; $i < count ($produce); $i++) {
$autodata .= "<a target=\"_blank\" href=\"http://www.imdb.com/name/nm" . "".$produce[$i]["imdb"]."" ." \"><font color=green>" . "".$produce[$i]["name"]."" . "</font></a><br /> ";
}
}
if (!empty($plot)) {
$autodata .= "<br /><strong> Plot: </strong><br />\n";
for ($i = 0; $i < count ($plot); $i++) {
$autodata .= "<br />\n<font color=\"red\">[x] </font>";
$autodata .= "$plot[$i]";
$autodata .= "<br></br>\n";
}
}
tr("IMDb $smallth",$autodata,1);
}
//--------------------------------------------------------------------Auto iMDB mod end----------------------------------------------------------------------
@details.php
PHP Code:
require ("imdb/imdb.class.php");
0777 - imdb
0777 - imdb/images
0777 - imdb/imgs
0777 - imdb/imgs/showtimes
0777 - imdb/cache
0777 - imdb/cache.file
0777 - imdb/imdb.class.file
0777 - imdb/imdbXML.file
I UPDATED IT A FEW MONTHS AGO
@upload.php Add
PHP Code:
tr("iMDB Link", "<input type=text name=url size=85 value='".$row["url"]."'><br />(<b>Direct link</b> from <b>iMDB.</b> Please use only for <b>Movies</b> and <b>Episodes</b>)\n", 1 );
@takeupload.php Add
PHP Code:
if (!empty($_POST['url']))
$url = unesc($_POST['url']);
Add the the big query
And
@edit.php Add
PHP Code:
tr("iMDB Link", "<input type=text name=url size=80 value='".$row["url"]."'>", 1);
@takeedit.php Add
PHP Code:
if (!empty($_POST['url']))
$url = $_POST['url'];
And
PHP Code:
$updateset[] = "url = " . sqlesc($url);