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
[MOD] Magnet Link torrent
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

2019-01-04 16:03:01
Open torrents-details.php and find
print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" alt='' /></a></td>");


Replace with
print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" title=\"Télécharger le torrent !\" /></a></td>");
print ("<td valign='top'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a>&nbsp;<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "\"><img src=\"".$site_config["SITEURL"]."/images/magnetique.png\" width=\"38\" height=\"36\" border=\"0\" title=\"Télécharger le torrent magnétique !\" /></a><br />");


find
print ("<td valign='top'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a><br />");

Add after
print ("<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "\"><font size=5pt>".T_("MAGNET")."</font></a><br />");


In english.php
Add
$LANG["MAGNET"] = "Magnet Torrent";
$LANG["MAGNET2"] = "Magnet";



This edit assumes that you are using passkey
to add a link on the index page to your magnets, in config.php add magnet as seen below. Some things seen below will be different than you, just add magnet and ignore the other stuff
$site_config["torrenttable_columns"] = "category,name,dl,magnet,imdb,tube,size,seeders,leechers,health,added";


in functions.php find
case 'dl':
print("<td class='ttable_col$x' align='center'><a href=\"download.php?id=$id&amp;name=" . rawurlencode($row["filename"]) . "\"><img src='" . $site_config['SITEURL'] . "/images/icon_download.png' border='0' width='50' height='50'alt=\"Download .torrent\" /></a></td>");
break;


Add below
case 'magnet':
$shit = @mysql_fetch_array(@SQL_Query_exec("SELECT info_hash FROM torrents WHERE id=$id"));
print ("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $shit["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' width='50' height='50'title='Download via Magnet' /></a></td>");
        break;


also find
         case 'dl':
           echo "<th>".T_("DL")."</th>";
        break;

Add below
         case 'magnet':
           echo "<th>".T_("MAGNET2")."</th>";
        break;


Also, the only thing I have in my torrents-details.php is this
   print ("<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\">".T_("MAGNET")."</a><br>");


BONUS: .psd image to customize your image

Add the image in the folder IMAGES
IMG Torrent magnétique.rar
Download
2019-02-23 23:08:19
hey, I recognize this function haha
case 'magnet':
$shit = @mysql_fetch_array(@SQL_Query_exec("SELECT info_hash FROM torrents WHERE id=$id"));
print ("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $shit["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' width='50' height='50'title='Download via Magnet' /></a></td>");
        break;

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)
Last edited by MicroMonkey on 2021-02-17 17:09:50
2021-02-14 09:13:14
This how must be:
case 'magnet':
$shit = @mysql_fetch_array(@SQL_Query_exec("SELECT info_hash FROM torrents WHERE id=$id"));
print ("<td class='ttable_col$x' align='center'><a href="magnet:?xt=urn:btih:" . $shit["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER ['passkey']. ""><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' width='50' height='50'title='Download via Magnet' /></a></td>");
           break;


in TTv.3.0 MySQLi
In fact, can you make a tutorial for a magnet link for TTv.3.0 MySQLi
Thanks and regards
2021-02-15 16:51:36
should work the same in v3 :)
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)
2021-02-15 17:02:56
Yes but @mysql_fetch_array.
I followed everything step by step but it doesn't work
HTTP ERROR 500
2021-02-15 17:24:17
oh, I didnt see that, just change to mysqli_fetch_array
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)
2021-02-16 11:14:34
I added a magnet link to the torrent details, but how to add a image magnet.png
This is the code which you I added in torrents-details.php

print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\"><img src=\"".$site_config["SITEURL"]."/images/download_torrent.png\" border=\"0\" alt='' /></a></td>");
  print ("<td valign='top'><a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\">".T_("DOWNLOAD_TORRENT")."</a><br />");
  print ("<a href=\"magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER  ['passkey']. "\">".T_("MAGNET")."</a><br>");




2021-02-16 11:46:10
Place magnet.png into your image folder and that's it
magnet.png
File missing



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2021-02-16 11:52:26
2021-02-16 11:53:45


print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href="download.php?id=$id&name=" . rawurlencode($row["filename"]) . ""><img src="".$site_config["SITEURL"]."/images/download_torrent.png" border="0" alt='' /></a></td>");
 print ("<td valign='top'><a href="download.php?id=$id&name=" . rawurlencode($row["filename"]) . "">".T_("DOWNLOAD_TORRENT")."</a><br />");
 print ("<a href="magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER  ['passkey']. ""><img src="".$site_config["SITEURL"]."/images/magnet.png" border="0" alt='' /> &nbsp;  &nbsp;  ".T_("MAGNET")."</a><br>");




www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-16 11:59:37
Thanks bro i will try

Edit: This not work for me :(
HTTP ERROR 500
Last edited by coco on 2021-02-16 12:10:10
2021-02-16 12:13:17
Try it:

print ("<table border='0' cellpadding='0' width='100%'><tr><td align='center' valign='middle' width='54'><a href="download.php?id=$id&name=" . rawurlencode($row["filename"]) . ""><img src="".$site_config["SITEURL"]."/images/download_torrent.png" border="0" alt='' /></a></td>");
 print ("<td valign='top'><a href="download.php?id=$id&name=" . rawurlencode($row["filename"]) . "">".T_("DOWNLOAD_TORRENT")."</a><br />");
 print ("<a href="magnet:?xt=urn:btih:" . $row['info_hash'] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=". $CURUSER  ['passkey']. ""><img src="".$site_config["SITEURL"]."/images/magnet.png" border="0" alt='' /> </a><br>");



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-16 12:35:56
Definitly work on my test page:


print ("<a href='magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=".$site_config[SITEURL]."/announce.php/?passkey=".$CURUSER["passkey"]."'><img src='".$site_config["SITEURL"]."/images/magnet.png' width='20' height='20' border='0' alt='' /> ".T_("MAGNET")."  </a>");


[img width=916 height=613]https://i.postimg.cc/mrqyv4zf/Screenshot-1.png[/img]


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-16 16:29:33
the forum keeps removing backslashes in the code, so here is a screenshot then lol https://ibb.co/PQkv3RW
Capture.PNG
File missing

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)
Last edited by MicroMonkey on 2021-02-16 16:30:39
2021-02-16 18:09:51
heres a few magnet images I had you can use if you need
magnet.png
File missing

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)
2021-02-16 18:10:19
and another
magnetique.png
File missing

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)
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728