Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   IMDB Mod (http://www.bvlist.com/showthread.php?t=139)

wMan 7th November 2012 01:40

1 Attachment(s)
@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>\n";
               $autodata .= "<i><font color=\"#999999\"> " . "".$movie->tagline ()."</font></i>\n";

               $autodata .= "\n<strong> Genres: </strong>";
               for ($i = 0; $i + 1 < count($gen); $i++) {
               $autodata .= "$gen[$i], ";
  }
               $autodata .= "$gen[$i]";

               $autodata .= "\n<strong> Rating: </strong>" . "".$movie->rating ()." <font size=\"1\"><u> " . "(".$movie->votes ()." votes)</size></u></font>\n";
               $autodata .= "<strong> Language: </strong>" . "".$movie->language ()."\n";

               $autodata .= "\n<strong> Runtime: </strong>" . "".$movie->runtime ()."" . " mins</strong>\n";

if (!empty($plot)) {

$autodata .= "<strong> Plot Outline: </strong>\n";

              for ($i = 0; $i < count ($plot); $i++) {
              $autodata .= "\n<font color=\"red\">[x] </font>";
              $autodata .= "$plot[$i]";
             $autodata .= "</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>\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 .= "\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 
.= "<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><div style=\"display:none\" id=\"imdb_area\"><strong> Cast: </strong></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 .= "\n<strong>Produced By: </strong></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> ";
    }
}


if (!empty(
$plot)) {
$autodata .= "<strong> Plot: </strong>\n";

              for (
$i 0$i count ($plot); $i++) {
              
$autodata .= "\n<font color=\"red\">[x] </font>";
              
$autodata .= "$plot[$i]";
             
$autodata .= "</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"]."'>(<b>Direct link</b> from <b>iMDB.</b> Please use only for <b>Movies</b> and <b>Episodes</b>)\n"); 


@takeupload.php Add

PHP Code:

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




Add the the big query

PHP Code:

url

And

PHP Code:

$url

@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); 


Kristoffer 8th November 2012 01:59

Quote:

Originally Posted by bill123 (Post 37255)
Auto iMDB mod

How is it possible to use this in TBDEV? added all these but in upload it's just a blank page.

wMan 8th November 2012 03:50

PHP Code:

tr("iMDB Link""<input type=text name=url size=85 value='".$row["url"]."'>(<b>Direct link</b> from <b>iMDB.</b> Please use only for <b>Movies</b> and <b>Episodes</b>)\n"); 

PHP Code:

tr("iMDB Link""<input type=text name=url size=85 value='".$row["url"]."'>(<b>Direct link</b> from <b>iMDB.</b> Please use only for <b>Movies</b> and <b>Episodes</b>)\n"); 


tinydownload 6th April 2013 06:16

dose any one know how to pull the images from the new imdb layout?

i managed to get votes working

Code:

      /** Setup votes
      * @method private rate_vote
      */
      private function rate_vote() {
        if ($this->page["Title"] == "") $this->openpage ("Title");
        if (preg_match('!(\d{1,2}\.\d)!i',$this->page["Title"],$match)){
          $this->main_rating = $match[1];   
        } else {
          $this->main_rating = 0;
        }
        if (preg_match('#itemprop="ratingCount"[^>]*>(.*)
#U',$this->page["Title"],$match)){
            $this->main_votes = $match[1];
        }else{
            $this->main_votes = 0;
        }                                                   
      }


tihozh 12th December 2013 20:16

Hi there

maybe i'm totally Blind at the end of my days, but i did'nt find the following in my details.php. Can someone please help me out how i can use the IMDB Mod :)



Open details.php and after:
PHP Code:

if (!empty($row["poster"]))
               
tr("Poster""<img src='".$row["poster"]."'>"1); 

Add this:


i am using the latest stable Version.
Cheers

fodbrothers 10th January 2014 10:36

imdb help
 
Ok so I have everything working but need 2 little thing when I upload n add the imdb link and it goes to the upload sucessfully 1 there is no picture and 2 all the info in the imdb box works perfect but there is more info in the description box but it is not coded is thete anyway of not having the code added to that box or get the code working. Many thanks in advance

DND 10th January 2014 11:44

it's not that hard to use the latest imdb script files, right?
google it, use it, be happy :)

firefly007 10th January 2014 15:10

There is a much better Imdb script lib on Github so I wouldnt worry about using this as I suspect its old...

Also what Ive done is to rather create a few more fields in the torrent table and when the person or person uploads the info Eg. vote, cast, poster, trailer and so on will get recorded only once instead of constantly when you or the user views the torrent details.

fodbrothers 10th January 2014 19:24

what does it mean by

Add the the big query

PHP Code:
url,
And

PHP Code:
$url,

i think this maybe the issue
where and which file do i add this and lastly please can someone help me from imdb grabber sending info into the description this would help me load before fixing the image problem

DND 10th January 2014 20:14

why do u want this mod ? what do u have in the 1st place a torrentsite if you don't know what are u doing ?:wallbash:


All times are GMT +2. The time now is 12:51.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.