copied from TT.org. This will work on TTv3 also
If you display torrents on your index page like this, a fun and neat thing to do is have your trailers and NFO pop up in a lightbox rather than opening a new page or tab when you click the nfo link on the index
[ATTACH]2478[/ATTACH]
I will post the code to make the NFO pop up, its really simple. The same thing works with videos, like youtube. I will briefly go over the video pop-up below, since 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 upload jquery to the js folder. I included jquery at the bottom of this post.
at the bottom of each theme header.php, put
in functions.php, find
replace with
unpack and upload prettyphoto.zip to js folder. https://www.mediafire.com/file/xld9135c065hzi6/prettyphoto.zip/file
I also attached jquery-2.2.3.min if you dont have it. You can use any version of jquery, so if you already have one, just use that
then when you click on the NFO on the index, it will pop up in a lightbox

same thing for trailers or videos on your index page, in this case, its a youtube trailer
in functions.php (if you have the youtube mod http://www.torrenttrader.org/viewtopic.php?f=14&t=712 )
looks like this

If you are trying to pop-up an IMDb trailer, the code in my backend/functions.php looks like this. You have to use IFRAME to pop the IMDB trailers. This line of code includes the code for the youtube videos. This code is part of the IMDB mod and IMDB trailers (http://www.torrenttrader.org/viewtopic.php?f=14&t=122). Im only posting it for you to use as a reference since My site is so modified It would be hard for me to explain it exactly


[ATTACH]2478[/ATTACH]
[ATTACH]2479[/ATTACH]
If you display torrents on your index page like this, a fun and neat thing to do is have your trailers and NFO pop up in a lightbox rather than opening a new page or tab when you click the nfo link on the index
[ATTACH]2478[/ATTACH]
I will post the code to make the NFO pop up, its really simple. The same thing works with videos, like youtube. I will briefly go over the video pop-up below, since 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 upload jquery to the js folder. I included jquery at the bottom of this post.
<script src="/js/jquery-2.2.3.min.js"></script>at the bottom of each theme header.php, put
<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, find
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>");unpack and upload prettyphoto.zip to js folder. https://www.mediafire.com/file/xld9135c065hzi6/prettyphoto.zip/file
I also attached jquery-2.2.3.min if you dont have it. You can use any version of jquery, so if you already have one, just use that
then when you click on the NFO on the index, it will pop up in a lightbox

same thing for trailers or videos on your index page, in this case, its a youtube trailer
in functions.php (if you have the youtube mod http://www.torrenttrader.org/viewtopic.php?f=14&t=712 )
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>");looks like this

If you are trying to pop-up an IMDb trailer, the code in my backend/functions.php looks like this. You have to use IFRAME to pop the IMDB trailers. This line of code includes the code for the youtube videos. This code is part of the IMDB mod and IMDB trailers (http://www.torrenttrader.org/viewtopic.php?f=14&t=122). Im only posting it for you to use as a reference since My site is so modified It would be hard for me to explain it exactly
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;
case 'tube':
$video=$row["trailers"];
$video=substr($video,44);
$video2=$video;
$video2=substr($video2, 0, -52);
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>");
elseif ($row["trailers"])
print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto[iframes]\" href=\"http://www.imdb.com/videoembed/". $video2."?ref_=embed&?iframe=true\"><img src='" . $site_config['SITEURL'] . "/images/movietrailers.png' border='0' width='50' height='50' title='Click to watch the IMDb Trailer' /></a></td>");
else
print("<td class='ttable_colx' align='center'>-</td>");
break;

[ATTACH]2478[/ATTACH]
[ATTACH]2479[/ATTACH]
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)





