If you post torrents on your index page like this, a fun and enjoyable thing to do is to make your trailers and NFO appear in a lightbox rather than open a new page or tab when you click the NFO link on the index

I'll post the code to make the NFO appear, it's really simple. The same thing works with videos, like YouTube. I will briefly review the video below because my site is heavily modified, but first the NFO.....

In each theme header. php, put jquery (if you already have jquery, skip this step). Also download jquery to the JS folder. I have included jquery at the bottom of this post.

<script src="/js/jquery-2.2.3.min.js"></script>


At the bottom of each header. PHP theme, add:

<link rel="stylesheet" href="/js/prettyphoto/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
<script src="/js/prettyphoto/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
 $(document).ready(function(){
   $("a[rel^='prettyPhoto']").prettyPhoto({
       animation_speed: 'normal', /* fast/slow/normal */
       theme: 'facebook', /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
       autoplay: true, /* Automatically start videos: True/False */
       default_width: 854,
       default_height: 480,
       deeplinking: false,
       });
 });
</script>


In functions. PHP, Search:

case 'nfo':
               if ($row["nfo"] == "yes")
                   print("<td class='ttable_col$x' align='center'><a href='nfo-view.php?id=$row[id]'><img src='" . $site_config['SITEURL'] . "/images/icon_nfo.gif' border='0' alt='View NFO' /></a></td>");


Replace with:

            case 'nfo':
               if ($row["nfo"] == "yes")
                   print("<td class='ttable_col$x' align='center'><a href='nfo-view.php?id=$row[id]'rel=\"prettyPhoto\"><img src='" . $site_config['SITEURL'] . "/images/icon_nfo.gif' border='0' alt='View NFO' /></a></td>");


Then when you click on the NFO on the index, it will appear in a Lightbox!
Same thing for trailers or videos on your index page, in this case it's a YouTube trailer
In functions. PHP (If you have the YouTube mod..

Search:

      if ($row["tube"])  
           print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\"  href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png'  border='0' width='50' height='50' title='Click to watch the YouTube Trailer' /></a></td>");


Replace with:

            case 'tube':
               if ($row["tube"])  
               print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\" href=".$row['tube']."><".htmlspecialchars($row['tube'])."><img src='".$site_config['SITEURL']."/images/youtube/youtube1.png' border='0' width='50' height='50' alt=\"Watch this Video!\" title=\"".T_("VIDEO_WATCH_THIS_VIDEO")."\" /></a></td>");
               else
               print("<td class='ttable_col$x' align='center'><img src='".$site_config['SITEURL']."/images/youtube1.png' border='0' width='50' height='50' alt=\"No Video to watch!\" title=\"".T_("VIDEO_NONE_VIDEO_TO_WATCH")."\" /></td>");  
           break;


For those who have installed the IMDB mod, here is the line with the Lightbox integrate:

            case 'imdb':
     if ($row["imdb"])  
           print("<td class='ttable_col$x' align='center'><a href=".$row['imdb']." target='_blank'><".htmlspecialchars($row['imdb'])."><img src='" . $site_config['SITEURL'] . "/images/imdb.png'  border='0' width='50' height='50' alt=\"\" /></a></td>");
        else
        print("<td class='ttable_colx' align='center'>-</td>");  
        break;


Set-up Information

~ Unpack and download Prettyphoto. rar to the JS folder

~ I also attached jquery-2.2.3. Min If you don't have it. You can use any version of jquery, so if you already have one, use it.

~ For those would like to have the auto Start menu of all the other videos that follow it that you put or use the arrows before or after the video

So you have to change PrettyPhoto to PrettyPhoto [Flash]

Sql:

ALTER TABLE `torrents` ADD `tube` varchar(100) DEFAULT NULL;


In search functions. php:

case 'uploader':
   echo "<th>".T_("UPLOADER")."</th>";
       break;


Add to the top:

case 'tube':
   echo "<th>".T_("YOUTUBE")."</th>";
       break;


Search:

case 'uploader':
   echo "<td class='ttable_col$x' align='center'>";


Add to the top:

case 'tube':
if ($row["tube"])  
   print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\" href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png'  border='0' width='50' height='50' alt=\"\" /></a></td>");  
