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
Youtube in torrents detail
Controls ·  Search New posts · Mark unread

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

Unknown User
2008-10-29 15:07:44
All credits to tbdev

Run in MySQL

ALTER TABLE `torrents` ADD `tube` varchar(80) NOT NULL default '';
Open torrents-details.php & find this line




print("<tr><td align=left><b>" . HITS . ":</b></td><td>" . $row["hits"] . "</td></tr>\n");





after add:





if (!empty($row["tube"]))

print ("<tr><td align=left><b>" . Youtube . ": </b></td><td><embed src='". str_replace("watch?v=", "v/", htmlspecialchars($row["tube"])) ."' type=\"application/x-shockwave-flash\" width=\"400\" height=\"310\"></embed></td></tr>");

else

print ("<tr><td align=left><b>" . Youtube . ": </b></td><td><img border=\"0\" width=\"200\" height=\"164\" src=".$site_config["SITEURL"]."/images/novideo.jpg></td></tr>");





Find this line:





$res = mysql_query("SELECT torrents.anon, torrents.seeders,....is more longer





Add where u want:

torrents.tube





ex:





$res = mysql_query("SELECT torrents.anon, torrents.tube, torrents.seeders,





Save & Upload



Open torrents-upload.php

Find this line:





print ("<TR><TD align=right>Language: </td><td align=left>".$language."</td></tr>");



After, add:





print ("<TR><TD align=right>YouTube Video Link: </td><td align=left><input type=\"text\" name=\"tube\" size=\"60\" /><br />For Samples Should be in the format of<br><font color=red><b>http://www.youtube.com/watch?v=Jc9KR3tOP</b></font></td></tr>");





Find:



	if (!is_valid_id($catid))

$message = "Please be sure to select a torrent category";





After, add:





	  if (!empty($_POST['tube']))

$tube = unesc($_POST['tube']);





Find:





$ret = mysql_query("INSERT INTO torrents (filename, owner, name...is more longer



In this line add:

tube,





ex:





$ret = mysql_query("INSERT INTO torrents (filename, owner, name, tube, descr,





In the same line, find:





'".$inames[0]."', '".$inames[1]."', '".$type."'





after add:





, '".$tube."'





ex:





'".$inames[1]."', '".$type."', '".$tube."', '" . get_date_time() . "',



Save & upload

Here are some prints

1. Upload torrent

2. Torrent detail with youtube link

3. Torrent details if youtube link missing

4. novideo image (Upload image "novideo.jpg" in folder "images")

If are not errors this hack can be moved in complet mods section







yutube002.jpg
yutube002.jpg
yutube003.jpg
yutube003.jpg
yutube004.jpg
yutube004.jpg
novideo.jpg
novideo.jpg
Unknown User
2008-10-30 08:18:28
it is an interesting thing, but us it must be some problem. I have brought all the indicated modifications, but on the pages interested I do not visualize differences. As an example in torrent-upload I do not visualize the field in order to insert the link of youtube, and in torrent-details I do not see the video.
Unknown User
2008-10-30 09:54:33
"gandalf76, post: 48209":
it is an interesting thing, but us it must be some problem. I have brought all the indicated modifications, but on the pages interested I do not visualize differences. As an example in torrent-upload I do not visualize the field in order to insert the link of youtube, and in torrent-details I do not see the video.


check with more attention your modification, is imposibile
Unknown User
2008-10-30 10:28:53
ok, I have rifared the modifications and this time it has worked. probably I had mistaken something. the problems now are 2:

- I do not visualize the video. it follows screenshot, (the link inserted is corrected like from example)

- It lacks edit in torrent-edit. i can't modify/verify the youtube url!



thanks.
Unknown User
2008-10-30 12:05:36
open torrents-edit.php

Find this line:

echo "<tr><td align=right><B>Language: </b></TD><TD>".$langdropdown."</TD></TR>";
After add:




echo "<tr><td align=right><B>Trailer: </b></TD><TD><input type=text name=tube size=60 value='".$row["tube"]."'><br>(Direct link for youtube trailer)</TD></TR>";







Find this line:



 

 $updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";



after, add:





	if (!empty($_POST['tube']))

$tube = unesc($_POST['tube']);

$updateset[] = "tube = " . sqlesc($tube);







& another tips:



if u want to see the youtube videos just in ex: Movies category make this



Open torrents-details.php, find this lines:





if (!empty($row["tube"]))

print ("<tr><td align=left><b>" . Youtube . ": </b></td><td><.....more longer







before add:





if (($row["cat_parent"] == 'Movies') || $row["cat_parent"] == 'TV')




attention if u have another names for your categories replace  'Movies' & 'TV' with your names
Unknown User
2008-10-30 12:29:25
all ok! now it works well! the video comes visualized correctly and possible to edit the address.

Thanks !

To my opinion it can be moved in COMPLETE MOD
Unknown User
2008-10-30 17:36:08
don't work for me

The video does not display

the video remains white

please help me
Unknown User
2008-10-30 21:36:47
try to edit ...

in first time i have forgot to insert "http:" and video is blank
Unknown User
2008-10-30 23:29:31
i have not forgot to insert "http:"

please help me
Unknown User
2008-10-31 10:15:14
yes, i have try more time...

there is a problem...

when you upload a torrent, the code MIX a description with youtube link...

you need to edit a torrent for fix everytime..

i wait a fix for this problem
Unknown User
2008-10-31 10:31:38
good working perfect for me...
Unknown User
2008-10-31 12:55:48
"kevito, post: 48257":
i have not forgot to insert "http:"please help me

Post here your code from torrent details page when u see page source

ex: <tr><td align=left><b>Youtube: </b></td><td><embed src='http://www.youtube.com/watch?v=Jxxxxxx
Unknown User
2008-10-31 13:13:23
i have find a "solution"? for me work now..

little modify without sense.. but work  ;)

in torrent upload:

move:

 if (!empty($_POST['tube']))

$tube = unesc($_POST['tube']);
after:


if (!empty($_POST["name"]))

$torrent = unesc($_POST["name"]);





find:



$ret = mysql_query("INSERT INTO torrents (filename, owner, name, tube......



move



,tube



after:



torrentlang, anon



example:



torrentlang, anon, tube





in same line find:



, '".$tube."'



move after:



, '".$langid."','$anon'



Example:



'".$langid."','$anon', '".$tube."'



for me now work.

first of this i have problem in upload.... description empty, no video (blank), no image upload..

try please.

i hope you understand
Unknown User
2008-11-01 10:59:08
thanks, its work

and how add a video dailymotion, please?

sorry for my bad english
Unknown User
2008-11-04 09:39:21
[size=18px]thnx a lot m8!!!! it works perfect!!! i have 2.04 vers. THAT POST MUST TO TRANSFER IN COMPLETE MODS[/size]
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728