Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 25th February 2013, 13:56
bestlap bestlap is offline
Senior Member
 
Join Date: Nov 2012
P2P
Posts: 51
Question Youtube trailer in details.php tbdev09
Hi :) I wont to add in details.php icon and users click and wotch trailer in youtube ? And add to upload.php :)


Sorry for my bad english....

Bump: Please help me
Reply With Quote
  #2  
Old 27th February 2013, 18:09
Leechbg Leechbg is offline
Senior Member
 
Join Date: Feb 2013
P2P
Posts: 18
Default
Hello i need that mod,for TBDEV 08, pls help us guys !!!
Reply With Quote
  #3  
Old 27th February 2013, 18:24
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
attention

Attention

This Mod is for Netmaniack and TBDev 08 sourcecode!





CREDITS FOR THIS MOD GOES TO OPTITORQUED

ADD THIS TO DATABASE

PHP Code:
ALTER TABLE `torrentsADD `tubevarchar(80NOT NULL default ''
OPEN DETAILS.PHP AND FIND THIS

PHP Code:
if (!empty($row["descr"]))
         
tr("Description"str_replace(array("\n""  "), array("<br>\n""&nbsp; "), format_comment(htmlspecialchars($row["descr"]))), 1); 
ADD BELOW

PHP Code:
if (!empty($row["tube"]))
tr("Sample:""<embed src='"str_replace("watch?v=""v/"htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"500\" height=\"410\"></embed>"1);
else
tr("YouTube:""<img src=pic/nosamp.jpg>"1); 
STILL IN DETAILS FIND THIS QUERY THAT STARTS WITH THIS

PHP Code:
$res mysql_query("SELECT torrents.seeders, 
AND ADD THIS TO IT


PHP Code:
torrents.tube 
OPEN UPLOAD.PHP AND FIND THIS


PHP Code:
tr("Poster""<input type=text name=poster size=80><br>(Direct link for a poster image to be shown on the details page)\n"1);
 
tr("NFO File""<input type=\"file\" name=\"nfo\" size=\"80\" /><br />(<b>OPTIONAL.</b> can only be viewed by power users.)\n"1); 
AND ADD THIS BETWEEN OR UNDER WHICHEVER YOU WOULD LIKE


PHP Code:
tr("YouTube""<input type=\"text\" name=\"tube\" size=\"80\" /><br />Samples, should be in the format of http://www.youtube.com/watch?v=TYxbGgeeVmI...t;\n"1); 
OPEN TAKEUPLOAD.PHP AND FIND THIS

PHP Code:
if (!empty($_POST['poster']))
$poster unesc($_POST['poster']); 
ADD UNDERNEATH

PHP Code:
if (!empty($_POST['tube']))
$tube unesc($_POST['tube']); 
STILL IN TAKEUPLOAD.PHP FIND THIS QUERY


PHP Code:
$ret mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, tube, size, numfiles, type, descr, ori_descr, description, category, save_as, added, last_action, nfo, poster) VALUES (" .
      
implode(","array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname$CURUSER["id"], "no"$infohash$torrent$totallencount($filelist), $type$descr$descr$smalldescr$_POST["type"], $dname))) .
      
", '" get_date_time() . "', '" get_date_time() . "', $nfo, '".$poster."')"); 
AND ADD THIS INTO IT (I ADDED MINE AFTER $torrent,)

PHP Code:
$tube

IF YOU ARE WANT TO EDIT THE YOUTUBE LINK, OPEN EDIT.PHP AND FIND THIS

PHP Code:
tr("Poster""<input type=text name=poster size=80 value='".$row["poster"]."'><br>(Direct link for a poster image to be shown on the details page)\n"1); 
ADD THIS UNDERNEATH

PHP Code:
 tr("Trailer""<input type=text name=tube size=80 value='".$row["tube"]."'><br>(Direct link for youtube trailer)\n"1); 
IN TAKEEDIT.PHP FIND THIS

PHP Code:
if (!empty($_POST['poster']))
$poster unesc($_POST['poster']); 
ADD UNDERNEATH
PHP Code:
if (!empty($_POST['tube']))
$tube unesc($_POST['tube']); 
STILL IN TAKEEDIT.PHP FIND THIS

PHP Code:
$updateset[] = "name = " sqlesc($name);
$updateset[] = "description = " sqlesc($smalldescr);
$updateset[] = "search_text = " sqlesc(searchfield("$shortfname $dname $torrent"));
$updateset[] = "descr = " sqlesc($descr);
$updateset[] = "ori_descr = " sqlesc($descr);
$updateset[] = "category = " . ($type); 
ADD THIS ABOVE

