I didnt create this mod This is an attempt to re-post the mod so others can use it. Hopefully I dont miss any edits haha
back up all files first! I am not responsible for any issues
Run sql
in functions.php find
above put
find
above put
in torrents-details.php find in the big sql query
add after
find
add before
in torrents-upload.php find
replace with
find in the big sql query
add after
find
add after
find
add after
in torrent-edit.php find
add after
find
add above
in torrents.php in the big sql query add
in languages/english.php put
I think thats all. I did my best to go through my files and gather all the edits. If I missed something, let me know and I will check. BACK UP YOUR FILES AND DATABASE FIRST![ATTACH type="full" alt="2619"]5008._xfImport[/ATTACH]
back up all files first! I am not responsible for any issues
Run sql
ALTER TABLE `torrents` ADD `tube` varchar(100) DEFAULT NULL;in functions.php find
case 'uploader':
echo "<th>".T_("UPLOADER")."</th>";
break;above put
case 'tube':
echo "<th>".T_("YOUTUBE")."</th>";
break;find
case 'uploader':
echo "<td class='ttable_col$x' align='center'>";above put
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 find in the big sql query
torrents.seeders,add after
torrents.tube,find
echo "</table></fieldset><br /><br />";add before
if (!empty($row["tube"]))
print ("<tr><td align='left'><b>" .T_("VIDEOTUBE"). ": </b></td><td align='left'><embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"400\" height=\"310\"></embed></td></tr>");
else
print ("");in torrents-upload.php find
if (!is_valid_id($catid))
$message = T_("UPLOAD_NO_CAT");replace with
if (!is_valid_id($catid))
$message = T_("UPLOAD_NO_CAT");
if (!empty($_POST['tube']))
$tube = unesc($_POST['tube']);find in the big sql query
category,add after
tube,find
'".$catid."',add after
'".$tube."',find
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' /> <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 torrent-edit.php find
$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";add after
if (!empty($_POST['tube']))
$tube = unesc($_POST['tube']);
$updateset[] = "tube = " . sqlesc($tube);find
echo "<tr><td class='table_col1' align='right'><b>".T_("CATEGORIES").": </b></td><td class='table_col2'>".$catdropdown."</td></tr>";add above
echo "<tr><td align='right'><b>".T_("VIDEOTUBE").": <b></td><td class='table_col2' align='left'><input type='text' name='tube' value='" . htmlspecialchars($row["tube"]) . "' size='60' /> <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 torrents.php in the big sql query add
torrents.tube,in languages/english.php put
// Youtube mod
$LANG["VIDEOTUBE"] = "YouTube Trailer/Video";
$LANG["NOVIDEOTUBE"] = "No YouTube video for this Torrent.";
$LANG["FORMAT"] = "Accepted Format";
$LANG["YOUTUBE"] = "Trailer";I think thats all. I did my best to go through my files and gather all the edits. If I missed something, let me know and I will check. BACK UP YOUR FILES AND DATABASE FIRST![ATTACH type="full" alt="2619"]5008._xfImport[/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)
