Attention
This Mod is for Netmaniack and TBDev 08 sourcecode!
CREDITS FOR THIS MOD GOES TO OPTITORQUED
ADD THIS TO DATABASE
PHP Code:
ALTER TABLE `torrents` ADD `tube` varchar(80) NOT NULL default '';
OPEN DETAILS.PHP AND FIND THIS
PHP Code:
if (!empty($row["descr"]))
tr("Description", str_replace(array("\n", " "), array("<br>\n", " "), format_comment(htmlspecialchars($row["descr"]))), 1);
ADD BELOW
PHP Code:
if (!empty($row["tube"]))
tr("Sample:", "<embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"500\" height=\"410\"></embed>", 1);
else
tr("YouTube:", "<img src=pic/nosamp.jpg>", 1);
STILL IN DETAILS FIND THIS QUERY THAT STARTS WITH THIS
PHP Code:
$res = mysql_query("SELECT torrents.seeders,
AND ADD THIS TO IT
OPEN UPLOAD.PHP AND FIND THIS
PHP Code:
tr("Poster", "<input type=text name=poster size=80><br>(Direct link for a poster image to be shown on the details page)\n", 1);
tr("NFO File", "<input type=\"file\" name=\"nfo\" size=\"80\" /><br />(<b>OPTIONAL.</b> can only be viewed by power users.)\n", 1);
AND ADD THIS BETWEEN OR UNDER WHICHEVER YOU WOULD LIKE
PHP Code:
tr("YouTube", "<input type=\"text\" name=\"tube\" size=\"80\" /><br />Samples, should be in the format of http://www.youtube.com/watch?v=TYxbGgeeVmI...t;\n", 1);
OPEN TAKEUPLOAD.PHP AND FIND THIS
PHP Code:
if (!empty($_POST['poster']))
$poster = unesc($_POST['poster']);
ADD UNDERNEATH
PHP Code:
if (!empty($_POST['tube']))
$tube = unesc($_POST['tube']);
STILL IN TAKEUPLOAD.PHP FIND THIS QUERY
PHP Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, tube, size, numfiles, type, descr, ori_descr, description, category, save_as, added, last_action, nfo, poster) VALUES (" .
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $smalldescr, 0 + $_POST["type"], $dname))) .
", '" . get_date_time() . "', '" . get_date_time() . "', $nfo, '".$poster."')");
AND ADD THIS INTO IT (I ADDED MINE AFTER $torrent,)
IF YOU ARE WANT TO EDIT THE YOUTUBE LINK, OPEN EDIT.PHP AND FIND THIS
PHP Code:
tr("Poster", "<input type=text name=poster size=80 value='".$row["poster"]."'><br>(Direct link for a poster image to be shown on the details page)\n", 1);
ADD THIS UNDERNEATH
PHP Code:
tr("Trailer", "<input type=text name=tube size=80 value='".$row["tube"]."'><br>(Direct link for youtube trailer)\n", 1);
IN TAKEEDIT.PHP FIND THIS
PHP Code:
if (!empty($_POST['poster']))
$poster = unesc($_POST['poster']);
ADD UNDERNEATH
PHP Code:
if (!empty($_POST['tube']))
$tube = unesc($_POST['tube']);
STILL IN TAKEEDIT.PHP FIND THIS
PHP Code:
$updateset[] = "name = " . sqlesc($name);
$updateset[] = "description = " . sqlesc($smalldescr);
$updateset[] = "search_text = " . sqlesc(searchfield("$shortfname $dname $torrent"));
$updateset[] = "descr = " . sqlesc($descr);
$updateset[] = "ori_descr = " . sqlesc($descr);
$updateset[] = "category = " . (0 + $type);
ADD THIS ABOVE
PHP Code:
$updateset[] = "tube = " . sqlesc($tube);
FOR THE YOUTUBE IMAGE YOU CAN GOOGLE AND DOWNLOAD WHICHEVER ONE YOU WANT, JUST MAKE SURE YOU NAME IT nosamp.jpg, AND ADD IT TO YOUR PIC FOLDER IN YOUR ROOT
nosamp.jpg IS ATTACHED
YOUTUBE IN DETAILS
UPLOAD WITH YOUTUBE
YOUTUBE IN EDIT
YOUTUBE IN DETAILS IF NO LINK ADDED