|
#1
|
|||
|
|||
torrents-upload.php
|
#2
|
||||
|
||||
there is alot more to it than just adding them to torrent-upload.php, you need sql and to edit torrent-edit.php and torrent-details.php etc... its more of a modification, the scripts are alread made for these if you search dude.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#3
|
|||
|
|||
ok
thank you for answering most sought here found nothing more you can post the link or even speak the name of this mod that does that would be very grateful
|
#4
|
||||
|
||||
all credit goes to walker1977
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: Code:
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; Code:
$descr = unesc($_POST["descr"]); if (!$descr) $descr = "No description given."; Code:
///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 Code:
now find: Code:
$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."')"); directly after: Code:
name, Code:
screens1, screens2, screens3, screens4, Code:
".sqlesc($name).", Code:
".sqlesc($screens1).", ".sqlesc($screens2).", ".sqlesc($screens3).", ".sqlesc($screens4).", Code:
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>"); Code:
// 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 // Code:
$updateset[] = "name = " . sqlesc($name); Code:
///screenshot $updateset[] = "screens1 = " . sqlesc($screens1); $updateset[] = "screens2 = " . sqlesc($screens2); $updateset[] = "screens3 = " . sqlesc($screens3); $updateset[] = "screens4 = " . sqlesc($screens4); ///screenshot end Code:
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>"; Code:
///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 Code:
torrents.name, Code:
torrents.screens1, torrents.screens2, torrents.screens3, torrents.screens4, Code:
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 . "  " . $img2."</CENTER><BR>"); } Code:
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 . "  " . $screens2 ."</CENTER><BR>"); print("<CENTER>". $screens3 . "  " . $screens4 ."</CENTER><BR>"); } Code:
<td class=ttable_head>NFO</td> Code:
<td class=ttable_head>Screens</td> Code:
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>"); } Code:
$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"); } Code:
<script type="text/javascript" src="/themes/default/overlib.js"></script> and add the screens.php to your root folder I hope I did not forget anything enjoy :D
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
The Following 5 Users Say Thank You to daffy For This Useful Post: | ||
aMiGo1972 (12th January 2011),
dumorim (9th January 2011),
PopcornCat™ (29th April 2011),
RIAS (2nd July 2013),
vulongvy (11th April 2012)
|
#5
|
|||
|
|||
where is the file??
|
Tags |
torrentsuploadphp |
|
|