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
Torrent listen
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Requests

2019-10-06 07:19:24
Maybe someone has another torrent indicator?
for example the 30 most recent torrents ,like this ?

[ATTACH type="full" alt="5188"]5188[/ATTACH]
torrentlisten.png
torrentlisten.png
Unknown User
2019-10-06 09:04:43
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
2019-10-06 09:55:32
"shadows, post: 67274, member: 20311":

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

I would like to do this with that,
instead recommnded all 30 new ones

[url='https://www.torrenttrader.xyz/index.php?threads/recommended-torrent-ttv3.9755/#post-66647']example[/url]
Unknown User
2019-10-06 10:01:01
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");
2019-10-06 10:04:02
<?php

require_once("backend/functions.php");
dbconn();


$rec = SQL_Query_exec("SELECT id, name, added, image1, seeders, leechers, times_completed FROM torrents WHERE banned ='no' AND visible='yes'  ORDER BY RAND() LIMIT 5");


if (mysqli_num_rows($rec) > 0) {
print("<table align=center cellpadding=3 cellspacing=3 width=100% border=0><tr>");
while ($row2 = mysqli_fetch_array($rec)) {
$tor = $row2['0'];
$altname = $row2['1'];
$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";
$res = SQL_Query_exec("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.added, torrents.seeders, torrents.leechers, torrents.times_completed, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where");
$row = mysqli_fetch_array($res);
$cat = $row['cat_name'];
$img1 = "<a href=torrents-details.php?id=$row[id]' target='_new'><div><img id='cover_img1' class='cover_img' border='0' src='uploads/images/$row[image1]' title=\"$altname | $cat\" width='90px' height='130px'></a></div>
<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 ($row["image1"] != ""){
print("<td align=center>".$img1."</td>");
}else{
   $img1 = "<a href=torrents-details.php?id=$row[id]'><img id='cover_img1' class='cover_img' border='0' src=images/no-poster.jpg title=\"$altname | $cat\" 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>";
print("<td align=center>".$img1."</td>");
}
}
print("</tr></table>");
}
   



?>



So I have the code, and have taken the recommended-out
but I do not manage to put the loop, he makes me a line break after eg 5 torrents
2019-10-06 10:05:29
"shadows, post: 67277, member: 20311":

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");

wen i do this,i have 30 torrents on one line :-)
Unknown User
2019-10-06 10:07:25
Can u post screenshota of your current code and the one i posted to see how it looks like with 5 and 30
2019-10-06 10:28:03
here with 5 torrents on index,all looks normal
[ATTACH type="full" alt="5189"]5189[/ATTACH]

and here with 30,
he makes everything next to each other and compresses the style,
and the index will scroll horizontally

[ATTACH type="full" alt="5190"]5190[/ATTACH]
5.png
5.png
30.png
30.png
Unknown User
2019-10-06 10:29:09
So u want new line after every 5th image?
2019-10-06 10:31:55
"shadows, post: 67284, member: 20311":

So u want new line after every 5th image?

yes sir :),i want the new 30 torrents,and after 5 torrents i want a break line ,as above on the example pic
Unknown User
2019-10-06 10:35:53
Add the following inside while loop

if ($rec % 5 == 0)
echo "\n";
2019-10-06 10:46:48
also so

while ($row2 = mysqli_fetch_array($rec, MYSQLI_NUM)) {
if ($rec % 5 == 0)
echo "\n";

But nothing change yet
Unknown User
2019-10-06 10:57:48
My bad didn't saw the html

if ($rec % 5 == 0)
echo "<tr></tr>";

The output should be like this
2019-10-06 11:07:32
unfortunately not.
Since I'm already a week off despair
Unknown User
2019-10-06 11:30:16
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>");
?>
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