else
   print("<td class='ttable_colx' align='center'>-</td>");  
       break;


In torrents-Details. PHP Search:

torrents.seeders,


Add after

torrents.tube,


Search:

print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");


Add after:

if (empty($row["tube"]))
print ("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ":</b></td><td>&nbsp; &nbsp;<embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"580\" height=\"340\"></embed></td></tr>");
else
print ("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ":</b></td><td><img border=\"0\" width=\"126\" height=\"86\" src=".$site_config["SITEURL"]."/images/novideo.jpg></td></tr>");
if (empty($row["lang_name"]))
$row["lang_name"] = "Aucune/N/D";


In torrents-Upload. PHP Search:

//anonymous upload
$anonyupload = $_POST["anonycheck"];
if ($anonyupload == "yes") {
$anon = "yes";
} else {
$anon = "no";
}


Add after:

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


Search:

category,


Add after:

tube,


Search:

'".$catid."',


Add:

".sqlesc($tube).",


Search:

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 after:

print ("<tr><td align='right'>" . T_("VIDEOTUBE") . ": </td><td align='left'><input type='text' name='tube' size='50' />&nbsp;<a href=\"http://www.youtube.com\" target='_blank'><img border='0' src='images/youtube.png' width='50' height='50' title='Click here to go to Youtube'></a><br/><i>".T_("FORMAT").": </i><span style='color:#FF0000'><b> http://www.youtube.com/watch?v=Jc9KR3tOP</b></span></td></tr>");



In search torrent-edit. PHP:

$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";


Add after:

if (!empty($_POST['tube']))
   $tube = unesc($_POST['tube']);
   $updateset[] = "tube = " . sqlesc($tube);


Search:

echo "<tr><td class='table_col1' align='right'><b>".T_("CATEGORIES").": </b></td><td class='table_col2'>".$catdropdown."</td></tr>";


Add to the top:

echo "<tr><td class='table_col1' align='right'><b>".T_("VIDEOTUBE").": <b></td><td class='table_col2' align='left'><input type='text' name='tube' value='" . htmlspecialchars($row["tube"]) . "' size='60' />&nbsp;<a href='http://www.youtube.com' target='_blank'><img border='0' src='images/youtube.png' width='50' height='50' title='Click here to go to Youtube'></a><br/><i>".T_("FORMAT").": </i><span style='color:#FF0000'><b>http://www.youtube.com/watch?v=Jc9KR3tOP</b></span></td></tr>";


In Search torrents. php:

torrents.category,


Langage:

// Youtube mod
$LANG["VIDEOTUBE"] = "YouTube Trailer/Video";
$LANG["NOVIDEOTUBE"] = "No YouTube video for this Torrent.";
$LANG["FORMAT"] = "Format Accepted";
$LANG["YOUTUBE"] = "Trailer";


Bonus in the theme. css


.youtube
iframe,
object,
embed{
  border:6px solid rgba(255,255,255,0);
  -webkit-border-radius: 20px !important;
  -ms-border-radius: 20px !important;
  -o-border-radius: 20px !important;
  border-radius: 20px !important;  
  border: 3px solid #4C4C4C;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  -moz-border-radius-topleft: 10px;
  -moz-border-radius-topright: 10px;
  -webkit-border-radius-topleft: 10px;
  -webkit-border-radius-topright: 10px;
  box-shadow : 1px 1px 10px 1px #777;  
}


Search:

print("<tr><td align='left' colspan='2'><b>" .T_("DESCRIPTION"). ":</b><br />" .  format_comment($row['descr']) . "</td></tr>\n");


Add after

if (empty($row["tube"]))
   print("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ":</b></td><td>&nbsp; &nbsp;<embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type='application/x-shockwave-flash' width='480' height='320'></embed></td></tr>");
else
   print("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ":</b></td><td><img border='0' width='126' height='86' src=".$site_config["SITEURL"]."/images/novideo.jpg></td></tr>");
if (empty($row["lang_name"]))
$row["lang_name"] = "Aucune/N/D";
post-14-0-84263500-1490704798.png
post-14-0-84263500-1490704798.png
jquery-2.2.3.min.rar
Download
prettyphoto.rar
Download