Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Youtube trailer in details.php tbdev09 (http://www.bvlist.com/showthread.php?t=8916)

bestlap 25th February 2013 13:56

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 :sos:

Leechbg 27th February 2013 18:09

Hello i need that mod,for TBDEV 08, pls help us guys !!! :sos: :drink:

Chez 27th February 2013 18:24

1 Attachment(s)
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("\n""  "), 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>(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\" />(<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\" />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"]."'>(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"]."'>(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
http://iceimg.com/i/f7/85/4bacb5ce67.jpg

UPLOAD WITH YOUTUBE
http://iceimg.com/i/d0/a8/2678b5c329.jpg

YOUTUBE IN EDIT
http://iceimg.com/i/4d/85/2b69629448.jpg

YOUTUBE IN DETAILS IF NO LINK ADDED
http://iceimg.com/i/98/cd/3f9bc4b3fe.jpg

antibiotic1 27th February 2013 18:29

can anyone make this for templateshares 5.6?

bestlap 27th February 2013 19:06

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 >>

http://s15.postimage.org/sjr2c1rui/Untitled.jpg





How I fix this bug ? :gum:

Chez 27th February 2013 19:12

Quote:

Originally Posted by bestlap (Post 39724)
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 >>

http://s15.postimage.org/sjr2c1rui/Untitled.jpg





How I fix this bug ? :gum:

probably you do something wrong:suicide:

bestlap 27th February 2013 19:45

5 Attachment(s)
Quote:

Originally Posted by Chez (Post 39725)
probably you do something wrong:suicide:

No , I'm sure all is ok .. I chek again...

Here is a files >>>

Chez 27th February 2013 19:48

Try to replace in Upload.php

this:

PHP Code:

tr("YouTube""<input type=\"text\" name=\"tube\" size=\"80\" />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"]."'>(Direct link for youtube trailer)\n"1); 


bestlap 27th February 2013 20:34

Quote:

Originally Posted by Chez (Post 39727)
Try to replace in Upload.php

this:

PHP Code:

tr("YouTube""<input type=\"text\" name=\"tube\" size=\"80\" />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"]."'>(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

DND 27th February 2013 20:42

u need to put it twice in takeupload.
tube and $tube


All times are GMT +2. The time now is 16:11.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.