PHP Code:
$updateset[] = "tube = " sqlesc($tube); 
FOR THE YOUTUBE IMAGE YOU CAN GOOGLE AND DOWNLOAD WHICHEVER ONE YOU WANT, JUST MAKE SURE YOU NAME IT nosamp.jpg, AND ADD IT TO YOUR PIC FOLDER IN YOUR ROOT

nosamp.jpg IS ATTACHED


YOUTUBE IN DETAILS
Click the image to open in full size.

UPLOAD WITH YOUTUBE
Click the image to open in full size.

YOUTUBE IN EDIT
Click the image to open in full size.

YOUTUBE IN DETAILS IF NO LINK ADDED
Click the image to open in full size.
Attached Images
 
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif

Last edited by Chez; 27th February 2013 at 18:34.
Reply With Quote
  #4  
Old 27th February 2013, 18:29
antibiotic1 antibiotic1 is offline
Senior Member
 
Join Date: Dec 2012
Macedonia
Posts: 40
Default
can anyone make this for templateshares 5.6?
Reply With Quote
  #5  
Old 27th February 2013, 19:06
bestlap bestlap is offline
Senior Member
 
Join Date: Nov 2012
P2P
Posts: 51
Default
All is work but I put the link in upload.php and I upload a torrent but in torrent details is not a see a trailer .. I see a nosamp.jpg .. I click a edit torrent and I put a link again and finally it works >>

Click the image to open in full size.





How I fix this bug ?
Reply With Quote
  #6  
Old 27th February 2013, 19:12
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Quote:
Originally Posted by bestlap View Post
All is work but I put the link in upload.php and I upload a torrent but in torrent details is not a see a trailer .. I see a nosamp.jpg .. I click a edit torrent and I put a link again and finally it works >>

Click the image to open in full size.





How I fix this bug ?
probably you do something wrong
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #7  
Old 27th February 2013, 19:45
bestlap bestlap is offline
Senior Member
 
Join Date: Nov 2012
P2P
Posts: 51
Default
Quote:
Originally Posted by Chez View Post
probably you do something wrong
No , I'm sure all is ok .. I chek again...

Here is a files >>>
Attached Files
File Type: php details.php (27.4 KB, 8 views)
File Type: php edit.php (6.1 KB, 4 views)
File Type: php upload.php (6.9 KB, 16 views)
File Type: php takeupload.php (6.3 KB, 8 views)
File Type: php takeedit.php (3.0 KB, 6 views)
Reply With Quote
  #8  
Old 27th February 2013, 19:48
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Try to replace in Upload.php

this:

PHP Code:
tr("YouTube""<input type=\"text\" name=\"tube\" size=\"80\" /><br />Samples, should be in the format of http://www.youtube.com/watch?v=TYxbGgeeVmI...t;\n"1); 
to this:

PHP Code:
tr("Trailer""<input type=text name=tube size=80 value='".$row["tube"]."'><br>(Direct link for youtube trailer)\n"1); 
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #9  
Old 27th February 2013, 20:34
bestlap bestlap is offline
Senior Member
 
Join Date: Nov 2012
P2P
Posts: 51
Default
Quote:
Originally Posted by Chez View Post
Try to replace in Upload.php

this:

PHP Code:
tr("YouTube""<input type=\"text\" name=\"tube\" size=\"80\" /><br />Samples, should be in the format of http://www.youtube.com/watch?v=TYxbGgeeVmI...t;\n"1); 
to this:

PHP Code:
tr("Trailer""<input type=text name=tube size=80 value='".$row["tube"]."'><br>(Direct link for youtube trailer)\n"1); 
No :(

But I want to ask you something in takeupload.php

tube how many places to put it becouse I put it one >>
PHP Code:
implode(","array_map("sqlesc", array(searchfield("$shortfname $dname $torrent $tube"
because I put and second time here >>

PHP Code:
$fname$CURUSER["id"], "no"$infohash$torrent$tube$totallen
but out me error >>

Upload failed!

mysql puked: Column count doesn't match value count at row 1




Please help me
Reply With Quote
  #10  
Old 27th February 2013, 20:42
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
u need to put it twice in takeupload.
tube and $tube
Reply With Quote
Reply

Tags
detailsphp , tbdev09 , trailer , 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



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