Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[ADDON] You Tube
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-03-19 11:07:53
Ok here is a simple you tube script takin from the tbdev forums and modded for torrent trader v.2xx

create a table in you data bank:

CREATE TABLE `youtubevideo` (

`id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,

`link` VARCHAR( 100 ) NOT NULL ,

`name` VARCHAR( 100 ) NOT NULL ,

`addedby` VARCHAR( 100 ) NOT NULL ,

`addtime` DATETIME NOT NULL

) ENGINE = MYISAM;
now create a file called youtube.php and link to it:






<?



require_once("backend/functions.php");

dbconn(false);

loggedinonly();



if ($_GET["id"] != ""){

$id = $_GET["id"];

if ($CURUSER["class"] >= "2"){

mysql_query("DELETE FROM youtubevideo WHERE id= $id") or sqlerr(__FILE__, __LINE__);

}

else{

stderr("Sorry", "not authorized!");

}

}

if ($_SERVER["REQUEST_METHOD"] == "POST")

{

if ($_POST["link"] == "" || $_POST["name"] == "")

stderr("Error", "missing form data.");

$name = $_POST["name"];

$user = $CURUSER["username"];

$link = "http://youtube.com/watch?v=".$_POST[link]."";

mysql_query("INSERT INTO youtubevideo (link, name, addedby, addtime) VALUES('$link', '$name', '$user',NOW())") or sqlerr(__FILE__, __LINE__);

}

stdhead("Video Clips");

begin_frame("Video Clips");

print("<table border=1 cellspacing=0 cellpadding=0 align=center><tr>");

print("<td width=502 valign=top>");

print("<table width=502 border=1>");

?>

<style type="text/css">

</style>

<table cellpadding="4" cellspacing="1" border="0" style="width:100%" class="tableinborder">

<tr class="tabletitle" width="100%">

<td colspan="10" width="100%"><span class="normalfont"><center><b>Video Clips</b></center></span></td>

</tr><tr><td width="100%" class="tablea">

<center>

<p><br>

<span class="style3"><b><font color=blue>Please Choose A Video From The Right.</font></b></span> </p>

</center>

<tr><td

<br>

<tr><td>

</form> <iframe src="" name="games" width="560" height="460" scrolling="no"></iframe></td></tr>

</table></td>

<?

print("<td width=300 valign=top><table border=1>");

?>

<table cellpadding="4" cellspacing="1" border="0" style="width:100%" class="tableinborder">

<tr class="tabletitle" width="100%">

<td colspan="10" width="100%"><span class="normalfont"><center><b>List</b></center></span></td>

</tr><tr><td width="100%" class="tablea">

<center>

<p><br>

<span class="style3"><b><font color=blue> Have Fun</font></b></span> </p>

</center>

<?

$query = "SELECT * FROM youtubevideo ORDER BY name";

$sql = mysql_query($query);

while ($row = mysql_fetch_array($sql)) {

$link = $row['link'];

$name = $row['name'];

print("<tr><td align=left> <a href=".$link." target=games>".$name."</td></tr>");

}

print("</table>");

print("</td></tr></table>");

end_frame();

if ($CURUSER["class"] >= "7"){

print("<br><br>");

begin_frame("New video", FALSE, "100px");

?>

<form method="post" action="youtube.php">

<? begin_table(TRUE); ?>

<div align=center>

For URL: "http://youtube.com/watch?v=qppuuQrklHg"<br><br>

just put: qppuuQrklHg in link

<br></div><br>

<tr><td class="tableb">Link:</td><td class="tablea"><input type="text" name="link" size="60"></td></tr>

<tr><td class="tableb">Name:</td><td class="tablea"><input type="text" name="name" size="60"></td></tr>

<tr><td class="tablea" colspan="2" style="text-align:center"><input type="submit" value="Okay" class="btn"></td></tr>

<? end_table(); ?>

</form>

<?

end_frame();

begin_frame('Videos', FALSE, "100%;");

begin_table(TRUE);

?>

<colgroup>

<col width="10">

<col width="15%">

<col width="25%">

<col width="20%">

<col width="20%">

<col width="10">

</colgroup>

<tr>

<td class="tablecat"><div align="center"> ID</div></td>

<td class="tablecat"><div align="center"> Name</div></td>

<td class="tablecat"><div align="center"> Link</div></td>

<td class="tablecat"><div align="center"> Added by</div></td>

<td class="tablecat"><div align="center"> Added form</div></td>

<td class="tablecat"><div align="center"> Delete</div></td>

</tr>

<tr>

<?

$query = "SELECT * FROM youtubevideo ORDER BY id";

$sql = mysql_query($query);

while ($row2 = mysql_fetch_array($sql)){

$link = $row2["link"];

$name = $row2["name"];

$id = $row2["id"];

$addedby = $row2["addedby"];

$addtime = $row2["addtime"];

?>

<tr>

<td class="tablea"><div align="center"> <?=$id?></div></td>

<td class="tablea"><div align="center"> <?=$name?></div></td>

<td class="tablea"><div align="center"> <?=$link?></div></td>

<td class="tablea"><div align="center"> <?=$addedby?></div></td>

<td class="tablea"><div align="center"> <?=$addtime?></div></td>

<td class="tablea"><div align="center"> <a href="youtube.php?id=<?=$id?>">Delete</a> </div></td>

</tr>

<?

$nr = $nr+1;

}

end_table();

end_frame();

}

stdfoot();

?>




here is a screen of the video area.



and another screen of the video area that shows after the video is finished your user can access other videos if they are available.



and here is a screen where you can add videos.

Unknown User
2008-03-19 11:34:38
screen please!
Unknown User
2008-03-19 14:15:00
great work
Unknown User
2008-03-20 09:36:36
but can you make when i go to torrent-upload there i can put the link and when i upload the torrent in the torrent to see the youtube video not to put the link in the description?
Unknown User
2008-03-20 09:44:47
i only mod the script to work on torrent trader so i have no idea. I would play around with it but it take a while before I can do that because i still have things I need to mod.

"tedmin, post: 40255":
but can you make when i go to torrent-upload there i can put the link and when i upload the torrent in the torrent to see the youtube video not to put the link in the description?
Unknown User
2008-05-19 11:05:06
nice script, when the list gets to large will it scroll down or just expand?
Unknown User
2008-05-19 11:29:22
i have not added enough links to go that far so I do not know exactly.
Unknown User
2008-05-19 11:32:45
alright.. please update me when you do... or i'll update you ;)
Unknown User
2008-05-24 02:33:22
Tnxxxx, Work Perfect
Unknown User
2008-05-28 13:39:15
how to put youtube link in the shoutbox  fot see directly the video in the shout not just the link???
Unknown User
2008-06-15 11:15:05
thank
Unknown User
2008-07-12 10:30:28
Thank You                                :mellow:
Unknown User
2009-12-06 16:00:51
can be put in the blok Navigation

code

echo "- <a href=youtube.php>youtube</a><BR>";
2010-02-24 02:00:24
this would be a cool mod if it could be made to add youtube videos to torrents when you upload the torrents. I use youtube videos to display trailers, woudl be much simpler to have this mod in the torrent upload rather than having to type out , much in the same way you can upload images with a torrent.
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)
Unknown User
2010-11-12 21:32:05
Super merci  fonctionne tres bien  :huh:
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728