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

You are in: Forum / Forum / Torrent Trader / v3 Support

2021-08-08 13:32:15
hello can you tell me the code to add below the file account.php so that the torrents in seed is visible when you click on my profile

thank you in advance for your help
2021-08-08 13:48:38
For torrents, comments, posts in account-details.php you have

$numtorrents = get_row_count("torrents", "WHERE owner = $id");
       $numcomments = get_row_count("comments", "WHERE user = $id");
       $numforumposts = get_row_count("forum_posts", "WHERE userid = $id");


That's uploaded torrents

For only seeding torrents maybe count peers table
   $numseeding = get_row_count("peers", "WHERE userid = $id AND seeder = 'yes' ");


Then just
echo $numseeding;


Not tested on v3 but looks OK
Last edited by M-jay warn on 2021-08-08 14:04:32
2021-08-08 14:07:15
If you mean account.php and not account-details.php change $id to $CURUSER['id']
2021-08-08 14:46:50
yes I would like the member's seed torrent to be displayed in account.php and I can't find the modification to make for that
2021-08-08 14:56:09
Try this In account.php
Find
$usersignature = stripslashes($CURUSER["signature"]);


Below add
$numseeding = get_row_count("peers", "WHERE userid = $CURUSER[id] AND seeder = 'yes' ");


find
<b><?php echo T_("PASSKEY"); ?>:</b> <?php echo $CURUSER["passkey"]; ?><br />


Below add
<b><?php echo T_("Torrents Seeding"); ?>:</b> <?php echo $numseeding; ?><br />


 
Last edited by M-jay warn on 2021-08-08 14:57:04
2021-08-08 15:12:03
thank you i made the modification in account.php and the torrents in seed of the members are still not displayed?

with this modification I have the number of torrents in seed but we don't see the torrents like in account-details.php
Last edited by niki on 2021-08-08 15:24:25
2021-08-08 17:03:25
oh i see  :rofl  i can not test too much on v3 but i think this will work for account.php

once edited go to siteaddress/account.php?action=seedingtorrents

find
/////////////// MY TORRENTS ///////////////////


above add
if ($action=="seedingtorrents"){

$count = SQL_Query_exec("SELECT COUNT(id) FROM peers
                                           WHERE peers.userid = $CURUSER[id]
                                           AND peers.seeder = 'yes'" );

      list($pagertop, $pagerbottom, $limit) = pager(50, $count, 'account.php?action=seedingtorrents&');

$test = SQL_Query_exec("SELECT * FROM torrents
                                         INNER JOIN peers
ON torrents.owner = peers.userid
WHERE peers.userid = $CURUSER[id]
AND peers.seeder = 'yes'" );

begin_frame(T_("USER").": $CURUSER[username] (".T_("Currently seeding").")");
navmenu();
   if (mysqli_num_rows($count) > 0) {
?>
<table class="f-border comment" cellpadding="10" border="0" width="100%">
<tr>
   <th>name</th>
</tr><tr>
<?php
   foreach ($test as $row) {
?>
   <td><?php echo $test['name'] ?></td>
<?php
}
?>
</tr>
</table>
<br /><br />
<?php
   echo $pagerbottom;
   } else {
echo 'not seeding';
}
end_frame();
}


i just add torrent name for now for testing but i added pager so hopefully it works and we can build table
2021-08-08 17:56:05
Thanks for your help M-jay I made the changes you gave me and I have this page but the seed torrents are not displayed
Capture.PNG
File missing
2021-08-08 18:09:13
Due to the custom function wrapper for MySQL aging driver.. I can’t be any help here lol
2021-08-08 18:13:24
:thumb ok and thank you anyway for your help we will see later if there is any proposal   :bigsmile
2021-08-08 19:00:41
Are they external torrents ?
2021-08-08 21:39:22
So many possibilities. Pick one and we can try to port it over..







2021-08-09 15:02:31
Hello M-jay and STorrents2020, no the tracker works in local torrents with passkey  :thumb
Last edited by niki on 2021-08-09 15:04:55
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