adds youtube to details :d
SQL
Code:
ALTER TABLE `torrent_torrents` ADD `tube` varchar(225) NOT NULL DEFAULT '',
now open upload/torrent.php
find
Code:
echo "<tr><td><p>"._btdescription."</p></td>";
add above
Code:
echo "<tr><td><p>Youtube Link :</p></td><td><p><input type=\"text\" name=\"imdb_info\" size=\"80\" /><br />(Add youtube trailer to details page By providing a youtube link or youtube NUMBER)</p>\n</td></tr>\n";
open taketorrent.php
find
Code:
$f = $_FILES["filex"];
add above
Code:
if(strlen($tube) > 1)$tube = $tube;
else
$tube = '';
find
Code:
$torrentfields[] = "last_action";
$torrentvalues[] = "NOW()";
add below
Code:
if(strlen($tube) > 1){
$torrentfields[] = "tube";
$torrentvalues[] = "'".$tube."'";
}
Now open edit.php and find
Code:
ratiobuild = '".$build."',
add below
Code:
tube = '".$tubelink."',
now find
Code:
echo "<tr><td><p>"._bttorrentname."<p></td><td><p><input type=\"text\" name=\"namex\" value=\"".$tname."\" size=\"80\"></p>\n</td></tr>\n";
add below
Code:
echo "<tr><td><p>Youtube Link<p></td><td><p><input type=\"text\" name=\"tubelink\" value=\"".$row['tube']."\" size=\"80\"></p>\n</td></tr>\n";
now open ajax.php
find
Code:
#Info Hash & Tracker
add above
Code:
if ($torrent["tube"]=='') {
print ("<tr><td><p>Youtube:</p</td><td><img src=/images/novideo.jpg border=\"0\" width=\"200\" height=\"164\" ></td></tr>");
}else{
print ("<tr><td><p>Youtube:</p></td><td><object type=\"application/x-shockwave-flash\" data=". str_replace("watch?v=", "v/", htmlspecialchars($torrent["tube"])) ." width=\"400\" height=\"326\"><param name=\"movie\" value='". str_replace("watch?v=", "v/", htmlspecialchars($torrent["tube"])) ."' /><param name=\"FlashVars\" value=\"playerMode=embedded\" /></object></td></tr>");
}
dont forget this is in 2 places
now save image to images/
if i have missed something let me know, im a little high atm hahahaha
Screenshot
without youtube
without youtube