Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 25th April 2008, 14:01
Tarix22 Tarix22 is offline
Member
 
Join Date: Feb 2008
Posts: 9
Default Youtube
Credits to seb35 @ tbdev for this mod

Put in db:

Code:
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;
and create file youtube.php and put in you root

Code:
<?

require_once("include/bittorrent.php");
dbconn(false);
loggedinorreturn();
if ($_GET["id"] != ""){
$id = $_GET["id"];
if (get_user_class() >= UC_USER){
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/v/".$_POST[link]."";
    mysql_query("INSERT INTO youtubevideo (link, name, addedby, addtime) VALUES('$link', '$name', '$user',NOW())") or sqlerr(__FILE__, __LINE__);
  }
stdhead("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>Video Clips</center></span></td>
</tr><tr><td width="100%" class="tablea">
<center>




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


<tr><td>
</form> <iframe src="" name="games" width="570" height="570" 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>Liste</center></span></td>
</tr><tr><td width="100%" class="tablea">
<center>




<span class="style3"><font color=blue> Have Fun</font></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>");
if (get_user_class() >= UC_MODERATOR){
print("

");
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"


just put: qppuuQrklHg in link

</div>

<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"> Delete </div></td>
</tr>
<?
$nr = $nr+1;
}
end_table();
end_frame();
}
stdfoot();
?>
screenshot:

Click image for larger version

Name:	36960317sv4.gif
Views:	591
Size:	42.0 KB
ID:	405

not working under IE
Reply With Quote
  #2  
Old 27th April 2008, 13:31
seb35 seb35 is offline
Senior Member
 
Join Date: Dec 2007
France
Posts: 32
Default Re: Youtube
Original here thank's me nicky=seb35 lol
http://www.tbdev.net/index.php?s=&showt ... t&p=101306
Reply With Quote
  #3  
Old 30th April 2008, 09:40
snakebite snakebite is offline
Senior Member
 
Join Date: Apr 2008
Default
Posts: 47
Default Re: Youtube
this works only for TBDev sources?
__________________
Go here! ----> "HERE"
Reply With Quote
  #4  
Old 13th July 2008, 15:50
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default Re: Youtube
Quote:
Originally Posted by snakebite
this works only for TBDev sources?
I think it should work for others also, need to be tested !
Reply With Quote
  #5  
Old 11th October 2008, 13:35
Hardstylerz Hardstylerz is offline
Member
 
Join Date: Oct 2008
Sweden
Posts: 11
Default I cant upload
I cant upload video?

"The URL contained a malformed video ID."


Plz help
Reply With Quote
  #6  
Old 11th October 2008, 14:06
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
Board Message

http://www.tbdev.net/index.php?showt...162&hl=youtube

http://www.tbdev.net/index.php?showt...017&hl=youtube
Reply With Quote
  #7  
Old 23rd December 2008, 03:27
patz patz is offline
Senior Member
 
Join Date: Oct 2008
P2P
Posts: 16
Default
i tink is a bug i cant delete a video from list :((
and when i refresh page add automatical copy of videos :((

Last edited by patz; 23rd December 2008 at 14:54.
Reply With Quote
  #8  
Old 27th January 2009, 02:32
Hardstylerz Hardstylerz is offline
Member
 
Join Date: Oct 2008
Sweden
Posts: 11
Thumbs up Delete Video :)
Find:
Code:
 Delete
Replace with:
Code:
 <a href="youtube.php?id=<?=$id?>">Delete</a>
Done! :D I'll hope i've fixed it!
Reply With Quote
  #9  
Old 24th July 2009, 00:20
Night_Owl Night_Owl is offline
Member
 
Join Date: Jun 2009
P2P
Posts: 10
Talking StrikeMulti
works with StrikeMulti here :)

ok my bad its not showin the video :/ with [youtube]video addy[/youtube] or any other url tag

ive tryed about every version ive found on here anyone by chance know where i can find one for the strikemulti version

Last edited by Night_Owl; 24th July 2009 at 01:02.
Reply With Quote
  #10  
Old 9th December 2009, 21:11
JoKeR_3D JoKeR_3D is offline
Member
 
Join Date: May 2009
Moldova
Posts: 1
Default
Help me
Parse error: parse error in youtube.php on line 68

PHP Code:
print("<tr><td align=left>  <a href=".$link." rel="nofollow" target=games>".$name."</td></tr>"); 
Reply With Quote
Reply

Tags
youtube

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FTS 1.1] Nice youtube mod Edgein Mods & Themes 5 7th November 2011 09:58
youtube.php bug wMan BT.Manager (phpMyBitTorrent) 1 16th January 2010 23:32
youtube ciobancai Template Shares 9 2nd May 2009 08:17
[YSE]Youtube helvijs13 Yuna Scatari Edition (YSE) 0 10th April 2009 16:12
TS SE v5.0 Nulled YOUTUBE dribbel Template Shares 2 25th June 2008 14:19



All times are GMT +2. The time now is 12:58. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.