Go to Profile
Do you have any screenshot to show me what you mean?
edit backend functions.php
find function torrenttable($res)
There find case: name
and add <img src='uploads/images/$row[image1]' /> where you want to display.
"niki, post: 67295, member: 20338":
Hello, can you tell me how to replace the torrent.php list table with a torrent page with images
thanks in advance for the help
Can you explain it better?
I don't know which idi*t wrote this mod, but its total sh*t.
Try this
<?php
require_once("backend/functions.php");
dbconn();
$rec = SQL_Query_exec("SELECT id, name, added, seeders, leechers, times_completed, image1 FROM torrents WHERE banned ='no' AND visible='yes' ORDER BY RAND() LIMIT 30");
print("<table align=center cellpadding=3 cellspacing=3 width=100% border=0><tr>");
$count = 0;
while ($row = mysqli_fetch_array($rec)) {
$img1 = "<a href=torrents-details.php?id=$row[id]'><img id='cover_img1' class='cover_img' border='0' src='uploads/images/$row[image1]' width='90px' height='130px'></a>
<div style='margin-top:10px; font-size:13px;'>
<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |
<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |
<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>
</div>";
if ($count % 5 == 0)
echo "<tr></tr>";
print("<td align=center>".$img1."</td>");
$count++;
}
print("</tr></table>");
?>
My bad didn't saw the html
if ($rec % 5 == 0)
echo "<tr></tr>";
The output should be like this
Add the following inside while loop
if ($rec % 5 == 0)
echo "\n";
So u want new line after every 5th image?
Can u post screenshota of your current code and the one i posted to see how it looks like with 5 and 30
[USER=20288]@m-jay[/USER] having sql inside while loop is never a smart idea, this code could be significantly shrinked and performance improved
Change to this
$rec = SQL_Query_exec("SELECT id, name, added, image1, seeders, leechers, times_completed FROM torrents WHERE banned ='no' AND visible='yes' AND recommended='yes' ORDER BY RAND() LIMIT 30");
"extremlymtorrents, post: 67271, member: 20299":
I know ,, I will make it to TT mod
You can make it via sessions or cookies.
I would do cookies based so if user has x cookies set change backgroud to x image.
You just nees to include a proper sql
For all categories:
select torrents.name, torrents.image, torrents.seeders, torrents.leechers from torrents order by id desc limit 30
For specific category
select torrents.name, torrents.image, torrents.seeders, torrents.leechers from torrents where torrents.category = NUMBER order by torrents.id desc limit 30
Then just make a loop like
foreach ($sql as $recents) {
echo ... here image seeds leechs
}
I am on the phone so this is just an example i wrote
You can't do that easily, nor anyone here would write the code for that afaik. Magnet link is just a hash with announces if added, where torrent file is a metadata which is asymmetrically bencoded and contains information about files, trackers, hash, name, size, etc.
Same goes for the second one. Use online torrent editors or bendecode them yourself and add trackers.
It even works with php 7.4.0rc2
so you plan to create it to host torrents on external server which will let users store torrents as hash
"mostvotedplaya, post: 67226, member: 20335":
Indeed, but there are alot of things missing that would significantly improve the script.
You can always fork it and edit the code :D
"mostvotedplaya, post: 67224, member: 20335":
I was thinking about launching my own project which would be like what they offer, if i decide to go along with it then i will make a library for it.
There's already a public torrage script on github which is used on itorrents.org ->
https://github.com/torrage/Torrage
I dont know how soap works, never used it
PS: Maybe itorrents api doesn't work anymore as their codes are outdated 4-5 years.
"mostvotedplaya, post: 67220, member: 20335":
They do not provide a curl example, i would recommend installing the pecl extension as they say on their site.
http_post_fields is deprecated. It won't work.