Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader > Mods & Themes
Reply
  #1  
Old 15th March 2013, 14:52
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Smile IMDB on TorrenTrader v2.7
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 ("<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 below
Code:
print ("<tr><td align='right'>".T_("IMDB")."</td><td align='left'><input type='text' name='imdb' size='60' value='" . $_POST['imdb'] . "' /><br /><i>".T_("IMDB_INFO")."</i></td></tr>");
torrents-edit.php

find

Code:
echo "<tr><td align='right'><b>".T_("CATEGORIES").": </b></td><td>".$catdropdown."</td></tr>";
add above
Code:
echo "<tr><td align='right'><b>".T_("IMDB")."</b></td><td><input type='text' name='imdb' size='60' value='".$row['imdb']."' /><br /><i>".T_("IMDB_INFO")."</i></td></tr>";
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))):
   ?>
<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>
   <br /><br />
   <?php
   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
Attached Thumbnails
Image.png  
Attached Images
 
Attached Files
File Type: php IMDB.class.php (1.8 KB, 317 views)
File Type: rar imdb.rar (29.1 KB, 236 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #2  
Old 15th March 2013, 15:50
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Post THX
Thx aloth
Reply With Quote
  #3  
Old 16th March 2013, 00:13
Crazzy Crazzy is offline
Member
 
Join Date: May 2009
P2P
Posts: 14
Default
try this sql
PHP Code:
ALTER TABLE torrents ADD `imdbvarchar(125NOT NULL
Reply With Quote
  #4  
Old 16th March 2013, 00:53
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Smile one problem
Upload Failed
No ID. Server error, please report.


Bump:
Quote:
Originally Posted by Crazzy View Post
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... ...
Attached Files
File Type: php torrents-upload.php (12.3 KB, 38 views)
Reply With Quote
  #5  
Old 16th March 2013, 01:30
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
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.
Attached Files
File Type: php torrents-upload.php (12.3 KB, 55 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #6  
Old 16th March 2013, 13:45
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default
Quote:
Originally Posted by daffy View Post
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.




Bump: i try to modify it but the same error in torrent-upload
Upload Failed
No ID. Server error, please report
any advice?
Reply With Quote
  #7  
Old 10th April 2013, 22:55
hack346 hack346 is offline
Banned
 
Join Date: Mar 2008
Turkey
Posts: 80
Default
Just for my curiosity, use the source hosted on Windows or free hosting?
one from both, must be 100% ;)
Reply With Quote
  #8  
Old 7th May 2013, 20:06
rus16 rus16 is offline
Member
 
Join Date: Feb 2012
P2P
Posts: 2
Default problem
what is this problem guys ?

Click the image to open in full size.

And rating not working

sorry for my bad english.

Thx.
Reply With Quote
  #9  
Old 7th May 2013, 21:38
Krypto Krypto is offline
Retired from BVList
 
Join Date: Jan 2008
P2P
Posts: 510
Default
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!!
Reply With Quote
The Following User Says Thank You to Krypto For This Useful Post:
daffy (8th May 2013)
  #10  
Old 22nd November 2013, 05:04
grenouille grenouille is offline
Member
 
Join Date: Nov 2013
Canada
Posts: 3
Question 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>
   <br /><br />
   <?php
   
endif;
thanks a lot for your help

Last edited by joeroberts; 22nd November 2013 at 05:15.
Reply With Quote
Reply

Tags
add , imdb , mods , torrentrader , tt , v27

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 23:57. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.