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


All times are GMT +2. The time now is 11:06.

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