Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[Addon] Screenshots
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-10-15 16:21:32
So this one has been in the premium section for about 2 years now so i decided it is time for the normal users to enjoy it and maybe build on it.

Ok I got the idea from the IMDB mod. some torrents have screenshots so this lets your uppers up them with the torrent to display in the torrent details and to display in the torrent tables with the ballon mod.

sql:

ALTER TABLE `torrents` ADD `screens1` LONGTEXT NOT NULL;

ALTER TABLE `torrents` ADD `screens2` LONGTEXT NOT NULL;

ALTER TABLE `torrents` ADD `screens3` LONGTEXT NOT NULL;

ALTER TABLE `torrents` ADD `screens4` LONGTEXT NOT NULL;
find in torrents-upload.php:




$descr = unesc($_POST["descr"]);



if (!$descr)

$descr = "No description given.";





add above it:





///screenshot

$screens1 = unesc($_POST["screens1"]);

if (!$screens1)

$screens1 = "";



$screens2 = unesc($_POST["screens2"]);

if (!$screens2)

$screens2 = "";



$screens3 = unesc($_POST["screens3"]);

if (!$screens3)

$screens3 = "";



$screens4 = unesc($_POST["screens4"]);

if (!$screens4)

$screens4 = "";

///screenshot

now find:

$ret = mysql_query("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang) VALUES (".sqlesc($fname).", '".$uploaderid."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$type."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."')");





in this query you need to add a few things:



directly after:





name,





add:





screens1, screens2, screens3, screens4,





now still in the same query directly after:





".sqlesc($name).",





add:





".sqlesc($screens1).", ".sqlesc($screens2).", ".sqlesc($screens3).", ".sqlesc($screens4).",





now find:





print ("<TR><TD align=right>" . NFO . ": </td><td align=left> <input type=file name=nfo size=50 value=" . $_FILES['nfo']['name'] . "><br />\n</td></tr>");





add after:





// screenshots //

print ("<TR><TD align=right>Screenshot 1: </td><td align=left><input type=text name=screens1 size=60 value=" . $_POST['screens1'] . "><BR>\n</td></tr>");

print ("<TR><TD align=right>Screenshot 2: </td><td align=left><input type=text name=screens2 size=60 value=" . $_POST['screens2'] . "><BR>\n</td></tr>");

print ("<TR><TD align=right>Screenshot 3: </td><td align=left><input type=text name=screens3 size=60 value=" . $_POST['screens3'] . "><BR>\n</td></tr>");

print ("<TR><TD align=right>Screenshot 4: </td><td align=left><input type=text name=screens4 size=60 value=" . $_POST['screens4'] . "><BR>\n</td></tr>");

//screenshots //





find in torrents-edit.php:





$updateset[] = "name = " . sqlesc($name);





add after:





///screenshot

$updateset[] = "screens1 = " . sqlesc($screens1);

$updateset[] = "screens2 = " . sqlesc($screens2);

$updateset[] = "screens3 = " . sqlesc($screens3);

$updateset[] = "screens4 = " . sqlesc($screens4);

///screenshot end





now find:





echo "<tr><td align=right width=60><B>Name: </b></TD><TD><input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"60\" /></TD></TR>";





add after:





///screenshots

echo "<tr><td align=right width=60><B>Screenshot 1: </b></TD><TD><input type=\"text\" name=\"screens1\" value=\"" . htmlspecialchars($row["screens1"]) . "\" size=\"60\" /></TD></TR>";

echo "<tr><td align=right width=60><B>Screenshot 2: </b></TD><TD><input type=\"text\" name=\"screens2\" value=\"" . htmlspecialchars($row["screens2"]) . "\" size=\"60\" /></TD></TR>";

echo "<tr><td align=right width=60><B>Screenshot 3: </b></TD><TD><input type=\"text\" name=\"screens3\" value=\"" . htmlspecialchars($row["screens3"]) . "\" size=\"60\" /></TD></TR>";

echo "<tr><td align=right width=60><B>Screenshot 4: </b></TD><TD><input type=\"text\" name=\"screens4\" value=\"" . htmlspecialchars($row["screens4"]) . "\" size=\"60\" /></TD></TR>";

///screenshots





no find in torrents-details.php:





torrents.name,





add directly after:





