Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=87)
-   -   IMDB on TorrenTrader v2.7 (http://www.bvlist.com/showthread.php?t=8990)

");
add below
Code:

print ("
");
torrents-edit.php

find

Code:

echo "
";
add above
Code:

echo "
";
find
Code:

        $updateset[] = "name = " . sqlesc($_POST["name"]);
add below
Code:

        # Resync IMDB Data...
        if ($_POST['imdb'] != $row['imdb'])
        {
                $TTCache->Delete("imdb/$row[id]");
                $updateset[] = 'imdb = ' . sqlesc($_POST['imdb']);
               
                require_once('backend/IMDB.class.php');

                $IMDB = new IMDB;
               
                if (($data = $IMDB->get($_POST['imdb'])) && ($image = $IMDB->getImage($data->Poster, $site_config["torrent_dir"] . "/images/", $id)))
                {
                        $updateset[] = "image1 = " . sqlesc($image);
                }
        }

torrent-details.php

find
Code:

torrents.anon,
make look like

Code:

torrents.imdb, torrents.anon,
same line

find
Code:

torrents.name,
make look like
Code:

torrents.imdb, torrents.name,
where want to show
Code:

/////////////////////////////////////////////////////////
require_once('backend/IMDB.class.php');


$IMDB = new IMDB;

  $data = null;
  if ((($data = $TTCache->get("imdb/$id", 86400)) === false) && ($data = $IMDB->get($row['imdb'])))
  {
                $TTCache->Set("imdb/$id", $data, 86400);
  }
 
  if (($data != null) && (is_object($data))):
  ?>
daffy 15th March 2013 14:52

IMDB on TorrenTrader v2.7
 
4 Attachment(s)
add sql

Code:

ALTER TABLE torrents ADD imdb varchar(125) NOT NULL DEFAULT;
torrents-upload.php

find

Code:

$ret = SQL_Query_exec("INSERT INTO torrents
look for

Code:

last_action
add

Code:

, imdb
same line find

Code:

'".get_date_time()."'
add

Code:

, ".sqlesc($imdb).")"
also add above that query

Code:

$imdb = $_POST['imdb'];
find

Code:

        show_error_msg(T_("UPLOAD_FAILED"), T_("UPLOAD_ALREADY_UPLOADED"), 1);
add below

Code:

        require_once('backend/IMDB.class.php');

        $IMDB = new IMDB;
       
        if (($data = $IMDB->get($_POST['imdb'])) && ($image =  $IMDB->getImage($data->Poster, $site_config["torrent_dir"] .  "/images/", $id)))
        {
                SQL_Query_exec("UPDATE `torrents` SET `image1` = '$image' WHERE `id` = '$id'");
        }

find

Code:

print ("
" . T_("TORRENT_NAME") . ": ".T_("THIS_WILL_BE_TAKEN_TORRENT")." \n
".T_("IMDB")."".T_("IMDB_INFO")."
".T_("CATEGORIES").": ".$catdropdown."
".T_("IMDB")."".T_("IMDB_INFO")."


 

     

 

 
if ($row["image1"] != "" OR $row["image2"] != "") {
  if ($row["image1"] != "")
    $img1 = "
";
  print("". $img1 . "");
}
?>
 
            $image = null;
  if ( is_numeric($data->Rating) )
  {
                                $rating = $data->Rating * 10;
                                $rating = round($rating / 5) * 5;
                         
                                $image = '' . $data->Rating. '';
  }
?>
                 

                 

                 
 
 
 

                 

                 
 
 

 

                 

                 
 
 

 

                 

                 

 
 
 

                 

                 

 

 

                 

                 

 

 

                 

                 
   
 

   

                 

                 

 
 
   

                 

                 

 
   

Title; ?>

   
   

                 
Rating; ?>

                 
Rating; ?>

                 
Votes; ?> people voted.

                 
Released; ?>
Genre; ?>
Actors; ?>
Director; ?>
Writer; ?>
Runtime; ?>
Plot; ?>
>

 
    endif;

this is mine written/stolen from ipts imdb design. all credit goes to TorrentTrader.

add IMDB.class.php too backend/
add imdb/ to images
add rating.png to theme/theme_name/images
Extremlym 15th March 2013 15:50

THX
 
Thx aloth

Crazzy 16th March 2013 00:13

try this sql
PHP Code:

ALTER TABLE torrents ADD `imdbvarchar(125NOT NULL


Extremlym 16th March 2013 00:53

one problem
 
1 Attachment(s)
Upload Failed
No ID. Server error, please report.


Bump:
Quote:

Originally Posted by Crazzy (Post 39978)
try this sql
PHP Code:

ALTER TABLE torrents ADD `imdbvarchar(125NOT NULL


Thx crazzy that works. but i don;t know what is the problem with the torrents-upload... ...

daffy 16th March 2013 01:30

1 Attachment(s)
attachment edited with below. everything else is fine in that file.

ps. this was taken from my late modded 2.8 (1) year ago.

Code:

$imdb = $_POST['imdb'];
had to be above the query not below as i mentied.

Extremlym 16th March 2013 13:45

Quote:

Originally Posted by daffy (Post 39980)
attachment edited with below. everything else is fine in that file.

ps. this was taken from my late modded 2.8 (1) year ago.

Code:

$imdb = $_POST['imdb'];
had to be above the query not below as i mentied.


the same..

Upload Failed

No ID. Server error, please report.

:wallbash:


Bump: i try to modify it but the same error in torrent-upload
Upload Failed
No ID. Server error, please report
any advice?:coffee:

hack346 10th April 2013 22:55

Just for my curiosity, use the source hosted on Windows or free hosting?
one from both, must be 100% ;)

rus16 7th May 2013 20:06

problem
 
what is this problem guys ?

http://fotomax.torrentmax.net/images/111.jpg

And rating not working

sorry for my bad english.

Thx.

Krypto 7th May 2013 21:38

Maybe if you followed our Rules and made an Introduction in the appropriate forum you'll get an answer even though it's self explanatory as to what the problem is!!

grenouille 22nd November 2013 05:04

Add mods IMDB
 
Hi. I want to install the IMDB but is not full fonctionnal

The mods is here
http://www.bvlist.com/torrent-trader...er-v2-7-a.html

i want to insert this code but i dont no where



PHP Code:

/////////////////////////////////////////////////////////
require_once('backend/IMDB.class.php');


$IMDB = new IMDB;

   $data = null;
   if ((($data = $TTCache->get("imdb/$id", 86400)) === false) && ($data = $IMDB->get($row['imdb'])))
   {
                $TTCache->Set("imdb/$id", $data, 86400);
   }
  
   if (($data != null) && (is_object($data))):
   ?>
<table class="imdb-table">
<tbody>
   <tr>
       <th class="imdb-th" align="center" colspan="3"><?php echo $data->Title?></th>
   </tr>
   
<?
if ($row["image1"] != "" OR $row["image2"] != "") {
  if (
$row["image1"] != "")
    
$img1 "<tr class='imdb-name'><td class='imdb-photo' rowspan='10'>
    <a href='"
.$site_config["SITEURL"]."/uploads/images/$row[image1]' class='highslide' onclick='return hs.expand(this)'><img src='".$site_config["SITEURL"]."/uploads/images/$row[image1]' border='0'  title='Click to enlarge' style='max-width: 160px;' class='image-resize' /></a>
    </td>"
;
  print(
""$img1 "");
}
?>
   
   <?
          $image 
null;
   if ( 
is_numeric($data->Rating) )
   {
                                
$rating $data->Rating 10;
                                
$rating round($rating 5) * 5;
                          
                                
$image '<img src="http://www.bvlist.com/images/imdb/' $rating '.gif" alt="' $data->Rating'" title="' $data->Rating '" />';
   }
?>
                   <td class="imdb-name first-row"><?php echo T_("IMDB_RATING"); ?></td>
                   <td class="imdb-value first-row">
                   <div class="imdb-score"><?php echo $data->Rating?></div>
                   <div class="imdb-rating"><?php echo $image != null $image $data->Rating?></div>
                   <div class="imdb-voters"><?php echo $data->Votes?> people voted.</div>
                   </td>
                   
   </tr>   
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_RELEASED"); ?></td>
                   <td class="imdb-value"><?php echo $data->Released?></td>   
   </tr>
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_GENRE"); ?></td>
                   <td class="imdb-value"><?php echo $data->Genre?></td>  
   </tr>
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_ACTORS"); ?></td>
                   <td class="imdb-value"><?php echo $data->Actors?></td>
   </tr>   
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_DIRECTOR"); ?></td>
                   <td class="imdb-value"><?php echo $data->Director?></td>
   </tr>
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_WRITER"); ?></td>
                   <td class="imdb-value"><?php echo $data->Writer?></td>
   </tr>
   <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_RUNTIME"); ?></td>
                   <td class="imdb-value"><?php echo $data->Runtime?></td>    
   </tr>
    <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_PLOT"); ?></td>
                   <td class="imdb-value"><?php echo $data->Plot?></td>
   </tr>  
    <tr class="imdb-name">
                   <td class="imdb-name"><?php echo T_("IMDB_LINK"); ?></td>
                   <td class="imdb-value"><a class="imdb-link" target="_blank" style="color: blue;" href=<?php echo "".$row['imdb']."";?>><?php echo "".$row['imdb']."";?></a></td>
   </tr>    
</tbody>
</table>
   
   <?php
   
endif;

thanks a lot for your help

KrackerMan 22nd November 2013 05:43

It says paste that where ever you want it to show on your page. So look at your php file and add that mod where you want it to show on your page.

grenouille 22nd November 2013 07:22

In the torrent-details.php or the other?

KrackerMan 22nd November 2013 08:37

Quote:

Originally Posted by grenouille (Post 43361)
In the torrent-details.php or the other?

Yes in torrent-details.php

But make sure you add the rest of that mod as well you can't add just the torrent-details.php code need it all

grenouille 22nd November 2013 21:19

Ok. Now, i have receive a message after click upload, No ID, server error and no display appears

i dont understand why

i'm verify in torrents table and imdb is there

where is possibly my error?

in the property panel chrome, I read this error: Uncaught ReferenceError: jQuery is not defined

thanks for your help

Bump: no one to help me? Pleaseeeeeeee

:sad:

Bump: need your help please

Uncod3d 13th February 2014 16:16

Warning: fopen(/home/piratemk/public_html/cache/imdb/3.cache) [function.fopen]: failed to open stream: No such file or directory in /home/piratemk/public_html/backend/cache.php on line 49

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/piratemk/public_html/backend/cache.php on line 50

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/piratemk/public_html/backend/cache.php on line


Im Getting this problem any solution ?

BitFarmer 13th February 2014 17:47

check if you have installed mod right and chmod cache/imdb

daffy 23rd April 2014 22:23

old thread and last post was 2 months ago i know, but if anyone havin probs with this still, msg me and il go over your code with this.

should work ok, maybe small minor adjustment.

:pot:

WhyMe 29th April 2014 16:39

IMDB
 
You need to Remake this as the below will not work


Code:

  $image = '' . $data->Rating. '';

Demon-Cod3rs 18th April 2015 12:22

this mod not work as it as the below in there and test done sorry to say ths mod no good


PHP Code:

  $image '<img src="http://www.bvlist.com/images/imdb/' $rating '.gif" alt="' $data->Rating'" title="' $data->Rating '" />'


daffy 18th April 2015 21:35

well pull your finger out and make it work!!!!

personally i could not care less, it is over 2 years feckin old and your moaning about it 2 years later. not much to make it work bud. :clown:

Demon-Cod3rs 18th April 2015 21:50

true:muscle:

nexthd 20th October 2015 17:55

Hello!

I have added this mod but it gave me this error:

Warning: file_get_contents(http://www.omdbapi.com/?i=tt2980516&...tomatoes=false) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /membri/*****/backend/IMDB.class.php on line 53

how can I fix it? the url is correct.

this is the line in IMDB.class
Code:

        private function _request($id)
          {                                     
                  $_data = file_get_contents( $this->_getLocation($id) );                               
                  return $this->_parse($_data);
          }

thanks in advance.

ooVoo 20th October 2015 18:09

http://www.torrenttrader.org/viewtopic.php?f=14&t=122

Napon 30th October 2017 22:31

Any chance of the css please ive remoder this need csd

DND 31st October 2017 00:06

not hard at all to do imdb on any code
https://i.imgur.com/ZmsHeba.png

Napon 31st October 2017 17:52

That is not the mod from first thread page1 that is not the css for the mod on page1 copy post someones imdb not good anuff im asking for daff css if anyone as this i know how to set the head lineing css i want the rest of the css from first page1 if anyone as this or daff post it up

daffy 14th November 2017 20:53

Quote:

Originally Posted by Napon (Post 50801)
That is not the mod from first thread page1 that is not the css for the mod on page1 copy post someones imdb not good anuff im asking for daff css if anyone as this i know how to set the head lineing css i want the rest of the css from first page1 if anyone as this or daff post it up

it is almost 5 years old, very little chance i still have this but i bet i could install the old source and make this mod work again lol

:lol:

Napon 14th November 2017 22:39

Daffy i recoder it up its ok mate done

http://www.bvlist.com/showthread.php?t=11267

LeeHowarth 18th November 2017 01:08

Quote:

Originally Posted by nexthd (Post 47728)
Hello!

I have added this mod but it gave me this error:

Warning: file_get_contents(http://www.omdbapi.com/?i=tt2980516&...tomatoes=false) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /membri/*****/backend/IMDB.class.php on line 53

how can I fix it? the url is correct.

this is the line in IMDB.class
Code:

        private function _request($id)
          {                                     
                  $_data = file_get_contents( $this->_getLocation($id) );                               
                  return $this->_parse($_data);
          }

thanks in advance.


The issue is you now need an api key, this can only be obtained by donating to them, go read their site...

Napon 18th November 2017 16:42

Mostvotedplayer

I do like your api imdb

Only fault with it when delate torrant on imdb it will not delate the image from function

Ive checked it out all is there cmd777 too but still not working at all not even in edit torrant so there is a fault in there some where with your api imdb mate i can not put my finder on it

I coder alot of sites and its the same on all even with a fresh upload

LeeHowarth 19th November 2017 19:10

This mod has to be almost around ~7 years old now so i am unsure if i had originally wrote the code to delete the image, a good alternative would be to simply store the image as a data uri so it can be stored in the database then you wouldn't need to worry about the actual image anymore...

http://www.omdbapi.com/

This is the url for the actual site, i can see some new options have been implemented such as the search feature so it really could be extended in such a way for you to have a drop down selector on the upload page to allow the user to pick the right IMDb info.

A quick search on github gives some nice results for SDK's written by other people: https://github.com/search?l=PHP&q=om...utf8=%E2%9C%93

So it may be best to just write a new module using one of those sdk's

Botanicar 15th May 2018 09:27

iMDB for 2.08
 
Someone who has this to TTCE 2.0.8, please

I try everyone on this board, but without success

Regards


All times are GMT +2. The time now is 23:26.

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