View Single Post
  #1  
Old 10th December 2014, 19:54
nicukent nicukent is offline
Senior Member
 
Join Date: Sep 2009
P2P
Posts: 40
Thumbs up U-232 V2 YouTube in details
sql:
Code:
  1. ALTER TABLE `torrents` ADD `tube` varchar(80) NOT NULL default '';
details.php find big query:
Code:
  1. $res = mysql_query("SELECT torrents.seeders...
add:
Code:
torrents.tube
find:
Code:
  1. $HTMLOUT .= tr("{$lang['details_visible']}", "<b>{$lang['details_no']}</b>{$lang['details_dead']}", 1);
under add:
Code:
  1. if (!empty($row["tube"]))
  2. $HTMLOUT .= "<tr><td class='rowhead'>{$lang['details_tube']}</td><td align='left'><embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"500\" height=\"410\"></embed></td></tr>\n";
upload.php find
Code:
  1. <tr>
  2. <td class='heading' valign='top' align='right'>{$lang['upload_description']}</td>
  3. <td valign='top' align='left'><textarea name='descr' rows='10' cols='80'></textarea>
  4. <br />({$lang['upload_html_bbcode']})</td>
  5. </tr>
under add:
Code:
  1. <tr>
  2. <td class='heading' valign='top' align='right'>{$lang['upload_tube']}</td>
  3. <td valign='top' align='left'><input type='tube' name='tube' size='80'>
  4. <br />({$lang['upload_tube_notice']})</td>
  5. </tr>
takeupload.php find:
Code:
  1. $descr = unesc($_POST["descr"]);
under add:
Code:
  1. $tube = unesc($_POST["tube"]);
find big query:
Code:
  1. $ret = mysql_query("INSERT INTO torrents...
after
Code:
visible
add:
Code:
tube
after
Code:
  1. $CURUSER["id"], "no"
add:
Code:
$tube
lang_details.php add:
Code:
  1. 'details_tube' => "Youtube trailer.",
lang_upload.php add:
Code:
  1. 'upload_tube' => "Youtube link.",
  2. 'upload_tube_notice' => "For Samples Should be in the format of <a href='http://www.youtube.com/watch?v=TYxbGgeeVmI'>http://www.youtube.com/watch?v=TYxbGgeeVmI</a>",
open edit.php add
Code:
  1. $HTMLOUT .= tr($lang['edit_tube'], "<input type='text' name='tube' size='80' value='" . htmlspecialchars($row["tube"]) . "' alt='' /><br />({$lang['edit_tube_notice']})", 1);
lang_edit.php add
Code:
  1. 'edit_tube' => "Youtube link.",
  2. 'edit_tube_notice' => "For Samples Should be in the format of http://www.youtube.com/watch?v=TYxbGgeeVmI",
open file takeedit.php and add
Code:
  1. $tube = $_POST["tube"];
  2. $updateset[] = "tube = " . sqlesc($tube);
Enjoy!
Reply With Quote