torrents.screens1, torrents.screens2, torrents.screens3, torrents.screens4,





now find:





if ($row["image1"] != "" OR $row["image2"] != "") {

 if ($row["image1"] != "")

$img1 = "<IMG src=".$site_config["SITEURL"]."/uploads/images/$row[image1] width=150 border=0>";

 if ($row["image2"] != "")

$img2 = "<IMG src=".$site_config["SITEURL"]."/uploads/images/$row[image2] width=150 border=0>";

 print("<CENTER>". $img1 . "&nbsp&nbsp" . $img2."</CENTER><BR>");

}





add after:





echo "<BR><BR>";

if ($row["screens1"] != "" OR $row["screens2"] != "" OR $row["screens3"] != "" OR $row["screens3"] != "") {

 if ($row["screens1"] != "")

$screens1 = "<IMG src=".$row['screens1']." width=350 border=0>";

 if ($row["screens2"] != "")

$screens2 = "<IMG src=".$row['screens2']." width=350 border=0>";

if ($row["screens3"] != "")

$screens3 = "<IMG src=".$row['screens3']." width=350 border=0>";

 if ($row["screens4"] != "")

$screens4 = "<IMG src=".$row['screens4']." width=350 border=0>";

 print("<CENTER>". $screens1 . "&nbsp&nbsp" . $screens2 ."</CENTER><BR>");

 print("<CENTER>". $screens3 . "&nbsp&nbsp" . $screens4 ."</CENTER><BR>");

}





now find in functions.php:





<td class=ttable_head>NFO</td>





add after:





<td class=ttable_head>Screens</td>





now find:





if ($row["nfo"]=='yes') {

print("<td class=ttable_col1 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>");

}else{

print("<td class=ttable_col1 align=center>-</td>");

}





add after:





$simg = @mysql_fetch_array(@mysql_query("SELECT screens1, screens2, screens3, screens4 FROM torrents WHERE id=$id"));

$simg1 = $simg[screens1];

$simg2 = $simg[screens2];

$simg3 = $simg[screens3];

$simg4 = $simg[screens4];

$screens1 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens1!=''"));

$screens2 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens2!=''"));

$screens3 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens3!=''"));

$screens4 = number_format(get_row_count("torrents", "WHERE id=$row2[id] && screens4!=''"));

$screenstotal = $screens1 + $screens2 + $screens3 + $screens4;

if ($simg["screens1"]!=''){

print("<td class=ttable_col1 align=center><font size=1 face=Verdana><a href=screens.php?id=$id onmouseover=\" return overlib('<center><h1><b>Screen Shots:</b></h1></center><hr><table width=100%><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0><img src=$simg3 width=250 border=0><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\">" . $screenstotal . "</a></td>\n");

}else{

print("<td class=ttable_col1 align=center><font size=1 face=Verdana><a href=screens.php?id=$id onmouseover=\" return overlib('<center><h1><b>Screen Shots:</b></h1></center><hr><table width=100%><tr><td><br><br><br><br><tr><td><center><font color=red size=4><b>Sorry no screens available</b></font></center></td></tr></table>', CENTER, HEIGHT, 250, WIDTH, 300);\" onmouseout=\"return nd();\">" . $screenstotal . "</a></td>\n");

}





now if you do not have the overlib already on your site then add this to your header.php for every theme you use it goes between the <head> and </head>:





<script type="text/javascript" src="/themes/default/overlib.js"></script>



also upload the file below to the default folder in your themes folder

and add the screens.php to your root folder

I hope I did not forget anything enjoy  :D







[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=4227"]screens.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=4228"]overlib.rar[/url]
screens.php
Download
overlib.rar
Download
Unknown User
2010-10-15 16:31:15
that screenshot is that you? lmao il be the kid in the white top :D
Unknown User
2010-10-15 16:52:57
lmfao i am the one on the bottom left lol
Unknown User
2010-10-15 17:19:32
Thank you very much walker! It works fine with 2.6!
Unknown User
2010-10-15 23:59:22
Dj with the beard lmao
Unknown User
2010-10-18 15:36:11
in torrents details wil be cool to open screens whit thumbnail image
Unknown User
2010-10-18 16:31:40
if i ever get around to it i might add it. anybody who wants to add things to this can feel free and if it works i will add it to the first post as a variant way. some of the mods i have on the forums i do get around to messing with and make them a bit better but since i only have a test site up then things like that and any new mods are on the bottom of my list. at the moment i am only making things which i use elsewhere like the smtp mod i done in the premium section because i am working on a couple wordpress sites i decided to bring it over to tt and integrate it with what tt has.
Unknown User
2010-10-18 17:03:07
ok i made working whit lightbox

you need firts this mod instalet to get working

[url="http://www.torrenttrader.org/index.php?showtopic=9731&hl=greybox"]http://www.torrenttrader.org/index.php?sho...&hl=greybox[/url]

in torrents details replace

  if ($row["screens1"] != "")
$screens1 = "<IMG src=".$row['screens1']." width=350 border=0>";

if ($row["screens2"] != "")

$screens2 = "<IMG src=".$row['screens2']." width=350 border=0>";

if ($row["screens3"] != "")

$screens3 = "<IMG src=".$row['screens3']." width=350 border=0>";

if ($row["screens4"] != "")

$screens4 = "<IMG src=".$row['screens4']." width=350 border=0>";

whit

  if ($row["screens1"] != "")
$screens1 = "<a href=$row[screens1] rel=gb_imageset[nice_pics] title=" . $shortname . "><IMG src=".$row['screens1']." width=325 height=190 border=0></a>";

if ($row["screens2"] != "")

$screens2 = "<a href=$row[screens2] rel=gb_imageset[nice_pics] title=" . $shortname . "><IMG src=".$row['screens2']." width=325 height=190 border=0></a>";

if ($row["screens3"] != "")

$screens3 = "<a href=$row[screens3] rel=gb_imageset[nice_pics] title=" . $shortname . "><IMG src=".$row['screens3']." width=325 height=190 border=0></a>";

if ($row["screens4"] != "")

$screens4 = "<a href=$row[screens4] rel=gb_imageset[nice_pics] title=" . $shortname . "><IMG src=".$row['screens4']." width=325 height=190 border=0></a>";

screens how looks like on mine site



thnx again m8 for all your work that mod is coool :D
2010-11-12 05:28:54
fonctionne pas sur la version 2.06   :huh:

~~~~~~~~~~~~~~~~~~~~~//

not work on version 2.06  :)
Unknown User
2010-11-12 21:04:38
"tiloup, post: 67327":
fonctionne pas sur la version 2.06   :huh: ~~~~~~~~~~~~~~~~~~~~~//

not work on version 2.06   :)

this mod is about 2 years old and was modded for v2.03 and i have not tested it on v2.06. let me know which problem you are having and i should be able to solve it. i do not have an active torrent trader site but i do have a few test sites for mod making so it would not be to hard to get it working.
2010-11-13 03:03:58
"walker1977, post: 67344":
this mod is about 2 years old and was modded for v2.03 and i have not tested it on v2.06. let me know which problem you are having and i should be able to solve it. i do not have an active torrent trader site but i do have a few test sites for mod making so it would not be to hard to get it working.


yes  thanks!

the problem starts here / le probl
Unknown User
2010-11-15 11:09:03
the first link you posted is to a lightbox mod and i did not setup this mod to use lightbox. this mod use the balloon over mod. Lakicevic Boris has it working with the grey box which is like lightbox so you might have to ask him what he done to get it working. the other link you posted is to a bbcode mod which i do not have installed and i can't help with something which i do not have installed.
Unknown User
2010-11-15 12:03:56
tiloup m8 see mine post above , if you have any other lightbox remove them first and instal greybox  how to setup is easy just replace in torrents-details screenshot code whit that one i have post try and let me know if work...
Unknown User
2011-01-09 15:19:55
I would like to make the picture like this as I do

I leave here the link where I saw

link: [url="http://www.torrenttrader.org/index.php?showtopic=5342"]http://www.torrenttrader.org/index.php?showtopic=5342[/url]

Unknown User
2011-01-10 20:17:30
"dumorim, post: 69277":
I would like to make the picture like this as I doI leave here the link where I saw

link: [url="http://www.torrenttrader.org/index.php?showtopic=5342"]http://www.torrenttrader.org/index.php?showtopic=5342[/url]



i have no idea if that will work or not but you could try adding the mod to it.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728